test: add test for anonymous version definition diagnostic#1153
test: add test for anonymous version definition diagnostic#1153sai18022001 wants to merge 1 commit into
Conversation
| @@ -0,0 +1,14 @@ | |||
| UNSUPPORTED: x86 | |||
There was a problem hiding this comment.
Is it required to explicitly disable the x86 architecture here?
There was a problem hiding this comment.
In that case, can you please remove it?
| # Test that an error is emitted when an anonymous version definition | ||
| # is used in combination with other named version definitions | ||
| # in a version script. | ||
| # See: https://github.com/qualcomm/eld/issues/1124 |
There was a problem hiding this comment.
| # See: https://github.com/qualcomm/eld/issues/1124 |
| @@ -0,0 +1,6 @@ | |||
| VER_1.0 { | |||
There was a problem hiding this comment.
Can you please also add a test where anonymous version is first and then we have named version node?
There was a problem hiding this comment.
@parth-07
The anonymous-first case produces a different error: EOF expected, but got VER_1.0 rather than the anonymous version definition is used in combination with other version definitions .
Should I add a separate CHECK for that error ?
There was a problem hiding this comment.
Yes, please add a separate check for that.
c4f41f0 to
c849c41
Compare
|
Hi @parth-07 , All review comments have been addressed. Requesting a re-review when you get a chance. |
|
The CI failure is in |
Add a lit test covering the error diagnostics emitted when an anonymous version definition is used in combination with other named version definitions in a version script. Two cases are tested: - Named version node first, anonymous second: emits 'anonymous version definition is used in combination with other version definitions' - Anonymous version node first, named second: emits 'EOF expected, but got VER_1.0' Test location: test/Common/standalone/VersionScriptAnonymousMixed/ Fixes qualcomm#1124 Signed-off-by: Sai Sanjay Chikne <saichikne180201@gmail.com>
c849c41 to
c7ac7d8
Compare
|
@parth-07 Rebased onto latest main. Could you approve the workflows to re-run CI? |
Fixes #1124
Adds a lit test covering the error diagnostic emitted when an anonymous
version definition is used in combination with other named version
definitions in a version script.
Problem :
The diagnostic
anonymous version definition is used in combination with other version definitions(emitted inScriptParser::readVersionScriptCommand())had no test coverage.
Solution :
Added a new lit test at
test/Common/standalone/VersionScriptAnonymousMixed/with the following files:
Inputs/1.c— minimal C source file to produce an object file for linkingInputs/vs_mixed— version script mixing a named and anonymous version node to trigger the diagnosticVersionScriptAnonymousMixed.test— compiles1.cinto an object file,links it as a shared library with
vs_mixedvia--version-script=,expects the link to fail (
%not), and verifies the error message usingFileCheckTesting :
Tested on AArch64, ARM, RISCV, RISCV64, Hexagon, x86 - > all pass.