]> git.ipfire.org Git - thirdparty/systemd.git/blob - test/udev-dmi-memory-id-test.sh
Merge pull request #20522 from yuwata/cgroup-fix
[thirdparty/systemd.git] / test / udev-dmi-memory-id-test.sh
1 #!/bin/sh
2 # SPDX-License-Identifier: LGPL-2.1-or-later
3
4 set -e
5
6 dmi_memory_id="$1"
7 input="$2"
8 expected="$3"
9
10 output=$(mktemp --tmpdir "test-udev-dmi-memory-id.XXXXXXXXXX")
11 # shellcheck disable=SC2064
12 trap "rm '$output'" EXIT INT QUIT PIPE
13
14 (
15 set -x
16 "$dmi_memory_id" -F "$input" >"$output"
17 diff -u "$output" "$expected"
18 )