[all-commits] [llvm/llvm-project] 88f088: [libcxx][pretty printers] Report not being able to...

David Spickett via All-commits all-commits at lists.llvm.org
Thu Oct 7 03:02:48 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 88f08899da965f232d4c67842d5932481ea534fe
      https://github.com/llvm/llvm-project/commit/88f08899da965f232d4c67842d5932481ea534fe
  Author: David Spickett <david.spickett at linaro.org>
  Date:   2021-10-07 (Thu, 07 Oct 2021)

  Changed paths:
    M libcxx/test/libcxx/gdb/gdb_pretty_printer_test.py

  Log Message:
  -----------
  [libcxx][pretty printers] Report not being able to trace test program

If you don't have ptrace permissions this test will fail to run
silently, this adds a check for that and anything else that
might do similar things.

The output will now be:
```
FAILED test program did not run correctly, check gdb warnings

/usr/bin/gdb: warning: Couldn't determine a path for the index cache
directory.
No symbol table is loaded.  Use the "file" command.
warning: Error disabling address space randomization: Operation not
permitted
warning: Could not trace the inferior process.
warning: ptrace: Operation not permitted

error: command failed with exit status: 255
```

We already have a feature to check for a compatible python enabled
gdb, so I think it's reasonable to check for this at test runtime.

Note that this is different to the catch all at the end of the test
script. That would be a case where you can trace but something else
made it stop mid way that wasn't our test breakpoints.

Reviewed By: saugustine

Differential Revision: https://reviews.llvm.org/D110936




More information about the All-commits mailing list