From: Lennart Poettering Date: Mon, 22 Aug 2022 12:06:10 +0000 (+0200) Subject: hwdb-test: don't rely on --root= quirk X-Git-Tag: v252-rc1~377^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3979ea86443e6fd7c0657ce5eadf196b3cb67182;p=thirdparty%2Fsystemd.git hwdb-test: don't rely on --root= quirk Previously, the test would rely on the fact that systemd-hwdb would follow symlinks outside of the --root= hierarchy. That's a bug however, and systemd-hwdb shouldn't do that. Hence let's remove the fact that the test relies on it, so that we can then fix systemd-hwdb (specifically: conf_files_list()) accordingly. --- diff --git a/test/hwdb-test.sh b/test/hwdb-test.sh index 29183e68296..3efbad21b6f 100755 --- a/test/hwdb-test.sh +++ b/test/hwdb-test.sh @@ -22,7 +22,7 @@ D="$(mktemp --tmpdir --directory "hwdb-test.XXXXXXXXXX")" # shellcheck disable=SC2064 trap "rm -rf '$D'" EXIT INT QUIT PIPE mkdir -p "$D/etc/udev" -ln -s "$ROOTDIR/hwdb.d" "$D/etc/udev/hwdb.d" +cp -a "$ROOTDIR/hwdb.d" "$D/etc/udev/hwdb.d" # Test "good" properties" — no warnings or errors allowed err=$("$SYSTEMD_HWDB" update --root "$D" 2>&1 >/dev/null) && rc= || rc=$? @@ -41,9 +41,9 @@ if [ ! -e "$D/etc/udev/hwdb.bin" ]; then fi # Test "bad" properties" — warnings required, errors not allowed -rm -f "$D/etc/udev/hwdb.bin" "$D/etc/udev/hwdb.d" +rm -rf "$D/etc/udev/hwdb.bin" "$D/etc/udev/hwdb.d" -ln -s "$ROOTDIR/test/hwdb.d" "$D/etc/udev/hwdb.d" +cp -a "$ROOTDIR/test/hwdb.d" "$D/etc/udev/hwdb.d" err=$("$SYSTEMD_HWDB" update --root "$D" 2>&1 >/dev/null) && rc= || rc=$? if [ -n "$rc" ]; then echo "$SYSTEMD_HWDB returned $rc"