mirror of
https://git.code.sf.net/p/zsh/code
synced 2026-04-18 06:53:35 -04:00
50043: avoid spurious test failures when "make check" as root
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2022-04-11 Bart Schaefer <schaefer@zsh.org>
|
||||
|
||||
* 50043: Test/D02glob.ztst, Test/E03posix.ztst: for root user,
|
||||
skip glob tests that rely on limited privilege and fix EUID test
|
||||
|
||||
2022-04-11 Mikael Magnusson <mikachu@gmail.com>
|
||||
|
||||
* 50042: Src/Zle/compcore.c: Another fix for 49915
|
||||
|
||||
@@ -748,13 +748,21 @@
|
||||
touch glob.tmp/secret-d$1/dir/file
|
||||
chmod $1 glob.tmp/secret-d$1
|
||||
done
|
||||
print -raC 2 -- glob.tmp/secret-*/* glob.tmp/secret-*/file
|
||||
if (( EUID == 0 )); then
|
||||
ZTST_skip='Not testing unreadable directories (root reads anything)'
|
||||
else
|
||||
print -raC 2 -- glob.tmp/secret-*/* glob.tmp/secret-*/file
|
||||
fi
|
||||
0:names inside unreadable directories can be globbed if searchable
|
||||
>glob.tmp/secret-d444/dir glob.tmp/secret-d444/file
|
||||
>glob.tmp/secret-s444/dir glob.tmp/secret-s444/file
|
||||
>glob.tmp/secret-d111/file glob.tmp/secret-s111/file
|
||||
|
||||
print -rC 2 -- glob.tmp/secret-*/dir/*
|
||||
if (( EUID == 0 )); then
|
||||
ZTST_skip='Not testing unreadable directories (root reads anything)'
|
||||
else
|
||||
print -rC 2 -- glob.tmp/secret-*/dir/*
|
||||
fi
|
||||
0:glob files in readable directories inside unreadable directories
|
||||
>glob.tmp/secret-d111/dir/file glob.tmp/secret-s111/dir/file
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@ F:This may also need to apply to multibyte whitespace
|
||||
F:POSIX has neither math functions nor floating point
|
||||
>42
|
||||
|
||||
ARGV0=sh $ZTST_testdir/../Src/zsh -c 'EUID=10; echo "$EUID"'
|
||||
ARGV0=sh $ZTST_testdir/../Src/zsh -c 'EUID=1; EUID=10; echo $EUID'
|
||||
-f:EUID is not a special variable
|
||||
>10
|
||||
|
||||
|
||||
Reference in New Issue
Block a user