PPC64's auxvec has a special key that must be ignored.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py | ||
---|---|---|
1083 ↗ | (On Diff #135929) | might be nicer to create a dict: ignored_keys_for_arch = { 'powerpc64le' : [22] } |
1084 ↗ | (On Diff #135929) | Then: ignore_keys = None if arch in ignored_keys_for_arch: ignore_keys = ignored_keys_for_arch[arch] |
1099 ↗ | (On Diff #135929) | Then: if ignore_keys and key in ignore_keys: continue |
If we're going to be doing this, could you at least add a description of what the magic 22 value stands for (it's symbolic name and maybe why we should ignore it).
Although tbh, I'm not sure these tests should be parsing the aux vector in the first place. lldb-server does nothing with the value -- it just reads it from somewhere and passes it through a socket, so I'm not sure why should a test purporting to test lldb-server should need to do that. This looks more like a test of the kernel. Checking that the value we receive is what the os provided us should be enough for lldb-server testing purposes (and the only particularly interesting piece of functionality here is the chunked reads).
I don't know much about this special PPC64 key. I just noticed that it is used multiple times in PPC's auxvec, which breaks current test's logic.
I also found this comment in Linux sources, saying that it should be ignored and is something related to glibc compatibility:
/* A special ignored type value for PPC, for glibc compatibility. */
#define AT_IGNOREPPC 22