CVS commit: src/tests/rump/rumpkern/h_client
Module Name:src Committed By: christos Date: Sun Jun 26 13:17:36 UTC 2011 Modified Files: src/tests/rump/rumpkern/h_client: h_stresscli.c Log Message: fix fallout from including signal.h in rump_syscallargs.h To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/tests/rump/rumpkern/h_client/h_stresscli.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/rump/rumpkern/h_client/h_stresscli.c diff -u src/tests/rump/rumpkern/h_client/h_stresscli.c:1.8 src/tests/rump/rumpkern/h_client/h_stresscli.c:1.9 --- src/tests/rump/rumpkern/h_client/h_stresscli.c:1.8 Wed Jan 12 07:32:53 2011 +++ src/tests/rump/rumpkern/h_client/h_stresscli.c Sun Jun 26 09:17:36 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: h_stresscli.c,v 1.8 2011/01/12 12:32:53 pooka Exp $ */ +/* $NetBSD: h_stresscli.c,v 1.9 2011/06/26 13:17:36 christos Exp $ */ #include #include @@ -15,6 +15,7 @@ #include #include #include +#include #include #include
CVS commit: src/tests/rump/rumpkern/h_client
Module Name:src Committed By: pooka Date: Sat Feb 19 09:56:45 UTC 2011 Modified Files: src/tests/rump/rumpkern/h_client: h_reconcli.c Log Message: set reconnect property now that it's off by default To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/rump/rumpkern/h_client/h_reconcli.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/rump/rumpkern/h_client/h_reconcli.c diff -u src/tests/rump/rumpkern/h_client/h_reconcli.c:1.1 src/tests/rump/rumpkern/h_client/h_reconcli.c:1.2 --- src/tests/rump/rumpkern/h_client/h_reconcli.c:1.1 Mon Jan 24 17:51:29 2011 +++ src/tests/rump/rumpkern/h_client/h_reconcli.c Sat Feb 19 09:56:45 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: h_reconcli.c,v 1.1 2011/01/24 17:51:29 pooka Exp $ */ +/* $NetBSD: h_reconcli.c,v 1.2 2011/02/19 09:56:45 pooka Exp $ */ #include #include @@ -93,6 +93,7 @@ srandom(time(NULL)); + rumpclient_setconnretry(RUMPCLIENT_RETRYCONN_INFTIME); if (rumpclient_init() == -1) err(1, "init");
CVS commit: src/tests/rump/rumpkern/h_client
Module Name:src Committed By: pooka Date: Mon Feb 7 20:05:09 UTC 2011 Modified Files: src/tests/rump/rumpkern/h_client: h_sigcli.c Log Message: Limit test duration based on wall time instead of loops (took a long time on slow platforms). To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/rump/rumpkern/h_client/h_sigcli.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/rump/rumpkern/h_client/h_sigcli.c diff -u src/tests/rump/rumpkern/h_client/h_sigcli.c:1.2 src/tests/rump/rumpkern/h_client/h_sigcli.c:1.3 --- src/tests/rump/rumpkern/h_client/h_sigcli.c:1.2 Mon Jan 10 19:30:21 2011 +++ src/tests/rump/rumpkern/h_client/h_sigcli.c Mon Feb 7 20:05:09 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: h_sigcli.c,v 1.2 2011/01/10 19:30:21 pooka Exp $ */ +/* $NetBSD: h_sigcli.c,v 1.3 2011/02/07 20:05:09 pooka Exp $ */ #include #include @@ -35,6 +35,7 @@ main(void) { char buf[128]; + time_t tstart; struct itimerval itv; size_t hnbsize; int i; @@ -57,13 +58,24 @@ if (setitimer(ITIMER_REAL, &itv, NULL) == -1) err(1, "itimer"); - for (i = 0; i < 2; i++) { + tstart = time(NULL); + for (i = 0;; i++) { blen = sizeof(buf); if (rump_sys___sysctl(hostnamemib, __arraycount(hostnamemib), buf, &blen, NULL, 0) == -1) err(1, "sysctl"); if (strcmp(buf, hostnamebuf) != 0) errx(1, "main hostname"); + + /* + * check every 100 cycles to avoid doing + * nothing but gettimeofday() + */ + if (i == 100) { + if (time(NULL) - tstart > 5) +break; + i = 0; + } } if (!sigexecs) {
CVS commit: src/tests/rump/rumpkern/h_client
Module Name:src Committed By: pooka Date: Wed Jan 12 11:37:45 UTC 2011 Modified Files: src/tests/rump/rumpkern/h_client: h_stresscli.c Log Message: Give the stress queen two modes: one which nicely suggests an exit and another one which keeps moet et chandon in her pretty cabinet. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/tests/rump/rumpkern/h_client/h_stresscli.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/rump/rumpkern/h_client/h_stresscli.c diff -u src/tests/rump/rumpkern/h_client/h_stresscli.c:1.6 src/tests/rump/rumpkern/h_client/h_stresscli.c:1.7 --- src/tests/rump/rumpkern/h_client/h_stresscli.c:1.6 Wed Jan 12 11:12:25 2011 +++ src/tests/rump/rumpkern/h_client/h_stresscli.c Wed Jan 12 11:37:45 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: h_stresscli.c,v 1.6 2011/01/12 11:12:25 pooka Exp $ */ +/* $NetBSD: h_stresscli.c,v 1.7 2011/01/12 11:37:45 pooka Exp $ */ #include #include @@ -69,12 +69,20 @@ pid_t apid; int ncli = 0; int i = 0, j; - int status; + int status, thesig; int rounds; - if (argc != 2) + if (argc != 2 && argc != 3) errx(1, "need roundcount"); + if (argc == 3) { + if (strcmp(argv[2], "kill") != 0) + errx(1, "optional 3rd param must be kill"); + thesig = SIGKILL; + } else { + thesig = SIGUSR1; + } + signal(SIGUSR1, signaali); memset(clis, 0, sizeof(clis)); @@ -115,16 +123,25 @@ } usleep(10); - kill(clis[i], SIGUSR1); + kill(clis[i], thesig); apid = wait(&status); if (apid != clis[i]) errx(1, "wanted pid %d, got %d\n", clis[i], apid); clis[i] = 0; ncli--; - if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) { - fprintf(stderr, "child died with 0x%x\n", status); - exit(1); + if (thesig == SIGUSR1) { + if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) { +fprintf(stderr, "child died with 0x%x\n", +status); +exit(1); + } + } else { + if (!WIFSIGNALED(status) || WTERMSIG(status) != thesig){ +fprintf(stderr, "child died with 0x%x\n", +status); +exit(1); + } } }
CVS commit: src/tests/rump/rumpkern/h_client
Module Name:src Committed By: pooka Date: Wed Jan 12 11:12:26 UTC 2011 Modified Files: src/tests/rump/rumpkern/h_client: h_stresscli.c Log Message: Establish signal handler already in parent. Otherwise the child might be killed before it has a chance to run. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/tests/rump/rumpkern/h_client/h_stresscli.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/rump/rumpkern/h_client/h_stresscli.c diff -u src/tests/rump/rumpkern/h_client/h_stresscli.c:1.5 src/tests/rump/rumpkern/h_client/h_stresscli.c:1.6 --- src/tests/rump/rumpkern/h_client/h_stresscli.c:1.5 Tue Jan 11 11:26:28 2011 +++ src/tests/rump/rumpkern/h_client/h_stresscli.c Wed Jan 12 11:12:25 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: h_stresscli.c,v 1.5 2011/01/11 11:26:28 pooka Exp $ */ +/* $NetBSD: h_stresscli.c,v 1.6 2011/01/12 11:12:25 pooka Exp $ */ #include #include @@ -75,6 +75,8 @@ if (argc != 2) errx(1, "need roundcount"); + signal(SIGUSR1, signaali); + memset(clis, 0, sizeof(clis)); for (rounds = 1; rounds < atoi(argv[1])*10; rounds++) { while (ncli < NCLI) { @@ -92,8 +94,6 @@ hostnamebuf, strlen(hostnamebuf)+1) == -1) err(1, "sethostname"); -signal(SIGUSR1, signaali); - for (j = 0; j < NTHR-1; j++) if (pthread_create(&pt[j], NULL, client, NULL) != 0)
CVS commit: src/tests/rump/rumpkern/h_client
Module Name:src Committed By: pooka Date: Tue Jan 11 11:26:28 UTC 2011 Modified Files: src/tests/rump/rumpkern/h_client: h_stresscli.c Log Message: Print some more info in an attempt to try to understand why the test fails in automated test runs but not my desktop. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/rump/rumpkern/h_client/h_stresscli.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/rump/rumpkern/h_client/h_stresscli.c diff -u src/tests/rump/rumpkern/h_client/h_stresscli.c:1.4 src/tests/rump/rumpkern/h_client/h_stresscli.c:1.5 --- src/tests/rump/rumpkern/h_client/h_stresscli.c:1.4 Mon Jan 10 19:51:37 2011 +++ src/tests/rump/rumpkern/h_client/h_stresscli.c Tue Jan 11 11:26:28 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: h_stresscli.c,v 1.4 2011/01/10 19:51:37 pooka Exp $ */ +/* $NetBSD: h_stresscli.c,v 1.5 2011/01/11 11:26:28 pooka Exp $ */ #include #include @@ -122,8 +122,10 @@ errx(1, "wanted pid %d, got %d\n", clis[i], apid); clis[i] = 0; ncli--; - if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) + if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) { + fprintf(stderr, "child died with 0x%x\n", status); exit(1); + } } for (i = 0; i < NCLI; i++)
CVS commit: src/tests/rump/rumpkern/h_client
Module Name:src Committed By: pooka Date: Mon Jan 10 19:30:22 UTC 2011 Modified Files: src/tests/rump/rumpkern/h_client: h_sigcli.c Log Message: check that we actually go into the signal handler To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/rump/rumpkern/h_client/h_sigcli.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/rump/rumpkern/h_client/h_sigcli.c diff -u src/tests/rump/rumpkern/h_client/h_sigcli.c:1.1 src/tests/rump/rumpkern/h_client/h_sigcli.c:1.2 --- src/tests/rump/rumpkern/h_client/h_sigcli.c:1.1 Thu Jan 6 07:00:28 2011 +++ src/tests/rump/rumpkern/h_client/h_sigcli.c Mon Jan 10 19:30:21 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: h_sigcli.c,v 1.1 2011/01/06 07:00:28 pooka Exp $ */ +/* $NetBSD: h_sigcli.c,v 1.2 2011/01/10 19:30:21 pooka Exp $ */ #include #include @@ -15,6 +15,8 @@ static const int hostnamemib[] = { CTL_KERN, KERN_HOSTNAME }; static char hostnamebuf[128]; +static volatile sig_atomic_t sigexecs; + static void sighand(int sig) { @@ -26,6 +28,7 @@ err(1, "sighand sysctl"); if (strcmp(buf, hostnamebuf) != 0) errx(1, "sighandler hostname"); + sigexecs++; } int @@ -62,4 +65,8 @@ if (strcmp(buf, hostnamebuf) != 0) errx(1, "main hostname"); } + + if (!sigexecs) { + printf("no signal handlers run. test busted?\n"); + } }
CVS commit: src/tests/rump/rumpkern/h_client
Module Name:src Committed By: pooka Date: Mon Jan 10 14:05:04 UTC 2011 Modified Files: src/tests/rump/rumpkern/h_client: h_stresscli.c Log Message: Don't use printf in a signal handler. XXX: it would be nice if the deadlock with malloc were a little more obvious, especially since gdb doesn't provide any clues unless you compile libpthread with -g To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/rump/rumpkern/h_client/h_stresscli.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/rump/rumpkern/h_client/h_stresscli.c diff -u src/tests/rump/rumpkern/h_client/h_stresscli.c:1.2 src/tests/rump/rumpkern/h_client/h_stresscli.c:1.3 --- src/tests/rump/rumpkern/h_client/h_stresscli.c:1.2 Thu Jan 6 06:59:25 2011 +++ src/tests/rump/rumpkern/h_client/h_stresscli.c Mon Jan 10 14:05:03 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: h_stresscli.c,v 1.2 2011/01/06 06:59:25 pooka Exp $ */ +/* $NetBSD: h_stresscli.c,v 1.3 2011/01/10 14:05:03 pooka Exp $ */ #include #include @@ -22,8 +22,6 @@ signaali(int sig) { - membar_consumer(); - printf("process did %d syscalls\n", syscalls); _exit(0); }
CVS commit: src/tests/rump/rumpkern/h_client
Module Name:src Committed By: pooka Date: Thu Jan 6 06:59:25 UTC 2011 Modified Files: src/tests/rump/rumpkern/h_client: h_stresscli.c Log Message: check that child exits with an expected status To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/rump/rumpkern/h_client/h_stresscli.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/rump/rumpkern/h_client/h_stresscli.c diff -u src/tests/rump/rumpkern/h_client/h_stresscli.c:1.1 src/tests/rump/rumpkern/h_client/h_stresscli.c:1.2 --- src/tests/rump/rumpkern/h_client/h_stresscli.c:1.1 Tue Nov 30 22:09:15 2010 +++ src/tests/rump/rumpkern/h_client/h_stresscli.c Thu Jan 6 06:59:25 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: h_stresscli.c,v 1.1 2010/11/30 22:09:15 pooka Exp $ */ +/* $NetBSD: h_stresscli.c,v 1.2 2011/01/06 06:59:25 pooka Exp $ */ #include #include @@ -118,6 +118,8 @@ errx(1, "wanted pid %d, got %d\n", clis[i], apid); clis[i] = 0; ncli--; + if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) + exit(1); } for (i = 0; i < NCLI; i++)