]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
TEST-58-REPART: reverse order of diff args
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 30 May 2024 09:33:20 +0000 (11:33 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 28 Jun 2024 09:48:25 +0000 (11:48 +0200)
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.

test/units/TEST-58-REPART.sh

index fc06fde0ee7f8dc236d1ef10c509f755d12980a7..77adce47bbcb9732000fafd65402356a5df03fd1 100755 (executable)
@@ -423,7 +423,7 @@ EOF
                             --json=pretty \
                             "$imgs/zzz")
 
-    diff -u <(echo "$output") - <<EOF
+    diff -u - <<EOF <(echo "$output")
 [
        {
                "type" : "swap",
@@ -484,7 +484,7 @@ EOF
                             --json=pretty \
                             "$imgs/zzz")
 
-    diff -u <(echo "$output") - <<EOF
+    diff -u - <<EOF <(echo "$output")
 [
        {
                "type" : "swap",
@@ -1198,7 +1198,8 @@ EOF
                                               --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() {