WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #22: new file mode 100644 WARNING: Missing a blank line after declarations #99: FILE: tools/testing/selftests/namespaces/nsid_test.c:40: + __u64 mnt_ns_id2 = 0; + ret = ioctl(fd_mntns, NS_GET_ID, &mnt_ns_id2); WARNING: Missing a blank line after declarations #156: FILE: tools/testing/selftests/namespaces/nsid_test.c:97: + char buf; + ASSERT_EQ(read(pipefd[0], &buf, 1), 1); WARNING: Missing a blank line after declarations #171: FILE: tools/testing/selftests/namespaces/nsid_test.c:112: + char path[256]; + snprintf(path, sizeof(path), "/proc/%d/ns/mnt", pid); WARNING: Missing a blank line after declarations #208: FILE: tools/testing/selftests/namespaces/nsid_test.c:149: + __u64 cgroup_ns_id2 = 0; + ret = ioctl(fd_cgroupns, NS_GET_ID, &cgroup_ns_id2); WARNING: Missing a blank line after declarations #265: FILE: tools/testing/selftests/namespaces/nsid_test.c:206: + char buf; + ASSERT_EQ(read(pipefd[0], &buf, 1), 1); WARNING: Missing a blank line after declarations #280: FILE: tools/testing/selftests/namespaces/nsid_test.c:221: + char path[256]; + snprintf(path, sizeof(path), "/proc/%d/ns/cgroup", pid); WARNING: Missing a blank line after declarations #317: FILE: tools/testing/selftests/namespaces/nsid_test.c:258: + __u64 ipc_ns_id2 = 0; + ret = ioctl(fd_ipcns, NS_GET_ID, &ipc_ns_id2); WARNING: Missing a blank line after declarations #374: FILE: tools/testing/selftests/namespaces/nsid_test.c:315: + char buf; + ASSERT_EQ(read(pipefd[0], &buf, 1), 1); WARNING: Missing a blank line after declarations #389: FILE: tools/testing/selftests/namespaces/nsid_test.c:330: + char path[256]; + snprintf(path, sizeof(path), "/proc/%d/ns/ipc", pid); WARNING: Missing a blank line after declarations #426: FILE: tools/testing/selftests/namespaces/nsid_test.c:367: + __u64 uts_ns_id2 = 0; + ret = ioctl(fd_utsns, NS_GET_ID, &uts_ns_id2); WARNING: Missing a blank line after declarations #483: FILE: tools/testing/selftests/namespaces/nsid_test.c:424: + char buf; + ASSERT_EQ(read(pipefd[0], &buf, 1), 1); WARNING: Missing a blank line after declarations #498: FILE: tools/testing/selftests/namespaces/nsid_test.c:439: + char path[256]; + snprintf(path, sizeof(path), "/proc/%d/ns/uts", pid); WARNING: Missing a blank line after declarations #535: FILE: tools/testing/selftests/namespaces/nsid_test.c:476: + __u64 user_ns_id2 = 0; + ret = ioctl(fd_userns, NS_GET_ID, &user_ns_id2); WARNING: Missing a blank line after declarations #592: FILE: tools/testing/selftests/namespaces/nsid_test.c:533: + char buf; + ASSERT_EQ(read(pipefd[0], &buf, 1), 1); WARNING: Missing a blank line after declarations #607: FILE: tools/testing/selftests/namespaces/nsid_test.c:548: + char path[256]; + snprintf(path, sizeof(path), "/proc/%d/ns/user", pid); WARNING: braces {} are not necessary for single statement blocks #635: FILE: tools/testing/selftests/namespaces/nsid_test.c:576: + if (fd_timens < 0) { + SKIP(return, "Time namespaces not supported"); + } WARNING: Missing a blank line after declarations #646: FILE: tools/testing/selftests/namespaces/nsid_test.c:587: + __u64 time_ns_id2 = 0; + ret = ioctl(fd_timens, NS_GET_ID, &time_ns_id2); WARNING: braces {} are not necessary for single statement blocks #664: FILE: tools/testing/selftests/namespaces/nsid_test.c:605: + if (fd_parent_timens < 0) { + SKIP(return, "Time namespaces not supported"); + } WARNING: line length of 83 exceeds 80 columns #687: FILE: tools/testing/selftests/namespaces/nsid_test.c:628: + if (errno == EPERM || errno == EACCES || errno == EINVAL) { WARNING: Missing a blank line after declarations #696: FILE: tools/testing/selftests/namespaces/nsid_test.c:637: + pid_t grandchild = fork(); + if (grandchild == 0) { WARNING: line length of 87 exceeds 80 columns #707: FILE: tools/testing/selftests/namespaces/nsid_test.c:648: + pause(); /* Keep the parent alive to maintain the grandchild */ WARNING: Missing a blank line after declarations #718: FILE: tools/testing/selftests/namespaces/nsid_test.c:659: + char buf; + ASSERT_EQ(read(pipefd[0], &buf, 1), 1); WARNING: line length of 100 exceeds 80 columns #732: FILE: tools/testing/selftests/namespaces/nsid_test.c:673: + ASSERT_EQ(read(pipefd[0], &grandchild_pid, sizeof(grandchild_pid)), sizeof(grandchild_pid)); WARNING: Missing a blank line after declarations #732: FILE: tools/testing/selftests/namespaces/nsid_test.c:673: + pid_t grandchild_pid; + ASSERT_EQ(read(pipefd[0], &grandchild_pid, sizeof(grandchild_pid)), sizeof(grandchild_pid)); WARNING: Missing a blank line after declarations #737: FILE: tools/testing/selftests/namespaces/nsid_test.c:678: + char path[256]; + snprintf(path, sizeof(path), "/proc/%d/ns/time", grandchild_pid); WARNING: Missing a blank line after declarations #774: FILE: tools/testing/selftests/namespaces/nsid_test.c:715: + __u64 pid_ns_id2 = 0; + ret = ioctl(fd_pidns, NS_GET_ID, &pid_ns_id2); WARNING: Missing a blank line after declarations #820: FILE: tools/testing/selftests/namespaces/nsid_test.c:761: + pid_t grandchild = fork(); + if (grandchild == 0) { WARNING: line length of 87 exceeds 80 columns #831: FILE: tools/testing/selftests/namespaces/nsid_test.c:772: + pause(); /* Keep the parent alive to maintain the grandchild */ WARNING: Missing a blank line after declarations #842: FILE: tools/testing/selftests/namespaces/nsid_test.c:783: + char buf; + ASSERT_EQ(read(pipefd[0], &buf, 1), 1); WARNING: line length of 100 exceeds 80 columns #856: FILE: tools/testing/selftests/namespaces/nsid_test.c:797: + ASSERT_EQ(read(pipefd[0], &grandchild_pid, sizeof(grandchild_pid)), sizeof(grandchild_pid)); WARNING: Missing a blank line after declarations #856: FILE: tools/testing/selftests/namespaces/nsid_test.c:797: + pid_t grandchild_pid; + ASSERT_EQ(read(pipefd[0], &grandchild_pid, sizeof(grandchild_pid)), sizeof(grandchild_pid)); WARNING: Missing a blank line after declarations #861: FILE: tools/testing/selftests/namespaces/nsid_test.c:802: + char path[256]; + snprintf(path, sizeof(path), "/proc/%d/ns/pid", grandchild_pid); WARNING: line length of 84 exceeds 80 columns #905: FILE: tools/testing/selftests/namespaces/nsid_test.c:846: + ret = getsockopt(sock, SOL_SOCKET, SO_NETNS_COOKIE, &netns_cookie, &optlen); WARNING: Missing a blank line after declarations #914: FILE: tools/testing/selftests/namespaces/nsid_test.c:855: + __u64 net_ns_id2 = 0; + ret = ioctl(fd_netns, NS_GET_ID, &net_ns_id2); WARNING: line length of 98 exceeds 80 columns #946: FILE: tools/testing/selftests/namespaces/nsid_test.c:887: + ret = getsockopt(parent_sock, SOL_SOCKET, SO_NETNS_COOKIE, &parent_netns_cookie, &optlen); WARNING: Missing a blank line after declarations #986: FILE: tools/testing/selftests/namespaces/nsid_test.c:927: + char buf; + ASSERT_EQ(read(pipefd[0], &buf, 1), 1); WARNING: Missing a blank line after declarations #1002: FILE: tools/testing/selftests/namespaces/nsid_test.c:943: + char path[256]; + snprintf(path, sizeof(path), "/proc/%d/ns/net", pid); WARNING: line length of 104 exceeds 80 columns #1018: FILE: tools/testing/selftests/namespaces/nsid_test.c:959: + ret = getsockopt(child_sock, SOL_SOCKET, SO_NETNS_COOKIE, &child_netns_cookie, &optlen); WARNING: braces {} are not necessary for single statement blocks #1032: FILE: tools/testing/selftests/namespaces/nsid_test.c:973: + if (child_netns_cookie != 0) { + ASSERT_NE(parent_netns_cookie, child_netns_cookie); + } total: 0 errors, 40 warnings, 0 checks, 1001 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. Commit 6c725e0c62d1 ("selftests/namespaces: add identifier selftests") has style problems, please review. NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT BAD_REPORTED_BY_LINK CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. total: 0 errors, 40 warnings, 0 checks, 1001 lines checked