Message ID | 20221109193135.291048-9-ross.burton@arm.com |
---|---|
State | New |
Headers | show |
Series | [01/15] oeqa/qemurunner: update exception class for QMP API changes | expand |
diff --git a/meta/lib/oeqa/selftest/cases/package.py b/meta/lib/oeqa/selftest/cases/package.py index 2d1b48a15df..482a7c02ad4 100644 --- a/meta/lib/oeqa/selftest/cases/package.py +++ b/meta/lib/oeqa/selftest/cases/package.py @@ -135,8 +135,10 @@ class PackageTests(OESelftestTestCase): self.logger.error("No debugging symbols found. GDB result:\n%s" % output) return False - # Check debugging symbols works correctly - elif re.match(r"Breakpoint 1.*hello\.c.*4", l): + # Check debugging symbols works correctly. Don't look for a + # source file as optimisation can put the breakpoint inside + # stdio.h. + elif "Breakpoint 1 at" in l: return True self.logger.error("GDB result:\n%d: %s", status, output)
When the trivial test binary, which just calls printf(), is compiled for aarch64 with -O2 -D_FORTIFY=2 (as is the default configuration), gdb resolves main() to the inlined printf() wrapper in stdio2.h instead of main.c, so the test fails. Presumably, this is due to debugging being unreliable with -O2. Solve this problem by not caring where the main() breakpoint resolves to, just check that it was resolved at all. Signed-off-by: Ross Burton <ross.burton@arm.com> --- meta/lib/oeqa/selftest/cases/package.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)