Thread (35 messages) flat view 35 messages, 3 authors, 2021-07-09

[Buildroot] [PATCH v2 17/18] support/testing/tests: add test for check_bin_arch

From: Herve Codina <herve.codina@bootlin.com>
Date: 2021-07-07 12:07:08

Hi,

On Tue, 6 Jul 2021 23:25:18 +0200
"Yann E. MORIN" [off-list ref] wrote:
quoted
So, this tests explicitly installs a host executable in target/, yet the
assert is written to ensure there is no error: it compares against zero.
So this test-case will fail, by design.  
Ah, I think I see the issue: previously, the test by Thomas was calling
'grep', and was checking against '0', which meant that grep _had found_
the string...

So yeah, we really need to check that we _did_ find the error pattern:
    self.assertEqual(len(lines), 1)
Oups,

I was focused on overwrite detection and I missed this one.
I am sorry.

I confirm, 'self.assertEqual(len(lines), 1)' fixed the test.

Herv?

-- 
Herv? Codina, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help