[PATCH] D64206: [llvm\test\Object] - An initial step to cleanup the test cases.

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 4 20:34:01 PDT 2019


MaskRay added inline comments.


================
Comment at: test/Object/X86/objdump-disassembly-inline-relocations.test:106
+    Address: 0x0000000000000034
+    Link:    .symtab
+    Info:    .text
----------------
jhenderson wrote:
> This line can be deleted.
I think James meant the `Address: 0x0000000000000034` line.


================
Comment at: test/Object/X86/objdump-trivial-object.test:7
+# COFF-i386:        0:       83 ec 0c                                        subl    $12, %esp
+# COFF-i386:        3:       c7 44 24 08 00 00 00 00                         movl    $0, 8(%esp)
+# COFF-i386:        b:       c7 04 24 00 00 00 00                            movl    $0, (%esp)
----------------
`       3: c7 44 24 08 00 00 00 00       movl    $0, 8(%esp)` then align the rest lines.


================
Comment at: test/Object/X86/objdump-trivial-object.test:21
+# COFF-x86-64:        0:       48 83 ec 28                                     subq    $40, %rsp
+# COFF-x86-64:        4:       c7 44 24 24 00 00 00 00                         movl    $0, 36(%rsp)
+# COFF-x86-64:        c:       48 8d 0d 00 00 00 00                            leaq    (%rip), %rcx
----------------
`       4: c7 44 24 24 00 00 00 00       movl    $0, 36(%rsp)` then align the rest lines.


================
Comment at: test/Object/X86/objdump-trivial-object.test:35
+# ELF-i386:        0:       83 ec 0c                subl    $12, %esp
+# ELF-i386:        3:       c7 44 24 08 00 00 00 00 movl    $0, 8(%esp)
+# ELF-i386:        b:       c7 04 24 00 00 00 00    movl    $0, (%esp)
----------------
`       3: c7 44 24 08 00 00 00 00       movl    $0, 8(%esp)`


================
Comment at: test/Object/X86/objdump-trivial-object.test:55
+
+# RUN: yaml2obj -docnum=2 %s > %t.elf-i386
+# RUN: llvm-objdump -d %t.elf-i386 | FileCheck %s -check-prefix ELF-x86-64
----------------
`i386` -> `x86_64`


================
Comment at: test/Object/X86/objdump-trivial-object.test:61
+# ELF-x86-64:        0:       48 83 ec 08             subq    $8, %rsp
+# ELF-x86-64:        4:       c7 44 24 04 00 00 00 00 movl    $0, 4(%rsp)
+# ELF-x86-64:        c:       bf 00 00 00 00          movl    $0, %edi
----------------
`       4: c7 44 24 04 00 00 00 00       movl    $0, 4(%rsp)`


================
Comment at: test/Object/archive-symtab.test:114
+
+# Check that the we *don't* update the symbol table.
+# RUN: llvm-ar s %t.a
----------------
`## `


================
Comment at: test/Object/mri-addmod.test:3
+# RUN: echo create %t.a > %t.mri
+# RUN: echo "addmod  \"%t.elf-x86-64\" " >> %t.mri
+# RUN: echo save >> %t.mri
----------------
`echo 'addmod "%t.elf-x86-64"'`

or `echo -e '..\n..'` if you join the two lines


================
Comment at: test/Object/nm-shared-object.test:33
+
+# RUN: yaml2obj %s > %t-i386
+# RUN: llvm-nm -D %t-i386 2>&1 | FileCheck %s -check-prefix=NO-SYMBOLS
----------------
`.elf-i386` to be consistent with previous tests in the same file.


================
Comment at: test/Object/objdump-section-content.test:3
 
-COFF-i386: file format
-COFF-i386: Contents of section .text:
-COFF-i386:  0000 83ec0cc7 44240800 000000c7 04240000  ....D$.......$..
-COFF-i386:  0010 0000e800 000000e8 00000000 8b442408  .............D$.
-COFF-i386:  0020 83c40cc3                             ....
-COFF-i386: Contents of section .data:
-COFF-i386:  0000 48656c6c 6f20576f 726c6421 00        Hello World!.
+# RUN: yaml2obj %s > %t-i386
+# RUN: llvm-objdump -s %t-i386 | FileCheck %s -check-prefix ELF-i386
----------------
Delete the suffix or use `.coff-i386`?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64206/new/

https://reviews.llvm.org/D64206





More information about the llvm-commits mailing list