selftest: fix test_dfree_quota.sh
authorUri Simchoni <uri@samba.org>
Wed, 27 Jan 2016 19:47:30 +0000 (21:47 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 27 Jan 2016 21:02:08 +0000 (22:02 +0100)
Eliminate backslashes from smbcquotas output so that we
don't have to deal with them correctly when parsing the output.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11697

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/script/tests/test_dfree_quota.sh

index bc01b9928e098eb4dea7ebd59e1d2d0c9c4364cd..6240b563926dfc09606b0bcde7d1f448df5d367e 100755 (executable)
@@ -130,10 +130,10 @@ test_smbcquotas() {
     shift
        subunit_start_test "$name"
     setup_conf "$conf" "."
-       output=$($VALGRIND $smbcquotas //$SERVER/dfq $@ 2>/dev/null)
+       output=$($VALGRIND $smbcquotas //$SERVER/dfq $@ 2>/dev/null | tr '\\' '/')
        status=$?
        if [ "$status" = "0" ]; then
-               received=$(echo "$output" | awk "/$SERVER\\\\$user/ {printf \"%s%s%s\", \$3, \$4, \$5}")
+               received=$(echo "$output" | awk "/$SERVER\\/$user/ {printf \"%s%s%s\", \$3, \$4, \$5}")
                if [ "$expected" = "$received" ]; then
                        subunit_pass_test "$name"
                else