summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-03-02 23:23:05 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:10:54 -0500
commitc44de10a2bf4ed1d382ecf6940ffe393e92c5d27 (patch)
tree3ad15f5c0f97c0e786c3ae8ab273b011ed480bd9 /source3
parent38e020e51035c1df5e7c632e1c13d3b9111da792 (diff)
downloadsamba-c44de10a2bf4ed1d382ecf6940ffe393e92c5d27.tar.gz
samba-c44de10a2bf4ed1d382ecf6940ffe393e92c5d27.tar.bz2
samba-c44de10a2bf4ed1d382ecf6940ffe393e92c5d27.zip
r13799: Make locktest debug a little easier to read.
Jeremy. (This used to be commit 13de4d000e04ffca41814554bdee8291ddb1efe2)
Diffstat (limited to 'source3')
-rw-r--r--source3/torture/locktest.c20
1 files changed, 17 insertions, 3 deletions
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<n;i++) {
- printf("{%d, %d, %u, %u, %.0f, %.0f, %u},\n",
- recorded[i].lock_op,
- recorded[i].lock_type,
+ printf("{%s, %s, conn = %u, file = %u, start = %.0f, len = %.0f, %u},\n",
+ lock_op_name(recorded[i].lock_op),
+ lock_op_type(recorded[i].lock_type),
recorded[i].conn,
recorded[i].f,
(double)recorded[i].start,