diff options
| author | Amitay Isaacs <amitay@gmail.com> | 2013-10-01 11:53:57 +1000 |
|---|---|---|
| committer | Amitay Isaacs <amitay@gmail.com> | 2013-10-08 17:10:08 +1100 |
| commit | 30f422b96045d260b6afca5a7329d295a89f405a (patch) | |
| tree | 6339493e8380cb69389077e1bafa27ddd33264dd /ctdb/tests/src | |
| parent | dae9e864616f79a88284ccfb972a05ebf4031727 (diff) | |
| download | samba-30f422b96045d260b6afca5a7329d295a89f405a.tar.gz samba-30f422b96045d260b6afca5a7329d295a89f405a.tar.xz samba-30f422b96045d260b6afca5a7329d295a89f405a.zip | |
tests: Make sure test exits with zero status on successful completion
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit af4b6b8b3222d2a3c425fcc6833db579d0cd7ffa)
Diffstat (limited to 'ctdb/tests/src')
| -rw-r--r-- | ctdb/tests/src/ctdb_transaction.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ctdb/tests/src/ctdb_transaction.c b/ctdb/tests/src/ctdb_transaction.c index 36dc07aaf9..78a63f1f12 100644 --- a/ctdb/tests/src/ctdb_transaction.c +++ b/ctdb/tests/src/ctdb_transaction.c @@ -49,7 +49,7 @@ static unsigned int pnn; static TDB_DATA old_data; -static int success = true; +static bool success = false; static void print_counters(void) { @@ -78,6 +78,7 @@ static void check_counters(struct ctdb_context *ctdb, TDB_DATA data) { int i; uint32_t *counters, *old_counters; + bool monotonous = true; counters = (uint32_t *)data.dptr; old_counters = (uint32_t *)old_data.dptr; @@ -87,7 +88,7 @@ static void check_counters(struct ctdb_context *ctdb, TDB_DATA data) if (counters[i]<old_counters[i]) { printf("[%4u] ERROR: counters has decreased for node %u From %u to %u\n", getpid(), i, old_counters[i], counters[i]); - success = false; + monotonous = false; } } @@ -98,6 +99,8 @@ static void check_counters(struct ctdb_context *ctdb, TDB_DATA data) memcpy(old_data.dptr, data.dptr, data.dsize); if (verbose) print_counters(); + + success = monotonous; } |
