I expect the test output to be the second argument, so we're diffing "expected"
and "output", not the other way around.
I noticed this when working on https://github.com/systemd/systemd/pull/33081.
--json=pretty \
"$imgs/zzz")
- diff -u <(echo "$output") - <<EOF
+ diff -u - <<EOF <(echo "$output")
[
{
"type" : "swap",
--json=pretty \
"$imgs/zzz")
- diff -u <(echo "$output") - <<EOF
+ diff -u - <<EOF <(echo "$output")
[
{
"type" : "swap",
--json=pretty \
"$imgs/zzz")
- diff -u <(echo "$output1" | grep -E "(offset|raw_size|raw_padding)") <(echo "$output2" | grep -E "(offset|raw_size|raw_padding)")
+ diff -u <(echo "$output1" | grep -E "(offset|raw_size|raw_padding)") \
+ <(echo "$output2" | grep -E "(offset|raw_size|raw_padding)")
}
test_sector() {