Lines Matching refs:sa
39 posix_spawnattr_t sa; in TEST() local
40 ASSERT_EQ(0, posix_spawnattr_init(&sa)); in TEST()
41 ASSERT_EQ(0, posix_spawnattr_destroy(&sa)); in TEST()
45 posix_spawnattr_t sa; in TEST() local
46 ASSERT_EQ(0, posix_spawnattr_init(&sa)); in TEST()
47 ASSERT_EQ(EINVAL, posix_spawnattr_setflags(&sa, ~0)); in TEST()
48 ASSERT_EQ(0, posix_spawnattr_destroy(&sa)); in TEST()
52 posix_spawnattr_t sa; in TEST() local
53 ASSERT_EQ(0, posix_spawnattr_init(&sa)); in TEST()
55 ASSERT_EQ(0, posix_spawnattr_setflags(&sa, POSIX_SPAWN_RESETIDS)); in TEST()
57 ASSERT_EQ(0, posix_spawnattr_getflags(&sa, &flags)); in TEST()
63 ASSERT_EQ(0, posix_spawnattr_setflags(&sa, all_flags)); in TEST()
64 ASSERT_EQ(0, posix_spawnattr_getflags(&sa, &flags)); in TEST()
67 ASSERT_EQ(0, posix_spawnattr_destroy(&sa)); in TEST()
71 posix_spawnattr_t sa; in TEST() local
72 ASSERT_EQ(0, posix_spawnattr_init(&sa)); in TEST()
74 ASSERT_EQ(0, posix_spawnattr_setpgroup(&sa, 123)); in TEST()
76 ASSERT_EQ(0, posix_spawnattr_getpgroup(&sa, &g)); in TEST()
79 ASSERT_EQ(0, posix_spawnattr_destroy(&sa)); in TEST()
83 posix_spawnattr_t sa; in TEST() local
84 ASSERT_EQ(0, posix_spawnattr_init(&sa)); in TEST()
87 ASSERT_EQ(0, posix_spawnattr_getsigmask(&sa, &sigs)); in TEST()
93 ASSERT_EQ(0, posix_spawnattr_setsigmask(&sa, &just_SIGALRM)); in TEST()
95 ASSERT_EQ(0, posix_spawnattr_getsigmask(&sa, &sigs)); in TEST()
98 ASSERT_EQ(0, posix_spawnattr_destroy(&sa)); in TEST()
102 posix_spawnattr_t sa; in TEST() local
103 ASSERT_EQ(0, posix_spawnattr_init(&sa)); in TEST()
106 ASSERT_EQ(0, posix_spawnattr_getsigmask64(&sa, &sigs)); in TEST()
112 ASSERT_EQ(0, posix_spawnattr_setsigmask64(&sa, &just_SIGRTMIN)); in TEST()
114 ASSERT_EQ(0, posix_spawnattr_getsigmask64(&sa, &sigs)); in TEST()
117 ASSERT_EQ(0, posix_spawnattr_destroy(&sa)); in TEST()
121 posix_spawnattr_t sa; in TEST() local
122 ASSERT_EQ(0, posix_spawnattr_init(&sa)); in TEST()
125 ASSERT_EQ(0, posix_spawnattr_getsigdefault(&sa, &sigs)); in TEST()
131 ASSERT_EQ(0, posix_spawnattr_setsigdefault(&sa, &just_SIGALRM)); in TEST()
133 ASSERT_EQ(0, posix_spawnattr_getsigdefault(&sa, &sigs)); in TEST()
136 ASSERT_EQ(0, posix_spawnattr_destroy(&sa)); in TEST()
140 posix_spawnattr_t sa; in TEST() local
141 ASSERT_EQ(0, posix_spawnattr_init(&sa)); in TEST()
144 ASSERT_EQ(0, posix_spawnattr_getsigdefault64(&sa, &sigs)); in TEST()
150 ASSERT_EQ(0, posix_spawnattr_setsigdefault64(&sa, &just_SIGRTMIN)); in TEST()
152 ASSERT_EQ(0, posix_spawnattr_getsigdefault64(&sa, &sigs)); in TEST()
155 ASSERT_EQ(0, posix_spawnattr_destroy(&sa)); in TEST()
159 posix_spawnattr_t sa; in TEST() local
160 ASSERT_EQ(0, posix_spawnattr_init(&sa)); in TEST()
163 ASSERT_EQ(0, posix_spawnattr_getschedparam(&sa, &sp)); in TEST()
167 ASSERT_EQ(0, posix_spawnattr_setschedparam(&sa, &sp123)); in TEST()
169 ASSERT_EQ(0, posix_spawnattr_getschedparam(&sa, &sp)); in TEST()
172 ASSERT_EQ(0, posix_spawnattr_destroy(&sa)); in TEST()
176 posix_spawnattr_t sa; in TEST() local
177 ASSERT_EQ(0, posix_spawnattr_init(&sa)); in TEST()
180 ASSERT_EQ(0, posix_spawnattr_getschedpolicy(&sa, &p)); in TEST()
183 ASSERT_EQ(0, posix_spawnattr_setschedpolicy(&sa, SCHED_FIFO)); in TEST()
185 ASSERT_EQ(0, posix_spawnattr_getschedpolicy(&sa, &p)); in TEST()
188 ASSERT_EQ(0, posix_spawnattr_destroy(&sa)); in TEST()
268 static void CatFileToString(posix_spawnattr_t* sa, const char* path, std::string* content) { in CatFileToString() argument
281 ASSERT_EQ(0, posix_spawnp(&pid, eth.GetArg0(), &fa, sa, eth.GetArgs(), nullptr)); in CatFileToString()
297 static __attribute__((unused)) void GetChildStat(posix_spawnattr_t* sa, ProcStat* ps) { in GetChildStat() argument
299 CatFileToString(sa, "/proc/self/stat", &content); in GetChildStat()
312 static void __attribute__((unused)) GetChildStatus(posix_spawnattr_t* sa, ProcStatus* ps) { in GetChildStatus() argument
314 CatFileToString(sa, "/proc/self/status", &content); in GetChildStatus()
329 posix_spawnattr_t sa; in TEST() local
330 ASSERT_EQ(0, posix_spawnattr_init(&sa)); in TEST()
331 ASSERT_EQ(0, posix_spawnattr_setflags(&sa, 0)); in TEST()
334 GetChildStat(&sa, &ps); in TEST()
336 ASSERT_EQ(0, posix_spawnattr_destroy(&sa)); in TEST()
342 posix_spawnattr_t sa; in TEST() local
343 ASSERT_EQ(0, posix_spawnattr_init(&sa)); in TEST()
344 ASSERT_EQ(0, posix_spawnattr_setflags(&sa, POSIX_SPAWN_SETSID)); in TEST()
347 GetChildStat(&sa, &ps); in TEST()
349 ASSERT_EQ(0, posix_spawnattr_destroy(&sa)); in TEST()
355 posix_spawnattr_t sa; in TEST() local
356 ASSERT_EQ(0, posix_spawnattr_init(&sa)); in TEST()
357 ASSERT_EQ(0, posix_spawnattr_setflags(&sa, 0)); in TEST()
360 GetChildStat(&sa, &ps); in TEST()
362 ASSERT_EQ(0, posix_spawnattr_destroy(&sa)); in TEST()
368 posix_spawnattr_t sa; in TEST() local
369 ASSERT_EQ(0, posix_spawnattr_init(&sa)); in TEST()
370 ASSERT_EQ(0, posix_spawnattr_setpgroup(&sa, 0)); in TEST()
371 ASSERT_EQ(0, posix_spawnattr_setflags(&sa, POSIX_SPAWN_SETPGROUP)); in TEST()
374 GetChildStat(&sa, &ps); in TEST()
378 ASSERT_EQ(0, posix_spawnattr_destroy(&sa)); in TEST()
391 posix_spawnattr_t sa; in TEST()
392 ASSERT_EQ(0, posix_spawnattr_init(&sa)); in TEST()
398 ASSERT_EQ(0, posix_spawnattr_setsigmask(&sa, &just_SIGALRM)); in TEST()
399 ASSERT_EQ(0, posix_spawnattr_setflags(&sa, POSIX_SPAWN_SETSIGMASK)); in TEST()
403 GetChildStatus(&sa, &ps); in TEST()
415 ASSERT_EQ(0, posix_spawnattr_destroy(&sa)); in TEST()
427 posix_spawnattr_t sa; in TEST()
428 ASSERT_EQ(0, posix_spawnattr_init(&sa)); in TEST()
435 ASSERT_EQ(0, posix_spawnattr_setsigdefault(&sa, &just_SIGALRM)); in TEST()
436 ASSERT_EQ(0, posix_spawnattr_setflags(&sa, POSIX_SPAWN_SETSIGDEF)); in TEST()
440 GetChildStatus(&sa, &ps); in TEST()
452 ASSERT_EQ(0, posix_spawnattr_destroy(&sa)); in TEST()