From 5469bc61185163119bec209612e0a72381ba232c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Thu, 30 May 2024 11:33:20 +0200
Subject: [PATCH 0727/1160] TEST-58-REPART: reverse order of diff args

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.

(cherry picked from commit 6bb3ea655d08c0602c99ccd2a580ba102fd19114)
(cherry picked from commit 9663bb74100dd79c1e4e9c6b2377ea1b817ddee5)
---
 test/units/testsuite-58.sh | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/test/units/testsuite-58.sh b/test/units/testsuite-58.sh
index 20d4bda84e..d875461721 100755
--- a/test/units/testsuite-58.sh
+++ b/test/units/testsuite-58.sh
@@ -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() {
-- 
2.33.0