From: Rishi k. K R. <ris...@li...> - 2010-04-29 13:45:31
|
The branch, next, has been updated via 8e990dfc00206bfa484ff5097127869278a46636 (commit) via 84f2e35f109a9fe6591af83be0ddbda4a5f7c78c (commit) via 5936767b86201d8409bb62a74770e60de1796adc (commit) via 742cfadb46d5fe1952396b9568c18afccdb2c489 (commit) via e6dc1b454e09e3e38532c37c3fb54c77eb3050cf (commit) via 40f8829df38ecfe64c0fcd16a6ce7b5b19b83f25 (commit) from a281aa71cbe8bf8ed9e75d8f3da85ab3bf44d021 (commit) - Log ----------------------------------------------------------------- commit 8e990dfc00206bfa484ff5097127869278a46636 Merge: a281aa71cbe8bf8ed9e75d8f3da85ab3bf44d021 84f2e35f109a9fe6591af83be0ddbda4a5f7c78c Author: Rishikesh K Rajak <ris...@li...> Date: Thu Apr 29 19:14:45 2010 +0530 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: include/mk/man.mk | 2 ++ testcases/kernel/containers/mqns/mqns.h | 2 ++ testcases/kernel/containers/mqns/mqns_01.c | 8 ++++---- testcases/kernel/containers/mqns/mqns_02.c | 16 ++++++++-------- testcases/kernel/containers/mqns/mqns_03.c | 2 +- testcases/kernel/containers/mqns/mqns_04.c | 2 +- testcases/kernel/containers/pidns/pidns30.c | 2 +- 7 files changed, 19 insertions(+), 15 deletions(-) diff --git a/include/mk/man.mk b/include/mk/man.mk index 88abc6d..f0b4525 100644 --- a/include/mk/man.mk +++ b/include/mk/man.mk @@ -28,6 +28,8 @@ include $(top_srcdir)/include/mk/env_pre.mk INSTALL_DIR := $(mandir)/man$(MANPREFIX) +INSTALL_MODE := 00644 + INSTALL_TARGETS ?= *.$(MANPREFIX) MAKE_TARGETS := diff --git a/testcases/kernel/containers/mqns/mqns.h b/testcases/kernel/containers/mqns/mqns.h index e5912d5..1c624c2 100644 --- a/testcases/kernel/containers/mqns/mqns.h +++ b/testcases/kernel/containers/mqns/mqns.h @@ -10,6 +10,8 @@ #define DEV_MQUEUE "/dev/mqueue" #define DEV_MQUEUE2 "/dev/mqueue2" #define SLASH_MQ1 "/MQ1" +#define NOSLASH_MQ1 "MQ1" #define SLASH_MQ2 "/MQ2" +#define NOSLASH_MQ2 "MQ2" #endif /* __MQNS_H */ diff --git a/testcases/kernel/containers/mqns/mqns_01.c b/testcases/kernel/containers/mqns/mqns_01.c index 7f41b2d..515ed51 100644 --- a/testcases/kernel/containers/mqns/mqns_01.c +++ b/testcases/kernel/containers/mqns/mqns_01.c @@ -55,7 +55,7 @@ int check_mqueue(void *vtest) if (read(p1[0], buf, strlen("go") + 1) < 0) tst_resm(TBROK | TERRNO, "read(p1[0], ...) failed"); - mqd = syscall(__NR_mq_open, SLASH_MQ1, O_RDONLY); + mqd = syscall(__NR_mq_open, NOSLASH_MQ1, O_RDONLY); if (mqd == -1) { if (write(p2[1], "notfnd", strlen("notfnd") + 1) < 0) tst_resm(TBROK | TERRNO, "write(p2[1], ...) failed"); @@ -86,7 +86,7 @@ main(int argc, char *argv[]) if (pipe(p1) == -1) { perror("pipe"); exit(EXIT_FAILURE); } if (pipe(p2) == -1) { perror("pipe"); exit(EXIT_FAILURE); } - mqd = syscall(__NR_mq_open, SLASH_MQ1, O_RDWR|O_CREAT|O_EXCL, 0777, + mqd = syscall(__NR_mq_open, NOSLASH_MQ1, O_RDWR|O_CREAT|O_EXCL, 0777, NULL); if (mqd == -1) { perror("mq_open"); @@ -100,7 +100,7 @@ main(int argc, char *argv[]) if (r < 0) { tst_resm(TFAIL, "failed clone/unshare\n"); mq_close(mqd); - syscall(__NR_mq_unlink, SLASH_MQ1); + syscall(__NR_mq_unlink, NOSLASH_MQ1); tst_exit(); } @@ -122,7 +122,7 @@ main(int argc, char *argv[]) /* destroy the mqueue */ mq_close(mqd); - syscall(__NR_mq_unlink, SLASH_MQ1); + syscall(__NR_mq_unlink, NOSLASH_MQ1); tst_exit(); } diff --git a/testcases/kernel/containers/mqns/mqns_02.c b/testcases/kernel/containers/mqns/mqns_02.c index aa78f65..07ab042 100644 --- a/testcases/kernel/containers/mqns/mqns_02.c +++ b/testcases/kernel/containers/mqns/mqns_02.c @@ -60,7 +60,7 @@ int check_mqueue(void *vtest) tst_resm(TBROK | TERRNO, "read(p1[0], ..) failed"); else { - mqd = syscall(__NR_mq_open, SLASH_MQ1, O_RDWR|O_CREAT|O_EXCL, + mqd = syscall(__NR_mq_open, NOSLASH_MQ1, O_RDWR|O_CREAT|O_EXCL, 0777, NULL); if (mqd == -1) { if (write(p2[1], "mqfail", strlen("mqfail") + 1) < 0) { @@ -76,7 +76,7 @@ int check_mqueue(void *vtest) else { - if (read(p1[0], buf, 5)) + if (read(p1[0], buf, 5) < 0) tst_resm(TBROK | TERRNO, "read(p1[0], ..) failed"); else { @@ -86,9 +86,9 @@ int check_mqueue(void *vtest) tst_resm(TBROK | TERRNO, "mq_close(mqd) failed"); } else if (syscall(__NR_mq_unlink, - SLASH_MQ1) < 0) { + NOSLASH_MQ1) < 0) { tst_resm(TBROK | TERRNO, - "mq_unlink(" SLASH_MQ1 + "mq_unlink(" NOSLASH_MQ1 ") failed"); } else if (write(p2[1], "done", strlen("done") + 1) @@ -142,7 +142,7 @@ int main(int argc, char *argv[]) } if (read(p2[0], buf, 7) < 0) { - tst_resm(TBROK, "read(p1[0], ..) failed"); + tst_resm(TBROK, "read(p2[0], ..) failed"); } else if (!strcmp(buf, "mqfail")) { tst_resm(TFAIL, "child process could not create mqueue\n"); umount(DEV_MQUEUE); @@ -153,15 +153,15 @@ int main(int argc, char *argv[]) tst_exit(); } else { - mqd = syscall(__NR_mq_open, SLASH_MQ1, O_RDONLY); + mqd = syscall(__NR_mq_open, NOSLASH_MQ1, O_RDONLY); if (mqd == -1) { tst_resm(TPASS, "Parent process can't see the mqueue\n"); } else { tst_resm(TFAIL, "Parent process found mqueue\n"); mq_close(mqd); } - if (write(p1[1], "cont", 5)) { - tst_resm(TBROK, "read(p1[0], ..) failed"); + if (write(p1[1], "cont", 5) < 0) { + tst_resm(TBROK, "write(p1[1], ..) failed"); } } diff --git a/testcases/kernel/containers/mqns/mqns_03.c b/testcases/kernel/containers/mqns/mqns_03.c index 3c9e83e..83db75c 100644 --- a/testcases/kernel/containers/mqns/mqns_03.c +++ b/testcases/kernel/containers/mqns/mqns_03.c @@ -63,7 +63,7 @@ int check_mqueue(void *vtest) read(p1[0], buf, 3); /* go */ - mqd = syscall(__NR_mq_open, SLASH_MQ1, O_RDWR|O_CREAT|O_EXCL, 0755, + mqd = syscall(__NR_mq_open, NOSLASH_MQ1, O_RDWR|O_CREAT|O_EXCL, 0755, NULL); if (mqd == -1) { write(p2[1], "mqfail", 7); diff --git a/testcases/kernel/containers/mqns/mqns_04.c b/testcases/kernel/containers/mqns/mqns_04.c index f6e3f51..6f4bb8f 100644 --- a/testcases/kernel/containers/mqns/mqns_04.c +++ b/testcases/kernel/containers/mqns/mqns_04.c @@ -59,7 +59,7 @@ int check_mqueue(void *vtest) read(p1[0], buf, 3); /* go */ - mqd = syscall(__NR_mq_open, SLASH_MQ1, O_RDWR|O_CREAT|O_EXCL, 0755, + mqd = syscall(__NR_mq_open, NOSLASH_MQ1, O_RDWR|O_CREAT|O_EXCL, 0755, NULL); if (mqd == -1) { write(p2[1], "mqfail", 7); diff --git a/testcases/kernel/containers/pidns/pidns30.c b/testcases/kernel/containers/pidns/pidns30.c index ea8c54c..5975b53 100644 --- a/testcases/kernel/containers/pidns/pidns30.c +++ b/testcases/kernel/containers/pidns/pidns30.c @@ -59,7 +59,7 @@ char *TCID = "pidns30"; int TST_TOTAL = 1; -char *mqname = "/mq1"; +char *mqname = "mq1"; int result = TFAIL; int errno; hooks/post-receive -- ltp |