From 53bbbb30dbbbe6429c6f5fa028e209dbb9e7b06c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Sun, 7 Aug 2022 08:01:39 +0000 Subject: [PATCH] ci: tests: turris-omnia: 020-bridging-guest: fix test for OpenWrt 22.03 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Seems like the output of brctl has changed in OpenWrt 22.03 in a way, that the first interface attached to the bridge is random, so we need to adjust the test cases accordingly. Signed-off-by: Petr Štetiar --- .../020-bridging-guest.t | 32 ++++++------------- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/.gitlab/tests/cram/turris-omnia/acceleration-plan-components/020-bridging-guest.t b/.gitlab/tests/cram/turris-omnia/acceleration-plan-components/020-bridging-guest.t index 16d2351318..f27676bd8c 100644 --- a/.gitlab/tests/cram/turris-omnia/acceleration-plan-components/020-bridging-guest.t +++ b/.gitlab/tests/cram/turris-omnia/acceleration-plan-components/020-bridging-guest.t @@ -4,14 +4,9 @@ Create R alias: Get initial state of bridges: - $ R "brctl show | cut -d$'\t' -f1,4-" - bridge name\tSTP enabled\tinterfaces (esc) - br-guest\tno (esc) - br-lan\tno\t\tlan0 (esc) - \t\t\t\t\tlan1 (esc) - \t\t\t\t\tlan2 (esc) - \t\t\t\t\tlan3 (esc) - \t\t\t\t\tlan4 (esc) + $ R "brctl show | grep -E '(br-lan|br-guest)' | sort | cut -d$'\t' -f1,6" | tr '\t' ' ' + br-guest + br-lan lan(0|1|2|3|4) (re) Remove lan4 from LAN bridge and add it to the Guest bridge: @@ -25,13 +20,9 @@ Remove lan4 from LAN bridge and add it to the Guest bridge: Check that lan4 is added to Guest bridge: - $ R "brctl show | cut -d$'\t' -f1,4-" - bridge name\tSTP enabled\tinterfaces (esc) - br-guest\tno\t\tlan4 (esc) - br-lan\tno\t\tlan0 (esc) - \t\t\t\t\tlan1 (esc) - \t\t\t\t\tlan2 (esc) - \t\t\t\t\tlan3 (esc) + $ R "brctl show | grep -E '(br-lan|br-guest)' | sort | cut -d$'\t' -f1,6" | tr '\t' ' ' + br-guest lan4 + br-lan lan(0|1|2|3) (re) Remove lan4 from the Guest bridge and add it back to the LAN bridge: @@ -45,11 +36,6 @@ Remove lan4 from the Guest bridge and add it back to the LAN bridge: Check for initial state of bridges again: - $ R "brctl show | cut -d$'\t' -f1,4-" - bridge name\tSTP enabled\tinterfaces (esc) - br-guest\tno (esc) - br-lan\tno\t\tlan0 (esc) - \t\t\t\t\tlan1 (esc) - \t\t\t\t\tlan2 (esc) - \t\t\t\t\tlan3 (esc) - \t\t\t\t\tlan4 (esc) + $ R "brctl show | grep -E '(br-lan|br-guest)' | sort | cut -d$'\t' -f1,6" | tr '\t' ' ' + br-guest + br-lan lan(0|1|2|3|4) (re)