tests: fix ppc64el test failures in tst_disassemblyoutput#774
Open
re2zero wants to merge 1 commit into
Open
Conversation
The testDetectBranches test fails on ppc64el due to two issues: 1. The regex for parsing readelf -s output uses [0-9 a-zA-Z]+ which is too restrictive for ppc64el output format. Use [^\n]+ instead to match any characters until end of line. 2. The test assumes every disassembly line contains branch visualisation output, which is not true on ppc64el. Wrap the branch visualisation check in an isEmpty() guard. Fixes KDAB#766
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
testDetectBranchesby relaxing regex matching and handling missing branch visualisationChanges
tests/modeltests/tst_disassemblyoutput.cpp[0-9 a-zA-Z]+to[^\\n]+; wrap branch visualisation check inisEmpty()guardContext
On ppc64el, the readelf output format differs from x86_64 in the symbol table, causing the regex to fail. Additionally, not every disassembly line on ppc64el contains branch visualisation output.
Patch source: Debian powerpc porter analysis (see Debian #1129621)
Test Plan
Fixes #766