summaryrefslogtreecommitdiff
path: root/source3/script
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2017-10-19 18:03:27 +0200
committerJeremy Allison <jra@samba.org>2017-10-20 03:37:30 +0200
commit1d1e1da263313ce572a1601d9b630188ba643bb4 (patch)
tree0601f4f66a8f204df8b4a83f4369eaedc99454fa /source3/script
parent5bfe93b4eba48e290b25bd30175d7a36a6a421c5 (diff)
downloadsamba-1d1e1da263313ce572a1601d9b630188ba643bb4.tar.gz
s3:tests: Fix the smblcient utimes test in Europe
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Oct 20 03:37:31 CEST 2017 on sn-devel-144
Diffstat (limited to 'source3/script')
-rwxr-xr-xsource3/script/tests/test_smbclient_s3.sh18
1 files changed, 11 insertions, 7 deletions
diff --git a/source3/script/tests/test_smbclient_s3.sh b/source3/script/tests/test_smbclient_s3.sh
index e402a2c51fe..191f3941fb7 100755
--- a/source3/script/tests/test_smbclient_s3.sh
+++ b/source3/script/tests/test_smbclient_s3.sh
@@ -1442,11 +1442,11 @@ EOF
# Now, we should have 2 identical create_time, write_time, change_time
# values, but one access_time of Jan 1 05:10:20 AM.
- out=`echo "$out" | sort | uniq`
- num_create=`echo "$out" | grep 'create_time:' | wc -l`
- num_access=`echo "$out" | grep 'access_time:' | wc -l`
- num_write=`echo "$out" | grep 'write_time:' | wc -l`
- num_change=`echo "$out" | grep 'change_time:' | wc -l`
+ out_sorted=`echo "$out" | sort | uniq`
+ num_create=`echo "$out_sorted" | grep -c 'create_time:'`
+ num_access=`echo "$out_sorted" | grep -c 'access_time:'`
+ num_write=`echo "$out_sorted" | grep -c 'write_time:'`
+ num_change=`echo "$out_sorted" | grep -c 'change_time:'`
if [ "$num_create" != "1" ]; then
echo "failed - should only get one create_time $out"
false
@@ -1467,11 +1467,15 @@ EOF
false
return
fi
- echo "$out" | grep 'access_time:.*Sun Jan.*1 05:10:20 AM 2017'
+
+ # This could be: Sun Jan 1 05:10:20 AM 2017
+ # or : Sun Jan 1 05:10:20 2017 CET
+ echo "$out" | grep 'access_time:.*Sun Jan.*1 05:10:20 .*2017.*'
ret=$?
if [ $ret -ne 0 ] ; then
echo "$out"
- echo "failed - should get access_time: Sun Jan 1 05:10:20 AM 2017"
+ echo
+ echo "failed - should get access_time: Sun Jan 1 05:10:20 [AM] 2017"
false
return
fi