Lines Matching +full:i +full:- +full:leak +full:- +full:current

1 // SPDX-License-Identifier: GPL-2.0
45 pid_t pid = -1; in call_clone3_set_tid()
56 ksft_print_msg("%s - Failed to create new process\n", in call_clone3_set_tid()
58 return -errno; in call_clone3_set_tid()
66 ksft_print_msg("I am the child, my PID is %d (expected %d)\n", in call_clone3_set_tid()
97 ksft_print_msg("I am the parent (%d). My child's pid is %d\n", in call_clone3_set_tid()
103 return -1; in call_clone3_set_tid()
108 return -errno; in call_clone3_set_tid()
112 return -1; in call_clone3_set_tid()
133 "[%d] clone3() with CLONE_SET_TID %d says: %d - expected %d\n", in test_clone3_set_tid()
146 int ret = -1; in main()
164 "%s - Could not open /proc/sys/kernel/pid_max\n", in main()
173 set_tid, MAX_PID_NS_LEVEL + 1, 0, -EINVAL, 0, 0); in main()
176 set_tid, MAX_PID_NS_LEVEL * 2, 0, -EINVAL, 0, 0); in main()
180 -EINVAL, 0, 0); in main()
183 set_tid, MAX_PID_NS_LEVEL * 42, 0, -EINVAL, 0, 0); in main()
186 * This can actually work if this test running in a MAX_PID_NS_LEVEL - 1 in main()
190 set_tid, MAX_PID_NS_LEVEL - 1, 0, -EINVAL, 0, 0); in main()
194 set_tid, MAX_PID_NS_LEVEL + 1, 0, -EINVAL, 0, 0); in main()
197 set_tid, MAX_PID_NS_LEVEL * 2, 0, -EINVAL, 0, 0); in main()
201 -EINVAL, 0, 0); in main()
204 set_tid, MAX_PID_NS_LEVEL * 42, 0, -EINVAL, 0, 0); in main()
207 * This can actually work if this test running in a MAX_PID_NS_LEVEL - 1 in main()
211 set_tid, MAX_PID_NS_LEVEL - 1, 0, -EINVAL, 0, 0); in main()
217 set_tid, 1, 0, -EINVAL, 0, 0); in main()
219 set_tid[0] = -1; in main()
220 test_clone3_set_tid("valid size, -1 TID", in main()
221 set_tid, 1, 0, -EINVAL, 0, 0); in main()
224 test_clone3_set_tid("2 TIDs, -1 and 0", in main()
225 set_tid, 2, 0, -EINVAL, 0, 0); in main()
229 test_clone3_set_tid("valid size, -1 TID", in main()
230 set_tid, 1, CLONE_NEWPID, -EINVAL, 0, 0); in main()
234 /* Try with a valid PID (1) this should return -EEXIST. */ in main()
238 set_tid, 1, 0, -EEXIST, 0, 0); in main()
252 set_tid, 1, 0, -EINVAL, 0, 0); in main()
256 set_tid, 1, CLONE_NEWPID, -EINVAL, 0, 0); in main()
263 * that all those tests are skipped as non-root. in main()
265 ksft_cnt.ksft_xskip += ksft_plan - ksft_test_num(); in main()
269 /* Find the current active PID */ in main()
285 set_tid, 1, CLONE_NEWPID, -EINVAL, 0, 0); in main()
298 if (unshare(CLONE_NEWPID) == -1) in main()
306 set_tid, 1, 0, -EINVAL, 0, 0); in main()
312 * This and the next test cases check that all pid-s are in main()
316 set_tid[1] = -1; in main()
317 test_clone3_set_tid("check leak on invalid TID -1", in main()
318 set_tid, 2, 0, -EINVAL, 0, 0); in main()
322 test_clone3_set_tid("check leak on invalid specific TID", in main()
331 set_tid[1] = -1; in main()
335 set_tid, 3, CLONE_NEWPID, -EINVAL, 0, 0); in main()
346 set_tid, 4, CLONE_NEWPID, -EINVAL, 0, 0); in main()
369 "%s - Could not open %s\n", in main()
372 while (getline(&line, &len, f) != -1) { in main()
374 int i; in main() local
377 i = sscanf(line, "NSpid:\t%d\t%d\t%d", in main()
379 if (i != 3) { in main()
398 ret = -errno; in main()
405 ksft_cnt.ksft_pass += 6 - (ksft_cnt.ksft_fail - WEXITSTATUS(status)); in main()