From: Frantisek Sumsal Date: Fri, 22 Dec 2023 13:16:56 +0000 (+0100) Subject: test: make the variable names slightly more descriptive X-Git-Tag: v256-rc1~1406^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F30587%2Fhead;p=thirdparty%2Fsystemd.git test: make the variable names slightly more descriptive Follow-up for 5ca8d2474ca8b8b3f42999fb2f6e5e1498b22aa9. --- diff --git a/test/units/testsuite-74.run.sh b/test/units/testsuite-74.run.sh index 69907d4f385..38cbca54ce3 100755 --- a/test/units/testsuite-74.run.sh +++ b/test/units/testsuite-74.run.sh @@ -213,19 +213,18 @@ for opt in nice on-{active,boot,calendar,startup,unit-active,unit-inactive} prop done # Let's make sure that ProtectProc= properly moves submounts of the original /proc over to the new proc - -A=$(cat /proc/sys/kernel/random/boot_id) -B=$(systemd-run -q --wait --pipe -p ProtectProc=invisible cat /proc/sys/kernel/random/boot_id) -assert_eq "$A" "$B" - -V="/tmp/version.$RANDOM" -A="$(cat /proc/version).piff" -echo "$A" > "$V" -mount --bind "$V" /proc/version - -B=$(systemd-run -q --wait --pipe -p ProtectProc=invisible cat /proc/version) - -assert_eq "$A" "$B" +BOOT_ID="$("$TMP_KVER" +mount --bind "$TMP_KVER" /proc/version +UNIT_KVER="$(systemd-run -q --wait --pipe -p ProtectProc=invisible cat /proc/version)" +assert_eq "$KVER" "$UNIT_KVER" +umount /proc/version +rm -f "$TMP_KVER" # Check that invoking the tool under the uid0 alias name works uid0 ls / @@ -239,6 +238,3 @@ done # Let's chain a couple of uid0 calls together, for fun readarray -t cmdline < <(printf "%.0suid0\n" {0..31}) assert_eq "$("${cmdline[@]}" bash -c 'echo $SUDO_USER')" "$USER" - -umount /proc/version -rm "$V"