Fix basic-posix-acl test output on el9

It turns out that on el9, `bash -c` prints out `bash: line 1: cd..`
instead of `line 0:` on el7 or el8. So discard all the stderr from
these `cd` lines entirely and just rely on the expected echo
output to stdout.

Signed-off-by: Auke Kok <auke.kok@versity.com>
This commit is contained in:
Auke Kok
2024-08-30 22:34:36 -07:00
parent 8a4b0967cb
commit 0a8b3f4e94
2 changed files with 6 additions and 8 deletions

View File

@@ -41,9 +41,7 @@ group::r-x
mask::rwx
other::r-x
bash: line 0: cd: dir-root: Permission denied
Failed
bash: line 0: cd: symlinkdir-root: Permission denied
Failed
# file: dir-root
# owner: root

View File

@@ -55,16 +55,16 @@ L dir-root/file-group-write
L symlinkdir-root/file-group-write
echo "== directory exec"
setpriv $SET_UID bash -c "cd dir-root && echo Success"
setpriv $SET_UID bash -c "cd symlinkdir-root && echo Success"
setpriv $SET_UID bash -c "cd dir-root 2>&- && echo Success"
setpriv $SET_UID bash -c "cd symlinkdir-root 2>&- && echo Success"
setfacl -m u:22222:rw dir-root
getfacl dir-root
setpriv $SET_UID bash -c "cd dir-root || echo Failed"
setpriv $SET_UID bash -c "cd symlinkdir-root || echo Failed"
setpriv $SET_UID bash -c "cd dir-root 2>&- || echo Failed"
setpriv $SET_UID bash -c "cd symlinkdir-root 2>&- || echo Failed"
setfacl -m g:44444:rwx dir-root
getfacl dir-root
setpriv $SET_GID bash -c "cd dir-root && echo Success"
setpriv $SET_GID bash -c "cd symlinkdir-root && echo Success"
setpriv $SET_GID bash -c "cd dir-root 2>&- && echo Success"
setpriv $SET_GID bash -c "cd symlinkdir-root 2>&- && echo Success"
echo "== get/set attr"
rm -rf file-root