-
Notifications
You must be signed in to change notification settings - Fork 549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
t/porting/globvar.t has failures on AIX #21623
Comments
As you noticed, this test is super sensitive to the behavior of nm. It would probably be better if you wrote a patch to make it work on AIX, and then we can try to integrate it without breaking anything else. nm is annoyingly non-portable. |
Could we do something different here? The issue is that we're deleting from the hash, so when we check again, it's gone. Line 55 in 40bc602
It seems like some smarter accounting could allow us to avoid having to deal with the difference in formatting. |
I wondered why weren't getting failures for this on AIX 5, but it turns out the nm output is different enough that it simply bails:
nm on AIX 5 uses the same flags, but a different layout:
As to fixing the issue, it might be better to parse the nm output to collect any defined symbols and compare that to the exports afterwards. It also might be better to use the POSIX |
Yeah, I saw the same thing on the system I was on but it turned out that it was using a different nm from /opt/freeware/bin. I don't manage this system so I'm not exactly sure what the source of that is, and it's obviously not GNU. |
Scratch that, I think it is GNU, but the binary format is just different (ELF vs XCOFF) |
POSIX specifies well defined output for nm -P This will hopefully run this test on more platforms, including old AIX, for which nm produces a different output from what the test expected. Part of Perl#21623
nm on AIX can list both local and global definitions for the same variable, which meant the parsing would delete the first instance from %exported, but then add the second to %unexported, failing the test. This didn't fail on AIX 5 because the default nm output didn't match what the code expected when checking for PL_Yes, and so the entire test script skipped. Fixes Perl#21623
POSIX specifies well defined output for nm -P This will hopefully run this test on more platforms, including old AIX, for which nm produces a different output from what the test expected. Part of #21623
nm on AIX can list both local and global definitions for the same variable, which meant the parsing would delete the first instance from %exported, but then add the second to %unexported, failing the test. This didn't fail on AIX 5 because the default nm output didn't match what the code expected when checking for PL_Yes, and so the entire test script skipped. Fixes #21623
Module:
Description
t/porting/globvar.t reports failures on AIX.
This appears to be caused by the fact that
nm
reports PL_* global vars as both local (d) and global (D) symbols.For example:
If I pass -g, only the global symbol is displayed by nm:
This is in contrast to how GNU nm displays symbols. Each only shows once without any additional options needed:
I'm not sure if this is the flag you want to be using or not, but given that the test is for global variables, I figure it makes sense to exclude local variables.
Steps to Reproduce
Expected behavior
Tests complete with no errors
Perl configuration
The text was updated successfully, but these errors were encountered: