Skip to contentSkip to conversation

support/testing: revert the last change of check_network()

PATCH Applied Romain Naour 2 participants 2 messages Aug 24, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 support/testing: revert the last change of check_network()

check_network() must check the error code of the command used to check the network configuration with the value passed as argument "exitCode".

But this argument is ignored since this commit [1].

Revert the last change of check_network().

Fixes:
https://gitlab.com/kubu93/buildroot/-/jobs/1522848308
https://gitlab.com/kubu93/buildroot/-/jobs/1522848306

[1] afc1ed4d5152e0f6e724e6986a1d12c8001b94fe

Cc Thomas Petazzoni <[email protected]>
---
 support/testing/tests/init/base.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
support/testing/tests/init/base.py +2 -1
index 6a85b87783..7f12186b73 100644
@@ -42,4 +42,5 @@ class InitSystemBase(infra.basetest.BRTest):
 
     def check_network(self, interface, exitCode=0):
         cmd = "ip addr show {} |grep inet".format(interface)
-        self.assertRunOk(cmd)
+        _, exit_code = self.emulator.run(cmd)
+        self.assertEqual(exit_code, exitCode)
Signature · 6 lines
2.31.1

_______________________________________________
buildroot mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/buildroot
#1 lore raw
Quoted 12 lines · On Tue, 24 Aug 2021 19:11:44 +0200 Romain Naour <[email protected]> wrote:

check_network() must check the error code of the command used to check the network configuration with the value passed as argument "exitCode".

But this argument is ignored since this commit [1].

Revert the last change of check_network().

Fixes:
https://gitlab.com/kubu93/buildroot/-/jobs/1522848308
https://gitlab.com/kubu93/buildroot/-/jobs/1522848306

Quoted 7 lines

[1] afc1ed4d5152e0f6e724e6986a1d12c8001b94fe

Cc Thomas Petazzoni <[email protected]>
---
 support/testing/tests/init/base.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Applied to master, thanks.

Thomas

Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/buildroot