From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: Romain Naour <romain.naour@gmail.com>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>,
Titouan Christophe <titouanchristophe@gmail.com>,
Marcin Niestroj <m.niestroj@grinn-global.com>,
buildroot@buildroot.org, Matt Weber <matthew.weber@collins.com>,
Ricardo Martincoski <ricardo.martincoski@gmail.com>
Subject: Re: [Buildroot] [PATCH] support/testing: use .assertRunOk() when possible
Date: Mon, 23 Aug 2021 22:10:38 +0200 [thread overview]
Message-ID: <20210823221038.290a2d8f@windsurf> (raw)
In-Reply-To: <2bc67042-6651-caab-c88e-75c40afb1c73@gmail.com>
On Sun, 22 Aug 2021 17:00:17 +0200
Romain Naour <romain.naour@gmail.com> wrote:
> >> def check_network(self, interface, exitCode=0):
> >> cmd = "ip addr show {} |grep inet".format(interface)
> >> - _, exit_code = self.emulator.run(cmd)
> >> - self.assertEqual(exit_code, exitCode)
> >> + self.assertRunOk(cmd)
>
> What about exitCode argument?
Indeed, this change is wrong, we should revert it.
>
> Theses two tests are expecting check_network() failing (exitCode = 1)
> tests.init.test_busybox.TestInitSystemBusyboxRw
> tests.init.test_busybox.TestInitSystemBusyboxRo
>
> Maybe define assertRunNok?
In this specific case, an assertRunNok would not help: the
check_network() function receives an argument that says which exit code
we expect.
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
prev parent reply other threads:[~2021-08-23 20:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-26 13:32 [Buildroot] [PATCH] support/testing: use .assertRunOk() when possible Thomas Petazzoni
2021-06-26 15:42 ` Yann E. MORIN
2021-08-22 15:00 ` Romain Naour
2021-08-23 20:10 ` Thomas Petazzoni [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210823221038.290a2d8f@windsurf \
--to=thomas.petazzoni@bootlin.com \
--cc=buildroot@buildroot.org \
--cc=m.niestroj@grinn-global.com \
--cc=matthew.weber@collins.com \
--cc=ricardo.martincoski@gmail.com \
--cc=romain.naour@gmail.com \
--cc=titouanchristophe@gmail.com \
--cc=yann.morin.1998@free.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox