mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
s3:tests: Reformat xattr-tdb-1/run.sh
shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Wed Jun 22 10:10:48 UTC 2022 on sn-devel-184
This commit is contained in:
parent
5cfd0b9fdc
commit
3d57bb7450
@ -1,12 +1,12 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
if [ $# -lt 2 ]; then
|
if [ $# -lt 2 ]; then
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
Usage: run.sh VFSTEST PREFIX
|
Usage: run.sh VFSTEST PREFIX
|
||||||
EOF
|
EOF
|
||||||
exit 1;
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
TESTBASE=`dirname $0`
|
TESTBASE=$(dirname $0)
|
||||||
VFSTEST=$1
|
VFSTEST=$1
|
||||||
PREFIX=$2
|
PREFIX=$2
|
||||||
shift 2
|
shift 2
|
||||||
@ -15,7 +15,7 @@ ADDARGS="$*"
|
|||||||
VFSTEST_PREFIX=vfstest
|
VFSTEST_PREFIX=vfstest
|
||||||
VFSTEST_TMPDIR=$(mktemp -d ${PREFIX}/${VFSTEST_PREFIX}_XXXXXX)
|
VFSTEST_TMPDIR=$(mktemp -d ${PREFIX}/${VFSTEST_PREFIX}_XXXXXX)
|
||||||
|
|
||||||
incdir=`dirname $0`/../../../../testprogs/blackbox
|
incdir=$(dirname $0)/../../../../testprogs/blackbox
|
||||||
. $incdir/subunit.sh
|
. $incdir/subunit.sh
|
||||||
|
|
||||||
failed=0
|
failed=0
|
||||||
@ -24,29 +24,29 @@ cd $VFSTEST_TMPDIR || exit 1
|
|||||||
|
|
||||||
test_vfstest()
|
test_vfstest()
|
||||||
{
|
{
|
||||||
cmd='$VFSTEST -f $TESTBASE/vfstest.cmd $ADDARGS '
|
cmd='$VFSTEST -f $TESTBASE/vfstest.cmd $ADDARGS '
|
||||||
out=`eval $cmd`
|
out=$(eval $cmd)
|
||||||
ret=$?
|
ret=$?
|
||||||
rm -f $tmpfile
|
rm -f $tmpfile
|
||||||
|
|
||||||
if [ $ret != 0 ] ; then
|
if [ $ret != 0 ]; then
|
||||||
echo "$out"
|
echo "$out"
|
||||||
echo "command failed"
|
echo "command failed"
|
||||||
false
|
false
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "$out" | grep "NT_STATUS_ACCESS_DENIED" >/dev/null 2>&1
|
echo "$out" | grep "NT_STATUS_ACCESS_DENIED" >/dev/null 2>&1
|
||||||
|
|
||||||
if [ $? = 0 ] ; then
|
if [ $? = 0 ]; then
|
||||||
# got ACCESS_DENIED .. fail
|
# got ACCESS_DENIED .. fail
|
||||||
echo vfstest got NT_STATUS_ACCESS_DENIED
|
echo vfstest got NT_STATUS_ACCESS_DENIED
|
||||||
false
|
false
|
||||||
else
|
else
|
||||||
true
|
true
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
testit "vfstest" test_vfstest || failed=`expr $failed + 1`
|
testit "vfstest" test_vfstest || failed=$(expr $failed + 1)
|
||||||
|
|
||||||
exit $failed
|
exit $failed
|
||||||
|
Loading…
Reference in New Issue
Block a user