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