mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
9cf3ac1d0c
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Thu Apr 13 02:44:38 CEST 2017 on sn-devel-144
34 lines
685 B
Bash
Executable File
34 lines
685 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# Blackbox test for the offline VFS module.
|
|
#
|
|
if [ $# -lt 7 ]; then
|
|
cat <<EOF
|
|
Usage: test_offline SERVER SERVER_IP DOMAIN USERNAME PASSWORD WORKDIR SMBCLIENT
|
|
EOF
|
|
exit 1;
|
|
fi
|
|
|
|
SERVER=${1}
|
|
SERVER_IP=${2}
|
|
DOMAIN=${3}
|
|
USERNAME=${4}
|
|
PASSWORD=${5}
|
|
WORKDIR=${6}
|
|
SMBCLIENT=${7}
|
|
shift 7
|
|
SMBCLIENT="$VALGRIND ${SMBCLIENT}"
|
|
ADDARGS="$*"
|
|
|
|
incdir=`dirname $0`/../../../testprogs/blackbox
|
|
. $incdir/subunit.sh
|
|
|
|
touch $WORKDIR/foo
|
|
|
|
failed=0
|
|
|
|
attribs=`$SMBCLIENT -U$USERNAME%$PASSWORD "//$SERVER/offline" -I $SERVER_IP -c "allinfo foo" | sed -n 's/^attributes:.*(\([^)]*\)).*/\1/p'`
|
|
testit "file has offline attribute" test "x$attribs" = "x1000" || failed=`expr $failed + 1`
|
|
|
|
exit $failed
|