Skip to content

Commit 957a0ae

Browse files
committed
Add CLI Test
1 parent c4c3e11 commit 957a0ae

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/sh
2+
3+
# motivated by issue #3523
4+
5+
datagen > file
6+
mkdir out
7+
chmod 000 out
8+
9+
zstd file -q --trace-file-stat -o out/file.zst
10+
zstd -tq out/file.zst
11+
12+
chmod 777 out
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Trace:FileStat: > UTIL_isLink(file)
2+
Trace:FileStat: < 0
3+
Trace:FileStat: > UTIL_isConsole(2)
4+
Trace:FileStat: < 0
5+
Trace:FileStat: > UTIL_getFileSize(file)
6+
Trace:FileStat: > UTIL_stat(-1, file)
7+
Trace:FileStat: < 1
8+
Trace:FileStat: < 65537
9+
Trace:FileStat: > UTIL_stat(-1, file)
10+
Trace:FileStat: < 1
11+
Trace:FileStat: > UTIL_isDirectoryStat()
12+
Trace:FileStat: < 0
13+
Trace:FileStat: > UTIL_stat(-1, file)
14+
Trace:FileStat: < 1
15+
Trace:FileStat: > UTIL_isSameFile(file, out/file.zst)
16+
Trace:FileStat: > UTIL_stat(-1, file)
17+
Trace:FileStat: < 1
18+
Trace:FileStat: > UTIL_stat(-1, out/file.zst)
19+
Trace:FileStat: < 0
20+
Trace:FileStat: < 0
21+
Trace:FileStat: > UTIL_isRegularFile(out/file.zst)
22+
Trace:FileStat: > UTIL_stat(-1, out/file.zst)
23+
Trace:FileStat: < 0
24+
Trace:FileStat: < 0
25+
zstd: out/file.zst: Permission denied
26+
zstd: can't stat out/file.zst : Permission denied -- ignored

0 commit comments

Comments
 (0)