summaryrefslogtreecommitdiff
path: root/source4/torture/basic/delaywrite.c
AgeCommit message (Collapse)AuthorFilesLines
2025-03-27smbtorture: add "base.delaywrite.modern_write_time_update-1"Ralph Boehme1-1/+311
The test passes against Windows Server 2022. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13594 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2025-03-27smbtorture: adjust "base.delaywrite.delayed update of write time 6" for ↵Ralph Boehme1-62/+69
modern SMB delayed write The adjusted test passes against Windows Server 2022. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13594 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2025-03-27smbtorture: adjust "base.delaywrite.delayed update of write time 5b" for ↵Ralph Boehme1-3/+3
modern SMB delayed write No need to run the loops for so long with modern write time behaviour. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13594 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2025-03-27smbtorture: adjust "base.delaywrite.delayed update of write time 5" for ↵Ralph Boehme1-32/+20
modern SMB delayed write The adjusted test passes against Windows Server 2022. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13594 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2025-03-27smbtorture: adjust "base.delaywrite.delayed update of write time 4" for ↵Ralph Boehme1-57/+26
modern SMB delayed write The adjusted test passes against Windows Server 2022. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13594 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2025-03-27smbtorture: adjust "base.delaywrite.delayed update of write time 3c" for ↵Ralph Boehme1-49/+36
modern SMB delayed write The adjusted test passes against Windows Server 2022. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13594 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2025-03-27smbtorture: adjust "base.delaywrite.delayed update of write time 3b" for ↵Ralph Boehme1-61/+45
modern SMB delayed write The adjusted test passes against Windows Server 2022. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13594 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2025-03-27smbtorture: adjust "base.delaywrite.delayed update of write time 3a" for ↵Ralph Boehme1-65/+35
modern SMB delayed write The adjusted test passes against Windows Server 2022. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13594 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2025-03-27smbtorture: adjust "base.delaywrite.delayed update of write time 3" for ↵Ralph Boehme1-48/+37
modern SMB delayed write The adjusted test passes against Windows Server 2022. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13594 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2025-03-27smbtorture: adjust "base.delaywrite.delayed update of write time using 2 ↵Ralph Boehme1-82/+40
connections" for modern SMB delayed write The adjusted test passes against Windows Server 2022. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13594 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2025-03-27smbtorture: adjust "base.delaywrite.update of write time using ↵Ralph Boehme1-77/+29
SET_ALLOCATION_SIZE" for modern SMB delayed write The adjusted test passes against Windows Server 2022. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13594 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2025-03-27smbtorture: adjust "base.delaywrite.update of write time using ↵Ralph Boehme1-80/+35
SET_END_OF_FILE" for modern SMB delayed write The adjusted test passes against Windows Server 2022. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13594 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2025-03-27smbtorture: adjust "base.delaywrite.update of write time and SMBwrite ↵Ralph Boehme1-82/+28
truncate expand" for modern SMB delayed write The adjusted test passes against Windows Server 2022. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13594 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2025-03-27smbtorture: adjust "base.delaywrite.update of write time and SMBwrite ↵Ralph Boehme1-22/+15
truncate" for modern SMB delayed write The adjusted test passes against Windows Server 2022. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13594 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2025-03-27smbtorture: adjust "base.delaywrite.delayed update of write time" for modern ↵Ralph Boehme1-35/+7
SMB delayed write The adjusted test passes against Windows Server 2022. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13594 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2025-03-27smbtorture: adjust "base.delaywrite.finfo update on close" for modern SMB ↵Ralph Boehme1-11/+4
delayed write The adjusted test passes against Windows Server 2022. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13594 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2025-03-27smbtorture: change variable name in SET_INFO_FILE_EX macroRalph Boehme1-9/+9
Allows using the variable name sfinfo in functions that use the macro. No change in behaviour. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13594 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2025-03-27smbtorture: whitespace in test_delayed_write_update2()Ralph Boehme1-17/+17
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13594 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2023-08-14s4:torture:basic: Fix code spellingAndreas Schneider1-4/+4
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-03-01s4:torture:basic: use milliseconds granularity in delayed_write_update7Amir Goldstein1-3/+4
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
2023-03-01s4:torture:basic: fix SET_INFO_* macros in delayed_write_update*Amir Goldstein1-3/+3
The macros were ignoring the finfo argument. Signed-off-by: Amir Goldstein <amir@ctera.com> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2019-09-01Spelling fixes s/ upto / up to /Mathieu Parent1-4/+4
Signed-off-by: Mathieu Parent <math.parent@gmail.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2018-05-12Fix spelling s/doens't/doesn't/Mathieu Parent1-1/+1
Signed-off-by: Mathieu Parent <math.parent@gmail.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2017-07-08delete duplicate testHerb Lewis1-1/+0
Signed-off-by: Herb Lewis <herb@samba.org> Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com> Autobuild-User(master): Herb Lewis <herb@samba.org> Autobuild-Date(master): Sat Jul 8 05:57:55 CEST 2017 on sn-devel-144
2017-05-05s4: torture: Pass TALLOC_CTX * to torture_delay_write().Jeremy Allison1-2/+2
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
2014-10-03s4:torture:basic: eliminate potential for false failures in ↵Michael Adam1-18/+18
delayed_write_update1c We want to test that the write did update the write time immediately. We check this by getting the file info in a loop for a few seconds. There are several result cases: - the server updated the write time immediately - success - the server updated the write time, but not immediately - failure - the server did not update the write time - failure The loop is only there to be able to discern between the two failure cases. The check for success is whether the first getinfo has reportet the updated write time. The potential for false failures was the additional timing check. So if the first fileinfo call just took too long (e.g. due to a busy system), this was reported as failure. This patch should eliminate interemittent autobuild failures. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-10-03s4:torture:basic: use assert in the second loop in delayed_write_update1bMichael Adam1-11/+10
We can hence replace the assert after the loop by a success torture_comment. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-10-03s4:torture:basic: add check for size after initial write in ↵Michael Adam1-0/+3
delayed_write_update1c Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-10-03s4:torture:basic: add update into past as error condition in ↵Michael Adam1-3/+4
delayed_write_update1c Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-10-03s4:torture:basic: make use of torture_assert macros in delayed_write_update1cMichael Adam1-42/+23
This does not change the logic except for adding early returns in failure cases. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-10-03s4:torture:basic: whitespace cleanup in delayed_write_update1cMichael Adam1-7/+7
no diff with git diff -w Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-10-03s4:torture:basic: eliminate potential for false failures in ↵Michael Adam1-19/+18
delayed_write_update1b We want to test that the write did update the write time immediately. We check this by getting the file info in a loop for a few seconds. There are several result cases: - the server updated the write time immediately - success - the server updated the write time, but not immediately - failure - the server did not update the write time - failure The loop is only there to be able to discern between the two failure cases. The check for success is whether the first getinfo has reportet the updated write time. The potential for false failures was the additional timing check. So if the first fileinfo call just took too long (e.g. due to a busy system), this was reported as failure. This patch should eliminate interemittent autobuild failures. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-10-03s4:torture:basic: use assert in the second loop in delayed_write_update1bMichael Adam1-11/+10
We can hence replace the assert after the loop by a success torture_comment. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-10-03s4:torture:basic: add check for size after initial write in ↵Michael Adam1-0/+3
delayed_write_update1b Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-10-03s4:torture:basic: add update into past as error condition in ↵Michael Adam1-3/+6
delayed_write_update1b Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-10-03s4:torture:basic: make use of torture_assert macros in delayed_write_update1bMichael Adam1-41/+24
This does not change the logic except for adding early returns in failure cases. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-10-03s4:torture:basic: whitespace cleanup in delayed_write_update1bMichael Adam1-5/+5
no diff with git diff -w Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-10-03s4:torture:basic: eliminate potential for false failures in ↵Michael Adam1-19/+18
delayed_write_update1a We want to test that the write did update the write time immediately. We check this by getting the file info in a loop for a few seconds. There are several result cases: - the server updated the write time immediately - success - the server updated the write time, but not immediately - failure - the server did not update the write time - failure The loop is only there to be able to discern between the two failure cases. The check for success is whether the first getinfo has reportet the updated write time. The potential for false failures was the additional timing check. So if the first fileinfo call just took too long (e.g. due to a busy system), this was reported as failure. This patch should eliminate interemittent autobuild failures. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-10-03s4:torture:basic: use assert in the second loop in delayed_write_update1aMichael Adam1-11/+10
We can hence replace the assert after the loop by a success torture_comment. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-10-03s4:torture:basic: add check for size after initial write in ↵Michael Adam1-0/+3
delayed_write_update1a Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-10-03s4:torture:basic: add update into past as error condition in ↵Michael Adam1-3/+6
delayed_write_update1a Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-10-03s4:torture:basic: make use of torture_assert macros in delayed_write_update1aMichael Adam1-50/+27
This does not change the logic except for adding early returns in failure cases. But it makes the code more compact and obvious. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-10-03s4:torture:basic: fix spacing in the delayed_write_update1a test.Michael Adam1-6/+6
No diff visible with git diff -w Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-10-03s4:torture:basic: eliminate potential for false failures in ↵Michael Adam1-18/+18
delayed_write_update1 We want to test that the write did update the write time immediately. We check this by getting the file info in a loop for a few seconds. There are several result cases: - the server updated the write time immediately - success - the server updated the write time, but not immediately - failure - the server did not update the write time - failure The loop is only there to be able to discern between the two failure cases. The check for success is whether the first getinfo has reportet the updated write time. The potential for false failures was the additional timing check. So if the first fileinfo call just took too long (e.g. due to a busy system), this was reported as failure. This patch should eliminate interemittent autobuild failures. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-10-03s4:torture:basic: use assert in the second loop in delayed_write_update1Michael Adam1-11/+10
We can hence replace the assert after the loop by a success torture_comment. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-10-03s4:torture:basic: add check for size after initial write to ↵Michael Adam1-0/+3
delayed_write_update1 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-10-03s4:torture:basic: add update into past as error condition in ↵Michael Adam1-3/+6
delayed_write_update1 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-10-03s4:torture:basic: make use of torture_assert macros in delayed_write_update1Michael Adam1-56/+28
No logic change except for adding early returns. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-10-03s4:torture:basic: whitespace fix in delayed_write_update1Michael Adam1-4/+4
No diff with git diff -w Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-10-03s4:torture:basic: remove two unused variables from delayed_write_update3cMichael Adam1-4/+2
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>