From 007a9a5cdc5ad376d2a564189f4352144b0e2e80 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 5 Feb 2002 03:55:20 +0000 Subject: - only show 1 cleanup msg per client - show client count in progress (This used to be commit 10ee1d22e606847d40fb013c694ed5733ef6b87b) --- source3/torture/nbio.c | 20 ++++++++++++++++---- source3/torture/torture.c | 4 +--- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/source3/torture/nbio.c b/source3/torture/nbio.c index 3262fdab6a..7ce709dedd 100644 --- a/source3/torture/nbio.c +++ b/source3/torture/nbio.c @@ -39,6 +39,7 @@ static struct { static struct { double bytes_in, bytes_out; int line; + int done; } *children; double nbio_total(void) @@ -54,14 +55,15 @@ double nbio_total(void) void nb_alarm(void) { int i; - int lines=0; + int lines=0, num_clients=0; if (nbio_id != -1) return; for (i=0;iname); if (finfo->mode & aDIR) { - nb_deltree(s); + char *s2; + asprintf(&s2, "%s\\*", s); + cli_list(c, s2, aDIR, delete_fn, NULL); + nb_rmdir(s); } else { total_deleted++; nb_unlink(s); @@ -277,10 +283,16 @@ void nb_deltree(char *dname) asprintf(&mask, "%s\\*", dname); total_deleted = 0; - cli_list(c, mask, aDIR, delete_fn, NULL); free(mask); cli_rmdir(c, dname); if (total_deleted) printf("WARNING: Cleaned up %d files\n", total_deleted); } + + +void nb_cleanup(void) +{ + cli_rmdir(c, "clients"); + children[nbio_id].done = 1; +} diff --git a/source3/torture/torture.c b/source3/torture/torture.c index 7233e2799b..fa8e43b705 100644 --- a/source3/torture/torture.c +++ b/source3/torture/torture.c @@ -709,9 +709,7 @@ static BOOL run_netbench(int client) } fclose(f); - slprintf(fname,sizeof(fname), "clients/client%d", client); - rmdir(fname); - rmdir("clients"); + nb_cleanup(); if (!torture_close_connection(&cli)) { correct = False; -- cgit