[SCM] Samba Shared Repository - branch master updated
Martin Schwenke
martins at samba.org
Wed Mar 4 23:17:04 MST 2015
The branch, master has been updated
via 956d1db ctdb-tests: Correctly cascade test failures from the end of pipes
via 956e517 ctdb-scripts: Add a 'rm' stub so statd-callout tests work correctly
from 15a702a rpc_server: Fix CID 1273433 Unused value
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 956d1dbfd91615032de337b0d84b40c16657b8c1
Author: Amitay Isaacs <amitay at gmail.com>
Date: Thu Mar 5 13:11:46 2015 +1100
ctdb-tests: Correctly cascade test failures from the end of pipes
Some eventscript unit test failures get lost because _passed=false is
set in the tail of a pipe. Add a new function test_fail() and call it
when necessary to ensure the value of _passed is set correctly.
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Pair-programmed-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Martin Schwenke <martin at meltin.net>
Autobuild-User(master): Martin Schwenke <martins at samba.org>
Autobuild-Date(master): Thu Mar 5 07:16:54 CET 2015 on sn-devel-104
commit 956e51707d7ddcff060352f54d11ff42bdcc51ef
Author: Amitay Isaacs <amitay at gmail.com>
Date: Thu Mar 5 13:10:32 2015 +1100
ctdb-scripts: Add a 'rm' stub so statd-callout tests work correctly
statd-callout tries to remove global files from /var/lib/nfs/statd and
this causes errors in tests. Add an rm stub that ignores attempts to
remove these files but invokes /bin/rm for anything else.
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Pair-programmed-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Martin Schwenke <martin at meltin.net>
-----------------------------------------------------------------------
Summary of changes:
ctdb/tests/eventscripts/scripts/local.sh | 6 +++---
ctdb/tests/eventscripts/stubs/rm | 6 ++++++
ctdb/tests/scripts/unit.sh | 6 ++++++
3 files changed, 15 insertions(+), 3 deletions(-)
create mode 100755 ctdb/tests/eventscripts/stubs/rm
Changeset truncated at 500 lines:
diff --git a/ctdb/tests/eventscripts/scripts/local.sh b/ctdb/tests/eventscripts/scripts/local.sh
index fe4ae1e..ed99985 100644
--- a/ctdb/tests/eventscripts/scripts/local.sh
+++ b/ctdb/tests/eventscripts/scripts/local.sh
@@ -533,7 +533,7 @@ default via $_gw dev $_dev "
EOF
simple_test_command dump_routes
- }
+ } || test_fail
}
######################################################################
@@ -569,7 +569,7 @@ check_ctdb_tdb_statd_state ()
ctdb_catdb_format_pairs | {
ok
simple_test_command ctdb catdb ctdb.tdb
- }
+ } || test_fail
}
check_statd_callout_smnotify ()
@@ -592,7 +592,7 @@ EOF
done | {
ok
simple_test_event "notify"
- }
+ } || test_fail
}
######################################################################
diff --git a/ctdb/tests/eventscripts/stubs/rm b/ctdb/tests/eventscripts/stubs/rm
new file mode 100755
index 0000000..64b4d18
--- /dev/null
+++ b/ctdb/tests/eventscripts/stubs/rm
@@ -0,0 +1,6 @@
+#!/bin/sh
+# Make statd-callout happy
+case "$*" in
+ */var/lib/nfs/statd/sm*) : ;;
+ *) exec /bin/rm "$@" ;;
+esac
diff --git a/ctdb/tests/scripts/unit.sh b/ctdb/tests/scripts/unit.sh
index 38b7e21..44675ae 100644
--- a/ctdb/tests/scripts/unit.sh
+++ b/ctdb/tests/scripts/unit.sh
@@ -150,6 +150,12 @@ result_check ()
result_footer "$_passed"
}
+test_fail ()
+{
+ _passed=false
+ return 1
+}
+
local="${TEST_SUBDIR}/scripts/local.sh"
if [ -r "$local" ] ; then
. "$local"
--
Samba Shared Repository
More information about the samba-cvs
mailing list