[PATCH] Fix the smblcient utimes test in Europe
Jeremy Allison
jra at samba.org
Thu Oct 19 16:19:11 UTC 2017
On Thu, Oct 19, 2017 at 06:05:27PM +0200, Andreas Schneider via samba-technical wrote:
> Hi,
>
> some of us life in a different timezone!
>
> The attched patch fixes the test.
>
>
> Please review and push if OK.
Sorry, I thought of setting env TZ before that test,
but then worried it might 'stick' and cause other
tests to fail.
Thanks for the portable fix. RB+.
Cheers,
Jeremy.
>
>
> Andreas
>
> --
> Andreas Schneider GPG-ID: CC014E3D
> Samba Team asn at samba.org
> www.samba.org
> From 5fa785c3f2f1297ce947b591e4945361039db103 Mon Sep 17 00:00:00 2001
> From: Andreas Schneider <asn at samba.org>
> Date: Thu, 19 Oct 2017 18:03:27 +0200
> Subject: [PATCH] s3:tests: Fix the smblcient utimes test in Europe
>
> Signed-off-by: Andreas Schneider <asn at samba.org>
> ---
> source3/script/tests/test_smbclient_s3.sh | 18 +++++++++++-------
> 1 file 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
> --
> 2.14.2
>
More information about the samba-technical
mailing list