diff options
author | Ross Burton <ross.burton@arm.com> | 2022-11-09 19:31:29 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-11-11 13:43:40 +0000 |
commit | 8e72283f546e5ce99b05e1482b55cf5af7ae5f37 (patch) | |
tree | 76814b16f027128e9121e5f2a2b9a8211b1116c5 | |
parent | 92c1e7300f5a8570fc2dfc2797e7010080e4583d (diff) | |
download | poky-8e72283f546e5ce99b05e1482b55cf5af7ae5f37.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.
(From OE-Core rev: c51c12154851d04a81c8fbe190e712b3cd8dc941)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/lib/oeqa/selftest/cases/package.py | 6 |
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): | |||
135 | self.logger.error("No debugging symbols found. GDB result:\n%s" % output) | 135 | self.logger.error("No debugging symbols found. GDB result:\n%s" % output) |
136 | return False | 136 | return False |
137 | 137 | ||
138 | # Check debugging symbols works correctly | 138 | # Check debugging symbols works correctly. Don't look for a |
139 | elif re.match(r"Breakpoint 1.*hello\.c.*4", l): | 139 | # source file as optimisation can put the breakpoint inside |
140 | # stdio.h. | ||
141 | elif "Breakpoint 1 at" in l: | ||
140 | return True | 142 | return True |
141 | 143 | ||
142 | self.logger.error("GDB result:\n%d: %s", status, output) | 144 | self.logger.error("GDB result:\n%d: %s", status, output) |