From: Monson S. <js...@re...> - 2012-12-25 07:26:23
|
'man 3 mq_open' said mq_open() can take 2 or 4 arguments, but the implement syscall(__NR_mq_open, ...) takes 4, according to [1]. Manually tested on kernel-3.6.0 with glibc-2.16 . [1] glibc/sysdeps/unix/sysv/linux/mq_open.c:55 Signed-off-by: Monson Shao <js...@re...> --- testcases/kernel/containers/pidns/pidns30.c | 2 +- testcases/kernel/containers/pidns/pidns31.c | 2 +- 2 个文件被修改,插入 2 行(+),删除 2 行(-) diff --git a/testcases/kernel/containers/pidns/pidns30.c b/testcases/kernel/containers/pidns/pidns30.c index 71e87c1..75c736b 100644 --- a/testcases/kernel/containers/pidns/pidns30.c +++ b/testcases/kernel/containers/pidns/pidns30.c @@ -186,7 +186,7 @@ int child_fn(void *arg) while (read(father_to_child[0], buf, 1) != 1) sleep(1); - mqd = syscall(__NR_mq_open, mqname, O_RDONLY); + mqd = syscall(__NR_mq_open, mqname, O_RDONLY, 0, NULL); if (mqd == -1) { perror("mq_open failed"); return 1; diff --git a/testcases/kernel/containers/pidns/pidns31.c b/testcases/kernel/containers/pidns/pidns31.c index 2a07489..1498d16 100644 --- a/testcases/kernel/containers/pidns/pidns31.c +++ b/testcases/kernel/containers/pidns/pidns31.c @@ -177,7 +177,7 @@ int child_fn(void *arg) } tst_resm(TINFO, "cinit: my father is ready to receive a message"); - mqd = syscall(__NR_mq_open, mqname, O_WRONLY); + mqd = syscall(__NR_mq_open, mqname, O_WRONLY, 0, NULL); if (mqd == (mqd_t) - 1) { tst_resm(TBROK, "cinit: mq_open() failed (%s)", strerror(errno)); -- 1.7.11.7 |