mirror of
https://github.com/samba-team/samba.git
synced 2025-03-05 20:58:40 +03:00
s4/torture: fix timeval wrap in torture_libsmbclient_utimes() test
Fixes the following flapping test: UNEXPECTED(failure): samba4.libsmbclient.utimes.SMB3.utimes(nt4_dc) REASON: Exception: Exception: ../../source4/torture/libsmbclient/libsmbclient.c:1249: st.st_mtim.tv_nsec / 1000 was 98181 (0x17F85), expected 1098181 (0x10C1C5): smbc_utimes did not update msec https://gitlab.com/samba-team/devel/samba/-/jobs/506361470 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Sat Apr 11 12:24:00 UTC 2020 on sn-devel-184
This commit is contained in:
parent
c4176b1cea
commit
eab086c572
@ -1234,7 +1234,7 @@ static bool torture_libsmbclient_utimes(struct torture_context *tctx)
|
||||
tbuf[0] = convert_timespec_to_timeval(st.st_atim);
|
||||
tbuf[1] = convert_timespec_to_timeval(st.st_mtim);
|
||||
|
||||
tbuf[1].tv_usec += 100000; /* 100 msec */
|
||||
tbuf[1] = timeval_add(&tbuf[1], 0, 100000); /* 100 msec */
|
||||
|
||||
ret = smbc_utimes(smburl, tbuf);
|
||||
torture_assert_int_not_equal(tctx, ret, -1, "smbc_utimes failed");
|
||||
|
Loading…
x
Reference in New Issue
Block a user