From e08fdfdd7d18c451055b7804646499b3f1baedf7 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sun, 15 Jun 2025 11:36:01 +0900 Subject: [PATCH] test-network: compare LLDP sender and receiver information --- test/test-network/systemd-networkd-tests.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py index 7f20aa4aa53..710d94b4634 100755 --- a/test/test-network/systemd-networkd-tests.py +++ b/test/test-network/systemd-networkd-tests.py @@ -6660,6 +6660,13 @@ class NetworkdLLDPTests(unittest.TestCase, Utilities): print(output) self.assertRegex(output, r'Connected To: .* on port veth-peer') + # Compare the json output from sender and receiver + sender_json = get_link_description('veth-peer')['LLDP'] + receiver_json = json.loads(networkctl('--json=short', 'lldp', 'veth99'))['Neighbors'][0]['Neighbors'][0] + print(sender_json) + print(receiver_json) + self.assertEqual(sender_json, receiver_json) + class NetworkdRATests(unittest.TestCase, Utilities): def setUp(self): -- 2.47.3