]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Add CLI Test 3541/head
authorW. Felix Handte <w@felixhandte.com>
Thu, 9 Mar 2023 17:48:11 +0000 (12:48 -0500)
committerW. Felix Handte <w@felixhandte.com>
Thu, 9 Mar 2023 17:48:11 +0000 (12:48 -0500)
tests/cli-tests/file-stat/compress-file-to-dir-without-write-perm.sh [new file with mode: 0755]
tests/cli-tests/file-stat/compress-file-to-dir-without-write-perm.sh.stderr.exact [new file with mode: 0644]

diff --git a/tests/cli-tests/file-stat/compress-file-to-dir-without-write-perm.sh b/tests/cli-tests/file-stat/compress-file-to-dir-without-write-perm.sh
new file mode 100755 (executable)
index 0000000..1aa4525
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# motivated by issue #3523
+
+datagen > file
+mkdir out
+chmod 000 out
+
+zstd file -q --trace-file-stat -o out/file.zst
+zstd -tq out/file.zst
+
+chmod 777 out
diff --git a/tests/cli-tests/file-stat/compress-file-to-dir-without-write-perm.sh.stderr.exact b/tests/cli-tests/file-stat/compress-file-to-dir-without-write-perm.sh.stderr.exact
new file mode 100644 (file)
index 0000000..95deaf2
--- /dev/null
@@ -0,0 +1,26 @@
+Trace:FileStat: > UTIL_isLink(file)
+Trace:FileStat: < 0
+Trace:FileStat: > UTIL_isConsole(2)
+Trace:FileStat: < 0
+Trace:FileStat: > UTIL_getFileSize(file)
+Trace:FileStat:  > UTIL_stat(-1, file)
+Trace:FileStat:  < 1
+Trace:FileStat: < 65537
+Trace:FileStat: > UTIL_stat(-1, file)
+Trace:FileStat: < 1
+Trace:FileStat: > UTIL_isDirectoryStat()
+Trace:FileStat: < 0
+Trace:FileStat: > UTIL_stat(-1, file)
+Trace:FileStat: < 1
+Trace:FileStat: > UTIL_isSameFile(file, out/file.zst)
+Trace:FileStat:  > UTIL_stat(-1, file)
+Trace:FileStat:  < 1
+Trace:FileStat:  > UTIL_stat(-1, out/file.zst)
+Trace:FileStat:  < 0
+Trace:FileStat: < 0
+Trace:FileStat: > UTIL_isRegularFile(out/file.zst)
+Trace:FileStat:  > UTIL_stat(-1, out/file.zst)
+Trace:FileStat:  < 0
+Trace:FileStat: < 0
+zstd: out/file.zst: Permission denied
+zstd: can't stat out/file.zst : Permission denied -- ignored