diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 17:47:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 17:47:29 +0000 |
commit | 4f5791ebd03eaec1c7da0865a383175b05102712 (patch) | |
tree | 8ce7b00f7a76baa386372422adebbe64510812d4 /source3/script/tests/xattr-tdb-1/run.sh | |
parent | Initial commit. (diff) | |
download | samba-upstream.tar.xz samba-upstream.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 '')
-rwxr-xr-x | source3/script/tests/xattr-tdb-1/run.sh | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/source3/script/tests/xattr-tdb-1/run.sh b/source3/script/tests/xattr-tdb-1/run.sh new file mode 100755 index 0000000..eb32a95 --- /dev/null +++ b/source3/script/tests/xattr-tdb-1/run.sh @@ -0,0 +1,52 @@ +#!/bin/sh +if [ $# -lt 2 ]; then + cat <<EOF +Usage: run.sh VFSTEST PREFIX +EOF + exit 1 +fi + +TESTBASE=$(dirname $0) +VFSTEST=$1 +PREFIX=$2 +shift 2 +ADDARGS="$*" + +VFSTEST_PREFIX=vfstest +VFSTEST_TMPDIR=$(mktemp -d ${PREFIX}/${VFSTEST_PREFIX}_XXXXXX) + +incdir=$(dirname $0)/../../../../testprogs/blackbox +. $incdir/subunit.sh + +failed=0 + +cd $VFSTEST_TMPDIR || exit 1 + +test_vfstest() +{ + cmd='$VFSTEST -f $TESTBASE/vfstest.cmd $ADDARGS ' + out=$(eval $cmd) + ret=$? + rm -f $tmpfile + + if [ $ret != 0 ]; then + echo "$out" + echo "command failed" + false + return + fi + + echo "$out" | grep "NT_STATUS_ACCESS_DENIED" >/dev/null 2>&1 + + if [ $? = 0 ]; then + # got ACCESS_DENIED .. fail + echo vfstest got NT_STATUS_ACCESS_DENIED + false + else + true + fi +} + +testit "vfstest" test_vfstest || failed=$(expr $failed + 1) + +exit $failed |