[PATCH] Fix the smblcient utimes test in Europe
Jeremy Allison
jra at samba.org
Tue Dec 5 01:02:57 UTC 2017
On Tue, Dec 05, 2017 at 01:11:00PM +1300, Andrew Bartlett wrote:
> On Thu, 2017-10-19 at 18:05 +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.
>
> G'Day Andreas and Jeremy,
>
> Some of us live in New Zealand as well. Could one of you please rework
> to test to set a common timezone?
Can you try this to see if it fixes it ?
-------------- next part --------------
diff --git a/source3/script/tests/test_smbclient_s3.sh b/source3/script/tests/test_smbclient_s3.sh
index d98da0dd260..84f6ef5892e 100755
--- a/source3/script/tests/test_smbclient_s3.sh
+++ b/source3/script/tests/test_smbclient_s3.sh
@@ -1419,6 +1419,10 @@ test_utimes()
{
tmpfile=$PREFIX/smbclient_interactive_prompt_commands
+ saved_TZ="$TZ"
+ TZ=UTC
+ export TZ
+
cat > $tmpfile <<EOF
del utimes_test
put ${SMBCLIENT} utimes_test
@@ -1433,6 +1437,12 @@ EOF
out=`eval $cmd`
ret=$?
+ if [ -n "$SAVED_TZ" ] ; then
+ export TZ="$SAVED_TZ"
+ else
+ unset TZ
+ fi
+
if [ $ret != 0 ] ; then
echo "$out"
echo "failed utimes test with output $ret"
More information about the samba-technical
mailing list