3 # Blackbox test for SMB2 case insensitivity
8 Usage: test_smb2_not_casesensitive SERVER SERVER_IP USERNAME PASSWORD LOCAL_PATH SMBCLIENT
20 incdir=$(dirname $0)/../../../testprogs/blackbox
25 # Test a file with different case works over SMB2 and later
26 test_access_with_different_case()
28 tmpfile=$LOCAL_PATH/testfile.txt
29 echo "foobar" >$tmpfile
31 cmd='CLI_FORCE_INTERACTIVE=yes $SMBCLIENT -mSMB3 -U$USERNAME%$PASSWORD "$SERVER" -I $SERVER_IP -c "ls TeStFiLe.TxT" 2>&1'
41 echo "failed to get file with different case"
46 # Test that a rename causes a conflict works when target name exists in
51 tmpfile=$LOCAL_PATH/torename.txt
52 echo "foobar" >$tmpfile
53 targetfile=$LOCAL_PATH/target.txt
56 cmd='CLI_FORCE_INTERACTIVE=yes $SMBCLIENT -mSMB3 -U$USERNAME%$PASSWORD "$SERVER" -I $SERVER_IP -c "rename ToReNaMe.TxT TaRgEt.txt" 2>&1'
62 rm -f $LOCAL_PATH/TaRgEt.txt
64 if [ $ret = 1 -a -z "${out##*COLLISION*}" ]; then
68 echo "failed to get file with different case"
73 testit "accessing a file with different case succeeds" \
74 test_access_with_different_case ||
75 failed=$(expr $failed + 1)
77 testit "renaming a file with different case succeeds" \
79 failed=$(expr $failed + 1)