]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/test/test-process-util.c
pkgconfig: define variables relative to ${prefix}/${rootprefix}/${sysconfdir}
[thirdparty/systemd.git] / src / test / test-process-util.c
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2
3 #include <sched.h>
4 #include <sys/mount.h>
5 #include <sys/personality.h>
6 #include <sys/prctl.h>
7 #include <sys/stat.h>
8 #include <sys/types.h>
9 #include <sys/wait.h>
10 #include <unistd.h>
11 #if HAVE_VALGRIND_VALGRIND_H
12 #include <valgrind/valgrind.h>
13 #endif
14
15 #include "alloc-util.h"
16 #include "architecture.h"
17 #include "fd-util.h"
18 #include "log.h"
19 #include "macro.h"
20 #include "parse-util.h"
21 #include "process-util.h"
22 #include "signal-util.h"
23 #include "stdio-util.h"
24 #include "string-util.h"
25 #include "terminal-util.h"
26 #include "test-helper.h"
27 #include "tests.h"
28 #include "util.h"
29 #include "virt.h"
30
31 static void test_get_process_comm(pid_t pid) {
32 struct stat st;
33 _cleanup_free_ char *a = NULL, *c = NULL, *d = NULL, *f = NULL, *i = NULL;
34 _cleanup_free_ char *env = NULL;
35 char path[STRLEN("/proc//comm") + DECIMAL_STR_MAX(pid_t)];
36 pid_t e;
37 uid_t u;
38 gid_t g;
39 dev_t h;
40 int r;
41
42 xsprintf(path, "/proc/"PID_FMT"/comm", pid);
43
44 if (stat(path, &st) == 0) {
45 assert_se(get_process_comm(pid, &a) >= 0);
46 log_info("PID"PID_FMT" comm: '%s'", pid, a);
47 } else
48 log_warning("%s not exist.", path);
49
50 assert_se(get_process_cmdline(pid, 0, true, &c) >= 0);
51 log_info("PID"PID_FMT" cmdline: '%s'", pid, c);
52
53 assert_se(get_process_cmdline(pid, 8, false, &d) >= 0);
54 log_info("PID"PID_FMT" cmdline truncated to 8: '%s'", pid, d);
55
56 free(d);
57 assert_se(get_process_cmdline(pid, 1, false, &d) >= 0);
58 log_info("PID"PID_FMT" cmdline truncated to 1: '%s'", pid, d);
59
60 assert_se(get_process_ppid(pid, &e) >= 0);
61 log_info("PID"PID_FMT" PPID: "PID_FMT, pid, e);
62 assert_se(pid == 1 ? e == 0 : e > 0);
63
64 assert_se(is_kernel_thread(pid) == 0 || pid != 1);
65
66 r = get_process_exe(pid, &f);
67 assert_se(r >= 0 || r == -EACCES);
68 log_info("PID"PID_FMT" exe: '%s'", pid, strna(f));
69
70 assert_se(get_process_uid(pid, &u) == 0);
71 log_info("PID"PID_FMT" UID: "UID_FMT, pid, u);
72 assert_se(u == 0 || pid != 1);
73
74 assert_se(get_process_gid(pid, &g) == 0);
75 log_info("PID"PID_FMT" GID: "GID_FMT, pid, g);
76 assert_se(g == 0 || pid != 1);
77
78 r = get_process_environ(pid, &env);
79 assert_se(r >= 0 || r == -EACCES);
80 log_info("PID"PID_FMT" strlen(environ): %zi", pid, env ? (ssize_t)strlen(env) : (ssize_t)-errno);
81
82 if (!detect_container())
83 assert_se(get_ctty_devnr(pid, &h) == -ENXIO || pid != 1);
84
85 (void) getenv_for_pid(pid, "PATH", &i);
86 log_info("PID"PID_FMT" $PATH: '%s'", pid, strna(i));
87 }
88
89 static void test_get_process_comm_escape_one(const char *input, const char *output) {
90 _cleanup_free_ char *n = NULL;
91
92 log_info("input: <%s> — output: <%s>", input, output);
93
94 assert_se(prctl(PR_SET_NAME, input) >= 0);
95 assert_se(get_process_comm(0, &n) >= 0);
96
97 log_info("got: <%s>", n);
98
99 assert_se(streq_ptr(n, output));
100 }
101
102 static void test_get_process_comm_escape(void) {
103 _cleanup_free_ char *saved = NULL;
104
105 assert_se(get_process_comm(0, &saved) >= 0);
106
107 test_get_process_comm_escape_one("", "");
108 test_get_process_comm_escape_one("foo", "foo");
109 test_get_process_comm_escape_one("012345678901234", "012345678901234");
110 test_get_process_comm_escape_one("0123456789012345", "012345678901234");
111 test_get_process_comm_escape_one("äöüß", "\\303\\244\\303…");
112 test_get_process_comm_escape_one("xäöüß", "x\\303\\244…");
113 test_get_process_comm_escape_one("xxäöüß", "xx\\303\\244…");
114 test_get_process_comm_escape_one("xxxäöüß", "xxx\\303\\244…");
115 test_get_process_comm_escape_one("xxxxäöüß", "xxxx\\303\\244…");
116 test_get_process_comm_escape_one("xxxxxäöüß", "xxxxx\\303…");
117
118 assert_se(prctl(PR_SET_NAME, saved) >= 0);
119 }
120
121 static void test_pid_is_unwaited(void) {
122 pid_t pid;
123
124 pid = fork();
125 assert_se(pid >= 0);
126 if (pid == 0) {
127 _exit(EXIT_SUCCESS);
128 } else {
129 int status;
130
131 waitpid(pid, &status, 0);
132 assert_se(!pid_is_unwaited(pid));
133 }
134 assert_se(pid_is_unwaited(getpid_cached()));
135 assert_se(!pid_is_unwaited(-1));
136 }
137
138 static void test_pid_is_alive(void) {
139 pid_t pid;
140
141 pid = fork();
142 assert_se(pid >= 0);
143 if (pid == 0) {
144 _exit(EXIT_SUCCESS);
145 } else {
146 int status;
147
148 waitpid(pid, &status, 0);
149 assert_se(!pid_is_alive(pid));
150 }
151 assert_se(pid_is_alive(getpid_cached()));
152 assert_se(!pid_is_alive(-1));
153 }
154
155 static void test_personality(void) {
156
157 assert_se(personality_to_string(PER_LINUX));
158 assert_se(!personality_to_string(PERSONALITY_INVALID));
159
160 assert_se(streq(personality_to_string(PER_LINUX), architecture_to_string(native_architecture())));
161
162 assert_se(personality_from_string(personality_to_string(PER_LINUX)) == PER_LINUX);
163 assert_se(personality_from_string(architecture_to_string(native_architecture())) == PER_LINUX);
164
165 #ifdef __x86_64__
166 assert_se(streq_ptr(personality_to_string(PER_LINUX), "x86-64"));
167 assert_se(streq_ptr(personality_to_string(PER_LINUX32), "x86"));
168
169 assert_se(personality_from_string("x86-64") == PER_LINUX);
170 assert_se(personality_from_string("x86") == PER_LINUX32);
171 assert_se(personality_from_string("ia64") == PERSONALITY_INVALID);
172 assert_se(personality_from_string(NULL) == PERSONALITY_INVALID);
173
174 assert_se(personality_from_string(personality_to_string(PER_LINUX32)) == PER_LINUX32);
175 #endif
176 }
177
178 static void test_get_process_cmdline_harder(void) {
179 char path[] = "/tmp/test-cmdlineXXXXXX";
180 _cleanup_close_ int fd = -1;
181 _cleanup_free_ char *line = NULL;
182 pid_t pid;
183
184 if (geteuid() != 0) {
185 log_info("Skipping %s: not root", __func__);
186 return;
187 }
188
189 if (!have_namespaces()) {
190 log_notice("Testing without namespaces, skipping %s", __func__);
191 return;
192 }
193
194 #if HAVE_VALGRIND_VALGRIND_H
195 /* valgrind patches open(/proc//cmdline)
196 * so, test_get_process_cmdline_harder fails always
197 * See https://github.com/systemd/systemd/pull/3555#issuecomment-226564908 */
198 if (RUNNING_ON_VALGRIND) {
199 log_info("Skipping %s: running on valgrind", __func__);
200 return;
201 }
202 #endif
203
204 pid = fork();
205 if (pid > 0) {
206 siginfo_t si;
207
208 (void) wait_for_terminate(pid, &si);
209
210 assert_se(si.si_code == CLD_EXITED);
211 assert_se(si.si_status == 0);
212
213 return;
214 }
215
216 assert_se(pid == 0);
217 assert_se(unshare(CLONE_NEWNS) >= 0);
218
219 if (mount(NULL, "/", NULL, MS_SLAVE|MS_REC, NULL) < 0) {
220 log_warning_errno(errno, "mount(..., \"/\", MS_SLAVE|MS_REC, ...) failed: %m");
221 assert_se(IN_SET(errno, EPERM, EACCES));
222 return;
223 }
224
225 fd = mkostemp(path, O_CLOEXEC);
226 assert_se(fd >= 0);
227
228 /* Note that we don't unmount the following bind-mount at the end of the test because the kernel
229 * will clear up its /proc/PID/ hierarchy automatically as soon as the test stops. */
230 if (mount(path, "/proc/self/cmdline", "bind", MS_BIND, NULL) < 0) {
231 /* This happens under selinux… Abort the test in this case. */
232 log_warning_errno(errno, "mount(..., \"/proc/self/cmdline\", \"bind\", ...) failed: %m");
233 assert_se(IN_SET(errno, EPERM, EACCES));
234 return;
235 }
236
237 assert_se(unlink(path) >= 0);
238
239 assert_se(prctl(PR_SET_NAME, "testa") >= 0);
240
241 assert_se(get_process_cmdline(getpid_cached(), 0, false, &line) == -ENOENT);
242
243 assert_se(get_process_cmdline(getpid_cached(), 0, true, &line) >= 0);
244 assert_se(streq(line, "[testa]"));
245 line = mfree(line);
246
247 assert_se(get_process_cmdline(getpid_cached(), 1, true, &line) >= 0);
248 assert_se(streq(line, ""));
249 line = mfree(line);
250
251 assert_se(get_process_cmdline(getpid_cached(), 2, true, &line) >= 0);
252 assert_se(streq(line, "["));
253 line = mfree(line);
254
255 assert_se(get_process_cmdline(getpid_cached(), 3, true, &line) >= 0);
256 assert_se(streq(line, "[."));
257 line = mfree(line);
258
259 assert_se(get_process_cmdline(getpid_cached(), 4, true, &line) >= 0);
260 assert_se(streq(line, "[.."));
261 line = mfree(line);
262
263 assert_se(get_process_cmdline(getpid_cached(), 5, true, &line) >= 0);
264 assert_se(streq(line, "[..."));
265 line = mfree(line);
266
267 assert_se(get_process_cmdline(getpid_cached(), 6, true, &line) >= 0);
268 assert_se(streq(line, "[...]"));
269 line = mfree(line);
270
271 assert_se(get_process_cmdline(getpid_cached(), 7, true, &line) >= 0);
272 assert_se(streq(line, "[t...]"));
273 line = mfree(line);
274
275 assert_se(get_process_cmdline(getpid_cached(), 8, true, &line) >= 0);
276 assert_se(streq(line, "[testa]"));
277 line = mfree(line);
278
279 assert_se(write(fd, "\0\0\0\0\0\0\0\0\0", 10) == 10);
280
281 assert_se(get_process_cmdline(getpid_cached(), 0, false, &line) == -ENOENT);
282
283 assert_se(get_process_cmdline(getpid_cached(), 0, true, &line) >= 0);
284 assert_se(streq(line, "[testa]"));
285 line = mfree(line);
286
287 assert_se(write(fd, "foo\0bar\0\0\0\0\0", 10) == 10);
288
289 assert_se(get_process_cmdline(getpid_cached(), 0, false, &line) >= 0);
290 assert_se(streq(line, "foo bar"));
291 line = mfree(line);
292
293 assert_se(get_process_cmdline(getpid_cached(), 0, true, &line) >= 0);
294 assert_se(streq(line, "foo bar"));
295 line = mfree(line);
296
297 assert_se(write(fd, "quux", 4) == 4);
298 assert_se(get_process_cmdline(getpid_cached(), 0, false, &line) >= 0);
299 assert_se(streq(line, "foo bar quux"));
300 line = mfree(line);
301
302 assert_se(get_process_cmdline(getpid_cached(), 0, true, &line) >= 0);
303 assert_se(streq(line, "foo bar quux"));
304 line = mfree(line);
305
306 assert_se(get_process_cmdline(getpid_cached(), 1, true, &line) >= 0);
307 assert_se(streq(line, ""));
308 line = mfree(line);
309
310 assert_se(get_process_cmdline(getpid_cached(), 2, true, &line) >= 0);
311 assert_se(streq(line, "."));
312 line = mfree(line);
313
314 assert_se(get_process_cmdline(getpid_cached(), 3, true, &line) >= 0);
315 assert_se(streq(line, ".."));
316 line = mfree(line);
317
318 assert_se(get_process_cmdline(getpid_cached(), 4, true, &line) >= 0);
319 assert_se(streq(line, "..."));
320 line = mfree(line);
321
322 assert_se(get_process_cmdline(getpid_cached(), 5, true, &line) >= 0);
323 assert_se(streq(line, "f..."));
324 line = mfree(line);
325
326 assert_se(get_process_cmdline(getpid_cached(), 6, true, &line) >= 0);
327 assert_se(streq(line, "fo..."));
328 line = mfree(line);
329
330 assert_se(get_process_cmdline(getpid_cached(), 7, true, &line) >= 0);
331 assert_se(streq(line, "foo..."));
332 line = mfree(line);
333
334 assert_se(get_process_cmdline(getpid_cached(), 8, true, &line) >= 0);
335 assert_se(streq(line, "foo..."));
336 line = mfree(line);
337
338 assert_se(get_process_cmdline(getpid_cached(), 9, true, &line) >= 0);
339 assert_se(streq(line, "foo b..."));
340 line = mfree(line);
341
342 assert_se(get_process_cmdline(getpid_cached(), 10, true, &line) >= 0);
343 assert_se(streq(line, "foo ba..."));
344 line = mfree(line);
345
346 assert_se(get_process_cmdline(getpid_cached(), 11, true, &line) >= 0);
347 assert_se(streq(line, "foo bar..."));
348 line = mfree(line);
349
350 assert_se(get_process_cmdline(getpid_cached(), 12, true, &line) >= 0);
351 assert_se(streq(line, "foo bar..."));
352 line = mfree(line);
353
354 assert_se(get_process_cmdline(getpid_cached(), 13, true, &line) >= 0);
355 assert_se(streq(line, "foo bar quux"));
356 line = mfree(line);
357
358 assert_se(get_process_cmdline(getpid_cached(), 14, true, &line) >= 0);
359 assert_se(streq(line, "foo bar quux"));
360 line = mfree(line);
361
362 assert_se(get_process_cmdline(getpid_cached(), 1000, true, &line) >= 0);
363 assert_se(streq(line, "foo bar quux"));
364 line = mfree(line);
365
366 assert_se(ftruncate(fd, 0) >= 0);
367 assert_se(prctl(PR_SET_NAME, "aaaa bbbb cccc") >= 0);
368
369 assert_se(get_process_cmdline(getpid_cached(), 0, false, &line) == -ENOENT);
370
371 assert_se(get_process_cmdline(getpid_cached(), 0, true, &line) >= 0);
372 assert_se(streq(line, "[aaaa bbbb cccc]"));
373 line = mfree(line);
374
375 assert_se(get_process_cmdline(getpid_cached(), 10, true, &line) >= 0);
376 assert_se(streq(line, "[aaaa...]"));
377 line = mfree(line);
378
379 assert_se(get_process_cmdline(getpid_cached(), 11, true, &line) >= 0);
380 assert_se(streq(line, "[aaaa...]"));
381 line = mfree(line);
382
383 assert_se(get_process_cmdline(getpid_cached(), 12, true, &line) >= 0);
384 assert_se(streq(line, "[aaaa b...]"));
385 line = mfree(line);
386
387 safe_close(fd);
388 _exit(EXIT_SUCCESS);
389 }
390
391 static void test_rename_process_now(const char *p, int ret) {
392 _cleanup_free_ char *comm = NULL, *cmdline = NULL;
393 int r;
394
395 r = rename_process(p);
396 assert_se(r == ret ||
397 (ret == 0 && r >= 0) ||
398 (ret > 0 && r > 0));
399
400 if (r < 0)
401 return;
402
403 #if HAVE_VALGRIND_VALGRIND_H
404 /* see above, valgrind is weird, we can't verify what we are doing here */
405 if (RUNNING_ON_VALGRIND)
406 return;
407 #endif
408
409 assert_se(get_process_comm(0, &comm) >= 0);
410 log_info("comm = <%s>", comm);
411 assert_se(strneq(comm, p, TASK_COMM_LEN-1));
412
413 r = get_process_cmdline(0, 0, false, &cmdline);
414 assert_se(r >= 0);
415 /* we cannot expect cmdline to be renamed properly without privileges */
416 if (geteuid() == 0) {
417 if (r == 0 && detect_container() > 0)
418 log_info("cmdline = <%s> (not verified, Running in unprivileged container?)", cmdline);
419 else {
420 log_info("cmdline = <%s>", cmdline);
421 assert_se(strneq(p, cmdline, STRLEN("test-process-util")));
422 assert_se(startswith(p, cmdline));
423 }
424 } else
425 log_info("cmdline = <%s> (not verified)", cmdline);
426 }
427
428 static void test_rename_process_one(const char *p, int ret) {
429 siginfo_t si;
430 pid_t pid;
431
432 pid = fork();
433 assert_se(pid >= 0);
434
435 if (pid == 0) {
436 /* child */
437 test_rename_process_now(p, ret);
438 _exit(EXIT_SUCCESS);
439 }
440
441 assert_se(wait_for_terminate(pid, &si) >= 0);
442 assert_se(si.si_code == CLD_EXITED);
443 assert_se(si.si_status == EXIT_SUCCESS);
444 }
445
446 static void test_rename_process_multi(void) {
447 pid_t pid;
448
449 pid = fork();
450 assert_se(pid >= 0);
451
452 if (pid > 0) {
453 siginfo_t si;
454
455 assert_se(wait_for_terminate(pid, &si) >= 0);
456 assert_se(si.si_code == CLD_EXITED);
457 assert_se(si.si_status == EXIT_SUCCESS);
458
459 return;
460 }
461
462 /* child */
463 test_rename_process_now("one", 1);
464 test_rename_process_now("more", 0); /* longer than "one", hence truncated */
465 (void) setresuid(99, 99, 99); /* change uid when running privileged */
466 test_rename_process_now("time!", 0);
467 test_rename_process_now("0", 1); /* shorter than "one", should fit */
468 test_rename_process_one("", -EINVAL);
469 test_rename_process_one(NULL, -EINVAL);
470 _exit(EXIT_SUCCESS);
471 }
472
473 static void test_rename_process(void) {
474 test_rename_process_one(NULL, -EINVAL);
475 test_rename_process_one("", -EINVAL);
476 test_rename_process_one("foo", 1); /* should always fit */
477 test_rename_process_one("this is a really really long process name, followed by some more words", 0); /* unlikely to fit */
478 test_rename_process_one("1234567", 1); /* should always fit */
479 test_rename_process_multi(); /* multiple invocations and dropped privileges */
480 }
481
482 static void test_getpid_cached(void) {
483 siginfo_t si;
484 pid_t a, b, c, d, e, f, child;
485
486 a = raw_getpid();
487 b = getpid_cached();
488 c = getpid();
489
490 assert_se(a == b && a == c);
491
492 child = fork();
493 assert_se(child >= 0);
494
495 if (child == 0) {
496 /* In child */
497 a = raw_getpid();
498 b = getpid_cached();
499 c = getpid();
500
501 assert_se(a == b && a == c);
502 _exit(EXIT_SUCCESS);
503 }
504
505 d = raw_getpid();
506 e = getpid_cached();
507 f = getpid();
508
509 assert_se(a == d && a == e && a == f);
510
511 assert_se(wait_for_terminate(child, &si) >= 0);
512 assert_se(si.si_status == 0);
513 assert_se(si.si_code == CLD_EXITED);
514 }
515
516 #define MEASURE_ITERATIONS (10000000LLU)
517
518 static void test_getpid_measure(void) {
519 unsigned long long i;
520 usec_t t, q;
521
522 t = now(CLOCK_MONOTONIC);
523 for (i = 0; i < MEASURE_ITERATIONS; i++)
524 (void) getpid();
525 q = now(CLOCK_MONOTONIC) - t;
526
527 log_info(" glibc getpid(): %llu/s\n", (unsigned long long) (MEASURE_ITERATIONS*USEC_PER_SEC/q));
528
529 t = now(CLOCK_MONOTONIC);
530 for (i = 0; i < MEASURE_ITERATIONS; i++)
531 (void) getpid_cached();
532 q = now(CLOCK_MONOTONIC) - t;
533
534 log_info("getpid_cached(): %llu/s\n", (unsigned long long) (MEASURE_ITERATIONS*USEC_PER_SEC/q));
535 }
536
537 static void test_safe_fork(void) {
538 siginfo_t status;
539 pid_t pid;
540 int r;
541
542 BLOCK_SIGNALS(SIGCHLD);
543
544 r = safe_fork("(test-child)", FORK_RESET_SIGNALS|FORK_CLOSE_ALL_FDS|FORK_DEATHSIG|FORK_NULL_STDIO|FORK_REOPEN_LOG, &pid);
545 assert_se(r >= 0);
546
547 if (r == 0) {
548 /* child */
549 usleep(100 * USEC_PER_MSEC);
550
551 _exit(88);
552 }
553
554 assert_se(wait_for_terminate(pid, &status) >= 0);
555 assert_se(status.si_code == CLD_EXITED);
556 assert_se(status.si_status == 88);
557 }
558
559 static void test_pid_to_ptr(void) {
560
561 assert_se(PTR_TO_PID(NULL) == 0);
562 assert_se(PID_TO_PTR(0) == NULL);
563
564 assert_se(PTR_TO_PID(PID_TO_PTR(1)) == 1);
565 assert_se(PTR_TO_PID(PID_TO_PTR(2)) == 2);
566 assert_se(PTR_TO_PID(PID_TO_PTR(-1)) == -1);
567 assert_se(PTR_TO_PID(PID_TO_PTR(-2)) == -2);
568
569 assert_se(PTR_TO_PID(PID_TO_PTR(INT16_MAX)) == INT16_MAX);
570 assert_se(PTR_TO_PID(PID_TO_PTR(INT16_MIN)) == INT16_MIN);
571
572 #if SIZEOF_PID_T >= 4
573 assert_se(PTR_TO_PID(PID_TO_PTR(INT32_MAX)) == INT32_MAX);
574 assert_se(PTR_TO_PID(PID_TO_PTR(INT32_MIN)) == INT32_MIN);
575 #endif
576 }
577
578 static void test_ioprio_class_from_to_string_one(const char *val, int expected) {
579 assert_se(ioprio_class_from_string(val) == expected);
580 if (expected >= 0) {
581 _cleanup_free_ char *s = NULL;
582 unsigned ret;
583
584 assert_se(ioprio_class_to_string_alloc(expected, &s) == 0);
585 /* We sometimes get a class number and sometimes a number back */
586 assert_se(streq(s, val) ||
587 safe_atou(val, &ret) == 0);
588 }
589 }
590
591 static void test_ioprio_class_from_to_string(void) {
592 test_ioprio_class_from_to_string_one("none", IOPRIO_CLASS_NONE);
593 test_ioprio_class_from_to_string_one("realtime", IOPRIO_CLASS_RT);
594 test_ioprio_class_from_to_string_one("best-effort", IOPRIO_CLASS_BE);
595 test_ioprio_class_from_to_string_one("idle", IOPRIO_CLASS_IDLE);
596 test_ioprio_class_from_to_string_one("0", 0);
597 test_ioprio_class_from_to_string_one("1", 1);
598 test_ioprio_class_from_to_string_one("7", 7);
599 test_ioprio_class_from_to_string_one("8", 8);
600 test_ioprio_class_from_to_string_one("9", -1);
601 test_ioprio_class_from_to_string_one("-1", -1);
602 }
603
604 int main(int argc, char *argv[]) {
605 test_setup_logging(LOG_DEBUG);
606
607 saved_argc = argc;
608 saved_argv = argv;
609
610 if (argc > 1) {
611 pid_t pid = 0;
612
613 (void) parse_pid(argv[1], &pid);
614 test_get_process_comm(pid);
615 } else {
616 TEST_REQ_RUNNING_SYSTEMD(test_get_process_comm(1));
617 test_get_process_comm(getpid());
618 }
619
620 test_get_process_comm_escape();
621 test_pid_is_unwaited();
622 test_pid_is_alive();
623 test_personality();
624 test_get_process_cmdline_harder();
625 test_rename_process();
626 test_getpid_cached();
627 test_getpid_measure();
628 test_safe_fork();
629 test_pid_to_ptr();
630 test_ioprio_class_from_to_string();
631
632 return 0;
633 }