Date: Sat, 11 Apr 2015 09:20:20 +0000 (UTC) From: Garrett Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r281428 - in user/ngie/more-tests: etc/mtree tests/sys/mqueue tests/sys/mqueue/mqtest1 tests/sys/mqueue/mqtest2 tests/sys/mqueue/mqtest3 tests/sys/mqueue/mqtest4 tests/sys/mqueue/mqtest... Message-ID: <201504110920.t3B9KKLA097213@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Sat Apr 11 09:20:20 2015 New Revision: 281428 URL: https://svnweb.freebsd.org/changeset/base/281428 Log: Integrate tools/regression/mqueue into the FreeBSD test suite as tests/sys/mqueue Added: user/ngie/more-tests/tests/sys/mqueue/ - copied from r281415, user/ngie/more-tests/tools/regression/mqueue/ user/ngie/more-tests/tests/sys/mqueue/mqtest1.c - copied, changed from r281415, user/ngie/more-tests/tools/regression/mqueue/mqtest1/mqtest1.c user/ngie/more-tests/tests/sys/mqueue/mqtest2.c - copied, changed from r281415, user/ngie/more-tests/tools/regression/mqueue/mqtest2/mqtest2.c user/ngie/more-tests/tests/sys/mqueue/mqtest3.c - copied, changed from r281415, user/ngie/more-tests/tools/regression/mqueue/mqtest3/mqtest3.c user/ngie/more-tests/tests/sys/mqueue/mqtest4.c - copied, changed from r281415, user/ngie/more-tests/tools/regression/mqueue/mqtest4/mqtest4.c user/ngie/more-tests/tests/sys/mqueue/mqtest5.c - copied, changed from r281415, user/ngie/more-tests/tools/regression/mqueue/mqtest5/mqtest5.c Deleted: user/ngie/more-tests/tests/sys/mqueue/mqtest1/ user/ngie/more-tests/tests/sys/mqueue/mqtest2/ user/ngie/more-tests/tests/sys/mqueue/mqtest3/ user/ngie/more-tests/tests/sys/mqueue/mqtest4/ user/ngie/more-tests/tests/sys/mqueue/mqtest5/ user/ngie/more-tests/tools/regression/mqueue/ Modified: user/ngie/more-tests/etc/mtree/BSD.tests.dist user/ngie/more-tests/tests/sys/mqueue/Makefile Modified: user/ngie/more-tests/etc/mtree/BSD.tests.dist ============================================================================== --- user/ngie/more-tests/etc/mtree/BSD.tests.dist Sat Apr 11 09:15:33 2015 (r281427) +++ user/ngie/more-tests/etc/mtree/BSD.tests.dist Sat Apr 11 09:20:20 2015 (r281428) @@ -358,6 +358,8 @@ .. kqueue .. + mqueue + .. netinet .. opencrypto Modified: user/ngie/more-tests/tests/sys/mqueue/Makefile ============================================================================== --- user/ngie/more-tests/tools/regression/mqueue/Makefile Sat Apr 11 08:27:38 2015 (r281415) +++ user/ngie/more-tests/tests/sys/mqueue/Makefile Sat Apr 11 09:20:20 2015 (r281428) @@ -1,5 +1,20 @@ # $FreeBSD$ -SUBDIR=mqtest1 mqtest2 mqtest3 mqtest4 mqtest5 +TESTSDIR= ${TESTSBASE}/sys/mqueue -.include <bsd.subdir.mk> +ATF_TESTS_SH= mqueue_test + +BINDIR= ${TESTSDIR} + +PROGS+= mqtest1 +PROGS+= mqtest2 +PROGS+= mqtest3 +PROGS+= mqtest4 +PROGS+= mqtest5 + +LDADD+= -lrt +DPADD+= ${LIBRT} + +WARNS?= 6 + +.include <bsd.test.mk> Copied and modified: user/ngie/more-tests/tests/sys/mqueue/mqtest1.c (from r281415, user/ngie/more-tests/tools/regression/mqueue/mqtest1/mqtest1.c) ============================================================================== --- user/ngie/more-tests/tools/regression/mqueue/mqtest1/mqtest1.c Sat Apr 11 08:27:38 2015 (r281415, copy source) +++ user/ngie/more-tests/tests/sys/mqueue/mqtest1.c Sat Apr 11 09:20:20 2015 (r281428) @@ -9,7 +9,8 @@ #define MQNAME "/mytstqueue1" -int main() +int +main(void) { struct mq_attr attr, attr2; struct sigevent sigev; Copied and modified: user/ngie/more-tests/tests/sys/mqueue/mqtest2.c (from r281415, user/ngie/more-tests/tools/regression/mqueue/mqtest2/mqtest2.c) ============================================================================== --- user/ngie/more-tests/tools/regression/mqueue/mqtest2/mqtest2.c Sat Apr 11 08:27:38 2015 (r281415, copy source) +++ user/ngie/more-tests/tests/sys/mqueue/mqtest2.c Sat Apr 11 09:20:20 2015 (r281428) @@ -14,17 +14,20 @@ #define LOOPS 1000 #define PRIO 10 -void alarmhandler(int sig) +static void +alarmhandler(int sig __unused) { write(1, "timeout\n", 8); _exit(1); } -int main() +int +main(void) { struct mq_attr attr; mqd_t mq; - int status, pid; + int status; + pid_t pid; mq_unlink(MQNAME); @@ -38,8 +41,9 @@ int main() err(1, "mq_getattr"); pid = fork(); if (pid == 0) { /* child */ - int prio, j, i; char *buf; + int j, i; + unsigned int prio; mq_close(mq); @@ -69,7 +73,7 @@ int main() err(1, "fork()"); } else { char *buf; - int i, j, prio; + int i, j; signal(SIGALRM, alarmhandler); buf = malloc(attr.mq_msgsize); Copied and modified: user/ngie/more-tests/tests/sys/mqueue/mqtest3.c (from r281415, user/ngie/more-tests/tools/regression/mqueue/mqtest3/mqtest3.c) ============================================================================== --- user/ngie/more-tests/tools/regression/mqueue/mqtest3/mqtest3.c Sat Apr 11 08:27:38 2015 (r281415, copy source) +++ user/ngie/more-tests/tests/sys/mqueue/mqtest3.c Sat Apr 11 09:20:20 2015 (r281428) @@ -15,19 +15,21 @@ #define LOOPS 1000 #define PRIO 10 -void sighandler(int sig) +static void +sighandler(int sig __unused) { write(1, "timeout\n", 8); _exit(1); } -int main() +int +main(void) { - mqd_t mq; - int status; - struct mq_attr attr; - int pid; fd_set set; + struct mq_attr attr; + int status; + mqd_t mq; + pid_t pid; mq_unlink(MQNAME); @@ -42,8 +44,9 @@ int main() pid = fork(); if (pid == 0) { /* child */ - int prio, j, i; char *buf; + int j, i; + unsigned int prio; mq_close(mq); @@ -77,7 +80,7 @@ int main() err(1, "fork()"); } else { char *buf; - int i, j, prio; + int i, j; signal(SIGALRM, sighandler); buf = malloc(attr.mq_msgsize); Copied and modified: user/ngie/more-tests/tests/sys/mqueue/mqtest4.c (from r281415, user/ngie/more-tests/tools/regression/mqueue/mqtest4/mqtest4.c) ============================================================================== --- user/ngie/more-tests/tools/regression/mqueue/mqtest4/mqtest4.c Sat Apr 11 08:27:38 2015 (r281415, copy source) +++ user/ngie/more-tests/tests/sys/mqueue/mqtest4.c Sat Apr 11 09:20:20 2015 (r281428) @@ -16,21 +16,21 @@ #define LOOPS 1000 #define PRIO 10 -void sighandler(int sig) +static void +sighandler(int sig __unused) { write(1, "timeout\n", 8); _exit(1); } -int main() +int +main(void) { - mqd_t mq; - int status; - struct mq_attr attr; - int pid; - fd_set set; - int kq; struct kevent kev; + struct mq_attr attr; + mqd_t mq; + int kq, status; + pid_t pid; mq_unlink(MQNAME); @@ -44,8 +44,9 @@ int main() err(1, "mq_getattr()"); pid = fork(); if (pid == 0) { /* child */ - int prio, j, i; char *buf; + int j, i; + unsigned int prio; mq_close(mq); kq = kqueue(); @@ -80,7 +81,7 @@ int main() err(1, "fork()"); } else { char *buf; - int i, j, prio; + int i, j; signal(SIGALRM, sighandler); kq = kqueue(); Copied and modified: user/ngie/more-tests/tests/sys/mqueue/mqtest5.c (from r281415, user/ngie/more-tests/tools/regression/mqueue/mqtest5/mqtest5.c) ============================================================================== --- user/ngie/more-tests/tools/regression/mqueue/mqtest5/mqtest5.c Sat Apr 11 08:27:38 2015 (r281415, copy source) +++ user/ngie/more-tests/tests/sys/mqueue/mqtest5.c Sat Apr 11 09:20:20 2015 (r281428) @@ -16,21 +16,23 @@ #define LOOPS 1000 #define PRIO 10 -void sighandler(int sig) +static void +sighandler(int sig __unused) { write(1, "timeout\n", 8); _exit(1); } -int main() +int +main(void) { - mqd_t mq; int status; struct mq_attr attr; - int pid; - sigset_t set; struct sigaction sa; + sigset_t set; siginfo_t info; + mqd_t mq; + pid_t pid; mq_unlink(MQNAME); @@ -95,7 +97,7 @@ int main() err(1, "fork()"); } else { char *buf; - int i, j, prio; + int i, j; signal(SIGALRM, sighandler); buf = malloc(attr.mq_msgsize);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504110920.t3B9KKLA097213>