r22813: improve error messages in RAW-NOTIFY test
authorAndrew Tridgell <tridge@samba.org>
Sat, 12 May 2007 07:44:09 +0000 (07:44 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:52:20 +0000 (14:52 -0500)
(This used to be commit f5b2011db9b05fcca82f6a6b3976aa1b4924b0a8)

source4/torture/raw/notify.c

index c75dbf093150aef2280de1ecee9dc5fda7c95e31..51e73f1115434323f0fc2b6506d87a9097c99dfd 100644 (file)
@@ -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<<i); \
        } \