From 3979ea86443e6fd7c0657ce5eadf196b3cb67182 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 22 Aug 2022 14:06:10 +0200 Subject: [PATCH] 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. --- test/hwdb-test.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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" -- 2.47.3