[llvm] [llvm-readobj][ELF] Fix broken JSON output with --dynamic-table (PR #95976)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 19 00:30:55 PDT 2024


================
@@ -8,6 +8,9 @@
 # RUN: llvm-readelf --dynamic-table %t1 \
 # RUN:   | FileCheck %s --strict-whitespace --match-full-lines --check-prefix=GNU64
 # RUN: llvm-readelf -d %t1 | FileCheck %s --check-prefix=GNU64
+# RUN: llvm-readelf --dynamic-table --pretty-print --elf-output-style=JSON %t1 \
+# RUN:   | FileCheck %s --check-prefix=JSON64
+# RUN: llvm-readelf -d --pretty-print --elf-output-style=JSON %t1 | FileCheck %s --check-prefix=JSON64
----------------
jh7370 wrote:

As `-d` is an alias of `--dynamic-table`, and we have another test case that shows the behaviour of the alias, I don't see a need to repeat that check here (we have it for both llvm-readelf and llvm-readobj cases above, because the two have different command-lines).

https://github.com/llvm/llvm-project/pull/95976


More information about the llvm-commits mailing list