From c09d1a3ac1c8790a4162b22698616baa2ba484d5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B6rn=20Jacke?= Date: Tue, 9 Jan 2024 01:14:39 +0100 Subject: [PATCH] tests: add a test for "fake directory create times" Signed-off-by: Bjoern Jacke Reviewed-by: Volker Lendecke Autobuild-User(master): Volker Lendecke Autobuild-Date(master): Tue Jan 16 15:44:10 UTC 2024 on atb-devel-224 --- selftest/target/Samba3.pm | 8 +++ source3/script/tests/test_fakedircreatetimes.sh | 65 +++++++++++++++++++++++++ source3/selftest/tests.py | 1 + 3 files changed, 74 insertions(+) create mode 100755 source3/script/tests/test_fakedircreatetimes.sh diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm index 86165240b7f..5b3d31ea535 100755 --- a/selftest/target/Samba3.pm +++ b/selftest/target/Samba3.pm @@ -2693,6 +2693,9 @@ sub provision($$) my $recycle_shrdir="$shrdir/recycle"; push(@dirs,$recycle_shrdir); + my $fakedircreatetimes_shrdir="$shrdir/fakedircreatetimes"; + push(@dirs,$fakedircreatetimes_shrdir); + # this gets autocreated by winbindd my $wbsockdir="$prefix_abs/wbsock"; @@ -3617,6 +3620,11 @@ sub provision($$) recycle : exclude = *.tmp recycle : directory_mode = 755 +[fakedircreatetimes] + copy = tmp + path = $fakedircreatetimes_shrdir + fake directory create times = yes + [smbget_guest] path = $smbget_sharedir comment = smb username is [%U] diff --git a/source3/script/tests/test_fakedircreatetimes.sh b/source3/script/tests/test_fakedircreatetimes.sh new file mode 100755 index 00000000000..4ce2bcffc90 --- /dev/null +++ b/source3/script/tests/test_fakedircreatetimes.sh @@ -0,0 +1,65 @@ +#!/bin/sh + +if [ $# -lt 7 ]; then + cat <