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
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");