tests: workaround limited semctl implementation in musl
musl libc forwards semctl command argument for 8 known commands only, for all the rest it passes 0 instead. * tests/ipc_sem.c (main): Update semctl expected output.
This commit is contained in:
parent
1bc727fc2f
commit
1ae660572f
@ -88,10 +88,15 @@ main(void)
|
||||
atexit(cleanup);
|
||||
|
||||
rc = semctl(bogus_semid, bogus_semnum, bogus_cmd, bogus_arg);
|
||||
#ifdef __GLIBC__
|
||||
# define SEMCTL_BOGUS_ARG_FMT "(%#lx|\\[(%#lx|0)\\])"
|
||||
#else
|
||||
# define SEMCTL_BOGUS_ARG_FMT "(%#lx|\\[(%#lx|0)\\]|0)"
|
||||
#endif
|
||||
printf("semctl\\(%d, %d, (IPC_64\\|)?%#x /\\* SEM_\\?\\?\\? \\*/"
|
||||
", (%#lx|\\[(%#lx|0)\\])\\) += %s\n",
|
||||
bogus_semid, bogus_semnum, bogus_cmd, bogus_arg, bogus_arg,
|
||||
sprintrc_grep(rc));
|
||||
", " SEMCTL_BOGUS_ARG_FMT "\\) += %s\n",
|
||||
bogus_semid, bogus_semnum, bogus_cmd,
|
||||
bogus_arg, bogus_arg, sprintrc_grep(rc));
|
||||
|
||||
un.buf = &ds;
|
||||
if (semctl(id, 0, IPC_STAT, un))
|
||||
|
Loading…
Reference in New Issue
Block a user