s4:torture:basic: use milliseconds granularity in delayed_write_update7
commit682c77be74b3f996f1278648a54b33cdbb9df4de
authorAmir Goldstein <amir@ctera.com>
Thu, 9 Feb 2023 09:39:21 +0000 (9 11:39 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 1 Mar 2023 20:55:47 +0000 (1 20:55 +0000)
tree83e25bee3758e76d79c380e96431a9ba526f4fc2
parentcb9df8181e32f13f4004183d21b2b00a0149dfad
s4:torture:basic: use milliseconds granularity in delayed_write_update7

The test sets an mtime with non zero nsec and verifies that
the timestamp of pre-close matches the timestamp after close-open.

This is a regression test for
https://bugzilla.samba.org/show_bug.cgi?id=6529

The bug speaks of loosing the milliseconds part of the timestamp,
but the test uses a value of 103*100ns for the sub-second part.

Meaning that if the backing filesystem has only milliseconds
granularity, the test practically checks that a value of
0 milliseconds is preserved, which will not have actually
caught the bug.

Also, with the default 'smbd getinfo ask sharemode = yes'
the test will fail if the filesystem truncates the sub-second part
to milliseconds granularity.

Use a non-zero milliseconds value with zero microseconds in the test
to support backing filesystems with milliseconds granularity.

Signed-off-by: Amir Goldstein <amir@ctera.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Mar  1 20:55:47 UTC 2023 on atb-devel-224
source4/torture/basic/delaywrite.c