From: Jeremy Allison Date: Tue, 28 Feb 2023 19:18:10 +0000 (-0800) Subject: s3: tests: Add new test_stream_dir_rename.sh test. X-Git-Tag: talloc-2.4.1~1485 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c54bec26ad23b0121b2ddfbf04bc81050f27e6e1;p=thirdparty%2Fsamba.git s3: tests: Add new test_stream_dir_rename.sh test. Shows we are leaking an fsp/fd if we request a non-existent stream on a file. This then causes rename of a directory containing the file to be denied, as it thinks we have an existing open file below it. Add knownfail. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15314 Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/selftest/knownfail.d/stream_rename b/selftest/knownfail.d/stream_rename new file mode 100644 index 00000000000..2dccb826cd6 --- /dev/null +++ b/selftest/knownfail.d/stream_rename @@ -0,0 +1 @@ +^samba3.blackbox.stream_dir_rename.stream_rename\(fileserver\) diff --git a/source3/script/tests/test_stream_dir_rename.sh b/source3/script/tests/test_stream_dir_rename.sh new file mode 100755 index 00000000000..7ac3194f649 --- /dev/null +++ b/source3/script/tests/test_stream_dir_rename.sh @@ -0,0 +1,72 @@ +#!/bin/sh +# +# Test a stream can rename a directory once an invalid stream path below it was requested. +# BUG: https://bugzilla.samba.org/show_bug.cgi?id=15314 + +if [ $# -lt 5 ]; then + cat <$tmpfile <