tests: make mktemp command call work with Chimera Linux's mktemp

On Chimera Linux, which uses FreeBSD's userland tools, the original call
fails with the following error:

mktemp: mkstemp failed on /tmp/libfprint-XXXXXX.hwdb: Invalid argument

Moving the X's to the end of the template passed to `mktemp` fixes the
error, and also works with GNU's `mktemp`.
This commit is contained in:
Mohammed Anas
2024-01-22 15:18:27 +00:00
parent d3ec9a80d3
commit 1701d72ff9

View File

@@ -6,7 +6,7 @@ if [ ! -x "$UDEV_HWDB" ]; then
fi fi
if [ "$UDEV_HWDB_CHECK_CONTENTS" = 1 ]; then if [ "$UDEV_HWDB_CHECK_CONTENTS" = 1 ]; then
generated_rules=$(mktemp "${TMPDIR:-/tmp}/libfprint-XXXXXX.hwdb") generated_rules=$(mktemp "${TMPDIR:-/tmp}/libfprint.hwdb.XXXXXX")
else else
generated_rules=/dev/null generated_rules=/dev/null
fi fi