From c44de10a2bf4ed1d382ecf6940ffe393e92c5d27 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 2 Mar 2006 23:23:05 +0000 Subject: r13799: Make locktest debug a little easier to read. Jeremy. (This used to be commit 13de4d000e04ffca41814554bdee8291ddb1efe2) --- source3/torture/locktest.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'source3') diff --git a/source3/torture/locktest.c b/source3/torture/locktest.c index daf791963a..b946e48666 100644 --- a/source3/torture/locktest.c +++ b/source3/torture/locktest.c @@ -51,6 +51,20 @@ static BOOL zero_zero; enum lock_op {OP_LOCK, OP_UNLOCK, OP_REOPEN}; +const char *lock_op_type(int op) +{ + if (op == WRITE_LOCK) return "write"; + else if (op == READ_LOCK) return "read"; + else return "other"; +} + +const char *lock_op_name(enum lock_op op) +{ + if (op == OP_LOCK) return "lock"; + else if (op == OP_UNLOCK) return "unlock"; + else return "reopen"; +} + struct record { enum lock_op lock_op; enum brl_type lock_type; @@ -520,9 +534,9 @@ static void test_locks(char *share[NSERVERS]) close_files(cli, fnum); for (i=0;i