From 0a8b3f4e94cb042977a228ea29a75e18d5bbd70c Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Fri, 30 Aug 2024 22:34:36 -0700 Subject: [PATCH] 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 --- tests/golden/basic-posix-acl | 2 -- tests/tests/basic-posix-acl.sh | 12 ++++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/tests/golden/basic-posix-acl b/tests/golden/basic-posix-acl index b0415759..017060b2 100644 --- a/tests/golden/basic-posix-acl +++ b/tests/golden/basic-posix-acl @@ -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 diff --git a/tests/tests/basic-posix-acl.sh b/tests/tests/basic-posix-acl.sh index 6b1e2064..b80e8088 100644 --- a/tests/tests/basic-posix-acl.sh +++ b/tests/tests/basic-posix-acl.sh @@ -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