diff options
author | Andrew Tridgell <tridge@samba.org> | 2000-05-24 07:15:54 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2000-05-24 07:15:54 +0000 |
commit | 951492548151795acc378b7b13afca2712cbdcf0 (patch) | |
tree | f2f59479baff5c6d0d378aaf4e9eff6c1a5305c6 | |
parent | 5ca89e395283833a5215fbd6cdefbe65fdd33954 (diff) | |
download | samba-951492548151795acc378b7b13afca2712cbdcf0.tar.gz samba-951492548151795acc378b7b13afca2712cbdcf0.tar.bz2 samba-951492548151795acc378b7b13afca2712cbdcf0.zip |
added -u hide_unlock_fails option
(This used to be commit fc8c460a618c25ffa46ab808a241dab466d2666b)
-rw-r--r-- | source3/utils/locktest.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/utils/locktest.c b/source3/utils/locktest.c index 9a02cf20ca..e2d05b7aa0 100644 --- a/source3/utils/locktest.c +++ b/source3/utils/locktest.c @@ -29,6 +29,7 @@ static int got_pass; static int numops = 1000; static BOOL showall; static BOOL analyze; +static BOOL hide_unlock_fails; #define FILENAME "\\locktest.dat" #define LOCKRANGE 100 @@ -264,14 +265,14 @@ static BOOL test_one(struct cli_state *cli[2][2], ret2 = cli_unlock(cli[1][conn], fnum[1][conn][f], start, len); - if (showall || ret1 != ret2) { + if (showall || (!hide_unlock_fails && (ret1 != ret2))) { printf("unlock conn=%u f=%u range=%u:%u(%u) -> %u:%u\n", conn, f, start, start+len-1, len, ret1, ret2); } if (showall) brl_forall(print_brl); - if (ret1 != ret2) return False; + if (!hide_unlock_fails && ret1 != ret2) return False; } else { /* reopen the file */ cli_close(cli[0][conn], fnum[0][conn][f]); @@ -459,6 +460,7 @@ static void usage(void) -U user%%pass\n\ -s seed\n\ -o numops\n\ + -u hide unlock fails\n\ -a (show all ops)\n\ "); } @@ -524,6 +526,9 @@ static void usage(void) case 's': seed = atoi(optarg); break; + case 'u': + hide_unlock_fails = True; + break; case 'o': numops = atoi(optarg); break; |