summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@arm.com>2022-11-09 19:31:29 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-11-11 13:43:37 +0000
commitc51c12154851d04a81c8fbe190e712b3cd8dc941 (patch)
tree8b8520250cfae10141dba11ae8fef1784da45e96 /meta/lib/oeqa
parent152f1a8cdf698b71c956e9910911dcb141a1f5be (diff)
downloadopenembedded-core-c51c12154851d04a81c8fbe190e712b3cd8dc941.tar.gz
oeqa/selftest/package: generalise test_gdb_hardlink_debug()
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> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r--meta/lib/oeqa/selftest/cases/package.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/lib/oeqa/selftest/cases/package.py b/meta/lib/oeqa/selftest/cases/package.py
index 2d1b48a15d..482a7c02ad 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)