2020-06-26 19:35:38 +03:00
#!/bin/sh
#Tests if the --fullname parameter passed to smbtorture is working as expected.
if [ $# -ne 1 ] ; then
2022-04-22 16:46:05 +03:00
cat <<EOF
2020-06-26 19:35:38 +03:00
Usage: test_smbtorture_test_names.sh SMBTORTURE
EOF
2022-04-22 16:46:05 +03:00
exit 1
2020-06-26 19:35:38 +03:00
fi
SMBTORTURE = " $1 //a/b "
2022-04-22 16:46:05 +03:00
. $( dirname $0 ) /subunit.sh
2020-06-26 19:35:38 +03:00
failed = 0
testit_grep "with_shortname local.smbtorture.level1.level2.level3.always_pass" \
2022-04-22 16:46:05 +03:00
'^success: always_pass$' \
$SMBTORTURE local.smbtorture.level1.level2.level3.always_pass || failed = $( expr $failed + 1)
2020-06-26 19:35:38 +03:00
testit_grep "with_shortname local.smbtorture.level1.level2.level3" \
2022-04-22 16:46:05 +03:00
'^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)
2020-06-26 19:35:38 +03:00
testit_grep "with_shortname local.smbtorture.level1" \
2022-04-22 16:46:05 +03:00
'^success: level2.level3.always_pass$' \
$SMBTORTURE local.smbtorture.level1 || failed = $( expr $failed + 1)
2020-06-26 19:35:38 +03:00
testit_grep "with_fullname local.smbtorture.level1.level2.level3.always_pass" \
2022-04-22 16:46:05 +03:00
'^success: local.smbtorture.level1.level2.level3.always_pass$' \
$SMBTORTURE --fullname local.smbtorture.level1.level2.level3.always_pass || failed = $( expr $failed + 1)
2020-06-26 19:35:38 +03:00
testit_grep "with_fullname local.smbtorture.level1.level2.level3" \
2022-04-22 16:46:05 +03:00
'^success: local.smbtorture.level1.level2.level3.always_pass$' \
$SMBTORTURE --fullname local.smbtorture.level1.level2.level3 || failed = $( expr $failed + 1)
2020-06-26 19:35:38 +03:00
testit_grep "with_fullname local.smbtorture.level1.level2" \
2022-04-22 16:46:05 +03:00
'^success: local.smbtorture.level1.level2.level3.always_pass$' \
$SMBTORTURE --fullname local.smbtorture.level1.level2 || failed = $( expr $failed + 1)
2020-06-26 19:35:38 +03:00
testit_grep "with_fullname local.smbtorture.level1" \
2022-04-22 16:46:05 +03:00
'^success: local.smbtorture.level1.level2.level3.always_pass$' \
$SMBTORTURE --fullname local.smbtorture.level1 || failed = $( expr $failed + 1)
2020-06-26 19:35:38 +03:00
testok $0 $failed