This is an archive of the discontinued LLVM Phabricator instance.

[LLDB][PPC64] Fix TestGdbRemoteAuxvSupport
ClosedPublic

Authored by luporl on Feb 26 2018, 11:16 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

luporl created this revision.Feb 26 2018, 11:16 AM
luporl edited the summary of this revision. (Show Details)Feb 26 2018, 11:19 AM
luporl added reviewers: clayborg, labath.
luporl added subscribers: lbianc, alexandreyy.
clayborg added inline comments.Feb 26 2018, 11:26 AM
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
luporl updated this revision to Diff 136097.Feb 27 2018, 10:21 AM
luporl edited the summary of this revision. (Show Details)
  • Merge branch 'master' into fix-auxv-test
  • Addressed review's comments
luporl marked 3 inline comments as done.Feb 27 2018, 10:22 AM
luporl added a comment.Mar 5 2018, 9:45 AM

@clayborg, do you think it is ok now?

clayborg accepted this revision.Mar 5 2018, 10:26 AM
This revision is now accepted and ready to land.Mar 5 2018, 10:26 AM
luporl added a comment.Mar 7 2018, 6:20 AM

Thank you @clayborg. Can you check this in for me?

@labath, @clayborg, can you commit this change for me?

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).

luporl updated this revision to Diff 138608.Mar 15 2018, 12:56 PM
  • Added description about ignored PPC auxvec key

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

labath accepted this revision.Mar 16 2018, 2:26 AM

Thanks.

Thanks @labath.
Could you please commit this patch?

This revision was automatically updated to reflect the committed changes.