mirror of
https://github.com/systemd/systemd
synced 2024-10-14 20:17:52 +00:00
test: drop default ACL from $TESTDIR
This fixes an issue introduced by the commit 954c77c251
.
For some reasons, setting default ACL on $TESTDIR makes TEST-29-PORTABLE
fail. Let's drop the default ACL, and set ACL on saved results instead.
Fixes #19519.
This commit is contained in:
parent
853401a6bc
commit
a83a7d1e9e
|
@ -1131,6 +1131,10 @@ save_journal() {
|
||||||
rm -r "$j"
|
rm -r "$j"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [ -n "${SUDO_USER}" ]; then
|
||||||
|
setfacl -m "user:${SUDO_USER:?}:r-X" "$dest"*
|
||||||
|
fi
|
||||||
|
|
||||||
# we want to print this sometime later, so save this in a variable
|
# we want to print this sometime later, so save this in a variable
|
||||||
JOURNAL_LIST="$(ls -l "$dest"*)"
|
JOURNAL_LIST="$(ls -l "$dest"*)"
|
||||||
}
|
}
|
||||||
|
@ -1142,6 +1146,9 @@ check_result_common() {
|
||||||
if [ -s "$workspace/failed" ]; then
|
if [ -s "$workspace/failed" ]; then
|
||||||
# Non-empty …/failed has highest priority
|
# Non-empty …/failed has highest priority
|
||||||
cp -a "$workspace/failed" "${TESTDIR:?}/"
|
cp -a "$workspace/failed" "${TESTDIR:?}/"
|
||||||
|
if [ -n "${SUDO_USER}" ]; then
|
||||||
|
setfacl -m "user:${SUDO_USER:?}:r-X" "${TESTDIR:?}/"failed
|
||||||
|
fi
|
||||||
ret=1
|
ret=1
|
||||||
elif [ -e "$workspace/testok" ]; then
|
elif [ -e "$workspace/testok" ]; then
|
||||||
# …/testok always counts (but with lower priority than …/failed)
|
# …/testok always counts (but with lower priority than …/failed)
|
||||||
|
@ -2477,7 +2484,6 @@ do_test() {
|
||||||
if [ -n "${SUDO_USER}" ]; then
|
if [ -n "${SUDO_USER}" ]; then
|
||||||
ddebug "Making ${TESTDIR:?} readable for ${SUDO_USER} (acquired from sudo)"
|
ddebug "Making ${TESTDIR:?} readable for ${SUDO_USER} (acquired from sudo)"
|
||||||
setfacl -m "user:${SUDO_USER:?}:r-X" "${TESTDIR:?}"
|
setfacl -m "user:${SUDO_USER:?}:r-X" "${TESTDIR:?}"
|
||||||
setfacl -d -m "user:${SUDO_USER:?}:r-X" "${TESTDIR:?}"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
testname="$(basename "$PWD")"
|
testname="$(basename "$PWD")"
|
||||||
|
|
Loading…
Reference in a new issue