summaryrefslogtreecommitdiffstats
path: root/testprogs/blackbox/test_smbtorture_test_names.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 17:47:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 17:47:29 +0000
commit4f5791ebd03eaec1c7da0865a383175b05102712 (patch)
tree8ce7b00f7a76baa386372422adebbe64510812d4 /testprogs/blackbox/test_smbtorture_test_names.sh
parentInitial commit. (diff)
downloadsamba-4f5791ebd03eaec1c7da0865a383175b05102712.tar.xz
samba-4f5791ebd03eaec1c7da0865a383175b05102712.zip
Adding upstream version 2:4.17.12+dfsg.upstream/2%4.17.12+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testprogs/blackbox/test_smbtorture_test_names.sh')
-rwxr-xr-xtestprogs/blackbox/test_smbtorture_test_names.sh43
1 files changed, 43 insertions, 0 deletions
diff --git a/testprogs/blackbox/test_smbtorture_test_names.sh b/testprogs/blackbox/test_smbtorture_test_names.sh
new file mode 100755
index 0000000..a451310
--- /dev/null
+++ b/testprogs/blackbox/test_smbtorture_test_names.sh
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+#Tests if the --fullname parameter passed to smbtorture is working as expected.
+
+if [ $# -ne 1 ]; then
+cat <<EOF
+Usage: test_smbtorture_test_names.sh SMBTORTURE
+EOF
+exit 1;
+fi
+
+SMBTORTURE="$1 //a/b"
+
+. `dirname $0`/subunit.sh
+
+failed=0
+
+testit_grep "with_shortname local.smbtorture.level1.level2.level3.always_pass" \
+ '^success: always_pass$' \
+ $SMBTORTURE local.smbtorture.level1.level2.level3.always_pass || failed=`expr $failed + 1`
+testit_grep "with_shortname local.smbtorture.level1.level2.level3" \
+ '^success: always_pass$' \
+ $SMBTORTURE local.smbtorture.level1.level2.level3 || failed=`expr $failed + 1`
+testit_grep "with_shortname local.smbtorture.level1.level2"\
+ '^success: level3.always_pass$' \
+ $SMBTORTURE local.smbtorture.level1.level2 || failed=`expr $failed + 1`
+testit_grep "with_shortname local.smbtorture.level1" \
+ '^success: level2.level3.always_pass$' \
+ $SMBTORTURE local.smbtorture.level1 || failed=`expr $failed + 1`
+testit_grep "with_fullname local.smbtorture.level1.level2.level3.always_pass" \
+ '^success: local.smbtorture.level1.level2.level3.always_pass$' \
+ $SMBTORTURE --fullname local.smbtorture.level1.level2.level3.always_pass || failed=`expr $failed + 1`
+testit_grep "with_fullname local.smbtorture.level1.level2.level3" \
+ '^success: local.smbtorture.level1.level2.level3.always_pass$' \
+ $SMBTORTURE --fullname local.smbtorture.level1.level2.level3 || failed=`expr $failed + 1`
+testit_grep "with_fullname local.smbtorture.level1.level2" \
+ '^success: local.smbtorture.level1.level2.level3.always_pass$' \
+ $SMBTORTURE --fullname local.smbtorture.level1.level2 || failed=`expr $failed + 1`
+testit_grep "with_fullname local.smbtorture.level1" \
+ '^success: local.smbtorture.level1.level2.level3.always_pass$' \
+ $SMBTORTURE --fullname local.smbtorture.level1 || failed=`expr $failed + 1`
+
+testok $0 $failed