diff options
author | Ralph Boehme <slow@samba.org> | 2022-03-24 17:31:00 +0100 |
---|---|---|
committer | Jule Anger <janger@samba.org> | 2022-04-11 07:49:13 +0000 |
commit | d6b48ec3795bf4bb6b7665be6ce9009932f59db6 (patch) | |
tree | d47d7c5cf1c30191d5b4e8e5544a567e1b3b4dd5 /source3 | |
parent | 829f203c2f3838d619e845d02d25c9443703ec4a (diff) | |
download | samba-d6b48ec3795bf4bb6b7665be6ce9009932f59db6.tar.gz |
CI: add a test listing a snapshotted directory
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15035
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit ba9c5ba8ec54e72d68e3f753a5350afe0fb50a7c)
Diffstat (limited to 'source3')
-rwxr-xr-x | source3/script/tests/test_shadow_copy_torture.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/source3/script/tests/test_shadow_copy_torture.sh b/source3/script/tests/test_shadow_copy_torture.sh index 4ae2f9f707f..8f9d1be6927 100755 --- a/source3/script/tests/test_shadow_copy_torture.sh +++ b/source3/script/tests/test_shadow_copy_torture.sh @@ -191,6 +191,25 @@ test_hiddenfile() return 0 } +test_shadow_copy_listdir_fix_inodes() +{ + local msg + + msg=$1 + + #delete snapshots from previous tests + find $WORKDIR -name ".snapshots" -exec rm -rf {} \; 1>/dev/null 2>&1 + build_snapshots + + testit "$msg" \ + $SMBTORTURE \ + -U$USERNAME%$PASSWORD \ + "//$SERVER/shadow_write" \ + --option="torture:twrp_snapshot=$SNAPSHOT" \ + smb2.twrp.listdir || \ + failed=`expr $failed + 1` +} + build_files $WORKDIR # test open for writing and write behaviour of snapshoted files @@ -204,4 +223,6 @@ testit "fix inodes with hardlink" test_shadow_copy_fix_inodes || failed=`expr $f testit "Test reading DOS attribute" test_hiddenfile || failed=`expr $failed + 1` +test_shadow_copy_listdir_fix_inodes "fix inodes when listing directory" + exit $failed |