This is an automated email from the git hooks/post-receive script.
teigland pushed a commit to branch master in repository sanlock.
The following commit(s) were added to refs/heads/master by this push: new 393fbb1 tests: sanlk_load 393fbb1 is described below
commit 393fbb12f4b4fbbf9861e17002d0b9940dc480a3 Author: David Teigland teigland@redhat.com AuthorDate: Wed Apr 3 15:46:34 2019 -0500
tests: sanlk_load --- tests/sanlk_load.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-)
diff --git a/tests/sanlk_load.c b/tests/sanlk_load.c index bc5bbd1..926ccd2 100644 --- a/tests/sanlk_load.c +++ b/tests/sanlk_load.c @@ -545,6 +545,8 @@ int do_rand_child(void) int iter = 1; int pid = getpid();
+ error_count = 0; + srandom(pid);
memset(lock_state, 0, sizeof(lock_state)); @@ -637,10 +639,13 @@ int do_rand_child(void) } display_rv(pid);
- if (error_count) + if (error_count) { + printf("pid %d done error_count %d\n", pid, error_count); exit(EXIT_FAILURE); + }
- return 0; + printf("pid %d done\n", pid); + exit(EXIT_SUCCESS); }
int do_all_child(void) @@ -898,19 +903,27 @@ int do_rand(int argc, char *argv[]) sleep(1); }
- printf("stopping pids"); + printf("stopping pids ");
for (i = 0; i < pid_count; i++) kill(children[i], SIGTERM);
while (run_count) { + status = 0; + pid = wait(&status); if (pid > 0) { run_count--; - printf(".");
- if (WEXITSTATUS(status)) + if (!WIFEXITED(status)) { + error_count++; + printf("-"); + } else if (WEXITSTATUS(status)) { error_count++; + printf("x"); + } else { + printf("."); + } } } printf("\n");
sanlock-devel@lists.fedorahosted.org