Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions getting-credits/2025/tests/test-033.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#/usr/bin/env bash
#
# Extract test with insufficient permissions to write.

source $configvar
cd $tmpdir

typeset -i last=${#inputfiles[@]}

tmp2=noperms-$(basename $0)
mkdir "$tmp2" || { echo "mkdir failed" && exit 1; }
cd "$tmp2"
chmod -w .

$MYTAR -x -f "../$tarfile"
(($? == 2)) || exit 1
10 changes: 10 additions & 0 deletions getting-credits/2025/tests/test-output-033.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
mytar: aaa-file: Cannot open: Permission denied
mytar: another-file2: Cannot open: Permission denied
mytar: empty.data: Cannot open: Permission denied
mytar: file.zero: Cannot open: Permission denied
mytar: file1.random: Cannot open: Permission denied
mytar: file2.zero: Cannot open: Permission denied
mytar: file3.zero: Cannot open: Permission denied
mytar: hello-world: Cannot open: Permission denied
mytar: small-file: Cannot open: Permission denied
mytar: Exiting with failure status due to previous errors