]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-tests: Add required_error() to match on error codes
authorAmitay Isaacs <amitay@gmail.com>
Tue, 10 Jul 2018 08:47:27 +0000 (18:47 +1000)
committerMartin Schwenke <martins@samba.org>
Sat, 28 Jul 2018 01:50:10 +0000 (03:50 +0200)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13520

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/tests/scripts/unit.sh

index 8e72803815df8af3c73c8b89d4a74bded50211ff..e9476aef07557e6bb11c0d8e2cf38387f9d26c41 100644 (file)
@@ -30,6 +30,13 @@ required_result ()
     fi
 }
 
+required_error ()
+{
+       rc=$(errcode $1)
+       shift
+       required_result $rc "$@"
+}
+
 ok ()
 {
     required_result 0 "$@"