From f5b2011db9b05fcca82f6a6b3976aa1b4924b0a8 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 12 May 2007 07:44:09 +0000 Subject: [PATCH] r22813: improve error messages in RAW-NOTIFY test --- source/torture/raw/notify.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/source/torture/raw/notify.c b/source/torture/raw/notify.c index c75dbf09315..51e73f11154 100644 --- a/source/torture/raw/notify.c +++ b/source/torture/raw/notify.c @@ -489,14 +489,27 @@ static BOOL test_notify_mask(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) ((expected) & FILE_NOTIFY_CHANGE_ATTRIBUTES) && \ Action == NOTIFY_ACTION_OLD_NAME) { \ printf("(rename file special handling OK)\n"); \ - } else if (nchanges != notify.nttrans.out.num_changes || \ - notify.nttrans.out.changes[0].action != Action || \ - strcmp(notify.nttrans.out.changes[0].name.s, "tname1") != 0) { \ - printf("ERROR: nchanges=%d action=%d filter=0x%08x\n", \ + } else if (nchanges != notify.nttrans.out.num_changes) { \ + printf("ERROR: nchanges=%d expected=%d action=%d filter=0x%08x\n", \ notify.nttrans.out.num_changes, \ + nchanges, \ notify.nttrans.out.changes[0].action, \ notify.nttrans.in.completion_filter); \ ret = False; \ + } else if (notify.nttrans.out.changes[0].action != Action) { \ + printf("ERROR: nchanges=%d action=%d expectedAction=%d filter=0x%08x\n", \ + notify.nttrans.out.num_changes, \ + notify.nttrans.out.changes[0].action, \ + Action, \ + notify.nttrans.in.completion_filter); \ + ret = False; \ + } else if (strcmp(notify.nttrans.out.changes[0].name.s, "tname1") != 0) { \ + printf("ERROR: nchanges=%d action=%d filter=0x%08x name=%s\n", \ + notify.nttrans.out.num_changes, \ + notify.nttrans.out.changes[0].action, \ + notify.nttrans.in.completion_filter, \ + notify.nttrans.out.changes[0].name.s); \ + ret = False; \ } \ mask |= (1<