[lld] r201133 - [Mips] Use the 'CHECK-NEXT' where we need to check a test output exactly

Simon Atanasyan simon at atanasyan.com
Mon Feb 10 23:17:09 PST 2014


Author: atanasyan
Date: Tue Feb 11 01:17:09 2014
New Revision: 201133

URL: http://llvm.org/viewvc/llvm-project?rev=201133&view=rev
Log:
[Mips] Use the 'CHECK-NEXT' where we need to check a test output exactly
line by line.

Modified:
    lld/trunk/test/elf/Mips/base-address.test
    lld/trunk/test/elf/Mips/dynlib-dynamic.test
    lld/trunk/test/elf/Mips/exe-dynamic.test
    lld/trunk/test/elf/Mips/got16.test
    lld/trunk/test/elf/Mips/hilo16-1.test
    lld/trunk/test/elf/Mips/plt-header.test
    lld/trunk/test/elf/Mips/r26.test

Modified: lld/trunk/test/elf/Mips/base-address.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/base-address.test?rev=201133&r1=201132&r2=201133&view=diff
==============================================================================
--- lld/trunk/test/elf/Mips/base-address.test (original)
+++ lld/trunk/test/elf/Mips/base-address.test Tue Feb 11 01:17:09 2014
@@ -7,22 +7,22 @@
 
 # CHECK: DynamicSection [ (15 entries)
 # CHECK:   Tag        Type                 Name/Value
-# CHECK:   0x00000004 HASH                 0x400104
-# CHECK:   0x00000005 STRTAB               0x400124
-# CHECK:   0x00000006 SYMTAB               0x400114
-# CHECK:   0x0000000A STRSZ                1 (bytes)
-# CHECK:   0x0000000B SYMENT               16 (bytes)
-# CHECK:   0x0000001A FINI_ARRAY           0x0
-# CHECK:   0x0000001C FINI_ARRAYSZ         0 (bytes)
-# CHECK:   0x70000001 MIPS_RLD_VERSION     1
-# CHECK:   0x70000005 MIPS_FLAGS           0x2
-# CHECK:   0x70000006 MIPS_BASE_ADDRESS    0x400000
-# CHECK:   0x7000000A MIPS_LOCAL_GOTNO     2
-# CHECK:   0x70000011 MIPS_SYMTABNO        1
-# CHECK:   0x70000013 MIPS_GOTSYM          0x1
-# CHECK:   0x00000003 PLTGOT               0x401000
-# CHECK:   0x00000000 NULL                 0x0
-# CHECK: ]
+# CHECK-NEXT:   0x00000004 HASH                 0x400104
+# CHECK-NEXT:   0x00000005 STRTAB               0x400124
+# CHECK-NEXT:   0x00000006 SYMTAB               0x400114
+# CHECK-NEXT:   0x0000000A STRSZ                1 (bytes)
+# CHECK-NEXT:   0x0000000B SYMENT               16 (bytes)
+# CHECK-NEXT:   0x0000001A FINI_ARRAY           0x0
+# CHECK-NEXT:   0x0000001C FINI_ARRAYSZ         0 (bytes)
+# CHECK-NEXT:   0x70000001 MIPS_RLD_VERSION     1
+# CHECK-NEXT:   0x70000005 MIPS_FLAGS           0x2
+# CHECK-NEXT:   0x70000006 MIPS_BASE_ADDRESS    0x400000
+# CHECK-NEXT:   0x7000000A MIPS_LOCAL_GOTNO     2
+# CHECK-NEXT:   0x70000011 MIPS_SYMTABNO        1
+# CHECK-NEXT:   0x70000013 MIPS_GOTSYM          0x1
+# CHECK-NEXT:   0x00000003 PLTGOT               0x401000
+# CHECK-NEXT:   0x00000000 NULL                 0x0
+# CHECK-NEXT: ]
 
 # CHECK: ProgramHeaders [
 # CHECK:   ProgramHeader {

Modified: lld/trunk/test/elf/Mips/dynlib-dynamic.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/dynlib-dynamic.test?rev=201133&r1=201132&r2=201133&view=diff
==============================================================================
--- lld/trunk/test/elf/Mips/dynlib-dynamic.test (original)
+++ lld/trunk/test/elf/Mips/dynlib-dynamic.test Tue Feb 11 01:17:09 2014
@@ -11,22 +11,22 @@
 # CHECK: LoadName:
 # CHECK: DynamicSection [ (15 entries)
 # CHECK:   Tag        Type                 Name/Value
-# CHECK:   0x00000004 HASH                 0xD4
-# CHECK:   0x00000005 STRTAB               0x138
-# CHECK:   0x00000006 SYMTAB               0xF8
-# CHECK:   0x0000000A STRSZ                17 (bytes)
-# CHECK:   0x0000000B SYMENT               16 (bytes)
-# CHECK:   0x0000001A FINI_ARRAY           0x0
-# CHECK:   0x0000001C FINI_ARRAYSZ         0 (bytes)
-# CHECK:   0x70000001 MIPS_RLD_VERSION     1
-# CHECK:   0x70000005 MIPS_FLAGS           0x2
-# CHECK:   0x70000006 MIPS_BASE_ADDRESS    0x0
-# CHECK:   0x7000000A MIPS_LOCAL_GOTNO     4
-# CHECK:   0x70000011 MIPS_SYMTABNO        4
-# CHECK:   0x70000013 MIPS_GOTSYM          0x2
-# CHECK:   0x00000003 PLTGOT               0x1000
-# CHECK:   0x00000000 NULL                 0x0
-# CHECK: ]
+# CHECK-NEXT:   0x00000004 HASH                 0xD4
+# CHECK-NEXT:   0x00000005 STRTAB               0x138
+# CHECK-NEXT:   0x00000006 SYMTAB               0xF8
+# CHECK-NEXT:   0x0000000A STRSZ                17 (bytes)
+# CHECK-NEXT:   0x0000000B SYMENT               16 (bytes)
+# CHECK-NEXT:   0x0000001A FINI_ARRAY           0x0
+# CHECK-NEXT:   0x0000001C FINI_ARRAYSZ         0 (bytes)
+# CHECK-NEXT:   0x70000001 MIPS_RLD_VERSION     1
+# CHECK-NEXT:   0x70000005 MIPS_FLAGS           0x2
+# CHECK-NEXT:   0x70000006 MIPS_BASE_ADDRESS    0x0
+# CHECK-NEXT:   0x7000000A MIPS_LOCAL_GOTNO     4
+# CHECK-NEXT:   0x70000011 MIPS_SYMTABNO        4
+# CHECK-NEXT:   0x70000013 MIPS_GOTSYM          0x2
+# CHECK-NEXT:   0x00000003 PLTGOT               0x1000
+# CHECK-NEXT:   0x00000000 NULL                 0x0
+# CHECK-NEXT: ]
 
     .abicalls
     .global glob

Modified: lld/trunk/test/elf/Mips/exe-dynamic.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/exe-dynamic.test?rev=201133&r1=201132&r2=201133&view=diff
==============================================================================
--- lld/trunk/test/elf/Mips/exe-dynamic.test (original)
+++ lld/trunk/test/elf/Mips/exe-dynamic.test Tue Feb 11 01:17:09 2014
@@ -16,27 +16,27 @@
 # CHECK: LoadName:
 # CHECK: DynamicSection [ (20 entries)
 # CHECK:   Tag        Type                 Name/Value
-# CHECK:   0x00000004 HASH                 0x400110
-# CHECK:   0x00000005 STRTAB               0x400144
-# CHECK:   0x00000006 SYMTAB               0x400124
-# CHECK:   0x0000000A STRSZ                30 (bytes)
-# CHECK:   0x0000000B SYMENT               16 (bytes)
-# CHECK:   0x0000001A FINI_ARRAY           0x0
-# CHECK:   0x0000001C FINI_ARRAYSZ         0 (bytes)
-# CHECK:   0x00000002 PLTRELSZ             8 (bytes)
-# CHECK:   0x70000032 MIPS_PLTGOT          0x402000
-# CHECK:   0x00000014 PLTREL               REL
-# CHECK:   0x00000017 JMPREL               0x400162
-# CHECK:   0x70000001 MIPS_RLD_VERSION     1
-# CHECK:   0x70000005 MIPS_FLAGS           0x2
-# CHECK:   0x70000006 MIPS_BASE_ADDRESS    0x400000
-# CHECK:   0x7000000A MIPS_LOCAL_GOTNO     2
-# CHECK:   0x70000011 MIPS_SYMTABNO        2
-# CHECK:   0x70000013 MIPS_GOTSYM          0x2
-# CHECK:   0x00000003 PLTGOT               0x401000
-# CHECK:   0x00000001 NEEDED               SharedLibrary (exe-dynamic.test.{{.*}})
-# CHECK:   0x00000000 NULL                 0x0
-# CHECK: ]
+# CHECK-NEXT:   0x00000004 HASH                 0x400110
+# CHECK-NEXT:   0x00000005 STRTAB               0x400144
+# CHECK-NEXT:   0x00000006 SYMTAB               0x400124
+# CHECK-NEXT:   0x0000000A STRSZ                30 (bytes)
+# CHECK-NEXT:   0x0000000B SYMENT               16 (bytes)
+# CHECK-NEXT:   0x0000001A FINI_ARRAY           0x0
+# CHECK-NEXT:   0x0000001C FINI_ARRAYSZ         0 (bytes)
+# CHECK-NEXT:   0x00000002 PLTRELSZ             8 (bytes)
+# CHECK-NEXT:   0x70000032 MIPS_PLTGOT          0x402000
+# CHECK-NEXT:   0x00000014 PLTREL               REL
+# CHECK-NEXT:   0x00000017 JMPREL               0x400162
+# CHECK-NEXT:   0x70000001 MIPS_RLD_VERSION     1
+# CHECK-NEXT:   0x70000005 MIPS_FLAGS           0x2
+# CHECK-NEXT:   0x70000006 MIPS_BASE_ADDRESS    0x400000
+# CHECK-NEXT:   0x7000000A MIPS_LOCAL_GOTNO     2
+# CHECK-NEXT:   0x70000011 MIPS_SYMTABNO        2
+# CHECK-NEXT:   0x70000013 MIPS_GOTSYM          0x2
+# CHECK-NEXT:   0x00000003 PLTGOT               0x401000
+# CHECK-NEXT:   0x00000001 NEEDED               SharedLibrary (exe-dynamic.test.{{.*}})
+# CHECK-NEXT:   0x00000000 NULL                 0x0
+# CHECK-NEXT: ]
 
     .abicalls
     .global glob

Modified: lld/trunk/test/elf/Mips/got16.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/got16.test?rev=201133&r1=201132&r2=201133&view=diff
==============================================================================
--- lld/trunk/test/elf/Mips/got16.test (original)
+++ lld/trunk/test/elf/Mips/got16.test Tue Feb 11 01:17:09 2014
@@ -81,11 +81,11 @@
 
 # RAW: Disassembly of section .text:
 # RAW: glob:
-# RAW:   168:  18 80 84 8f  lw      $4, -32744($gp)
-# RAW:   16c:  00 20 84 24  addiu   $4, $4, 8192
-# RAW:   170:  1c 80 84 8f  lw      $4, -32740($gp)
-# RAW:   174:  20 80 84 8f  lw      $4, -32736($gp)
-# RAW:   178:  24 80 84 8f  lw      $4, -32732($gp)
+# RAW-NEXT:   168:  18 80 84 8f  lw      $4, -32744($gp)
+# RAW-NEXT:   16c:  00 20 84 24  addiu   $4, $4, 8192
+# RAW-NEXT:   170:  1c 80 84 8f  lw      $4, -32740($gp)
+# RAW-NEXT:   174:  20 80 84 8f  lw      $4, -32736($gp)
+# RAW-NEXT:   178:  24 80 84 8f  lw      $4, -32732($gp)
 
 # RAW: SYMBOL TABLE:
 # RAW: 00000000       *UND*  00000000

Modified: lld/trunk/test/elf/Mips/hilo16-1.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/hilo16-1.test?rev=201133&r1=201132&r2=201133&view=diff
==============================================================================
--- lld/trunk/test/elf/Mips/hilo16-1.test (original)
+++ lld/trunk/test/elf/Mips/hilo16-1.test Tue Feb 11 01:17:09 2014
@@ -5,12 +5,13 @@
 
 # CHECK: Disassembly of section .text:
 # CHECK: glob1:
-# CHECK:   134:  01 00 01 8c  lw      $1, 1($zero)
-# CHECK:   138:  01 00 02 8c  lw      $2, 1($zero)
-# CHECK:   13c:  b8 8e 21 24  addiu   $1, $1, -29000
-# CHECK:   140:  01 00 01 8c  lw      $1, 1($zero)
-# CHECK:   144:  01 00 02 8c  lw      $2, 1($zero)
-# CHECK:   148:  ac 8e 21 24  addiu   $1, $1, -29012
+# CHECK-NEXT:   134:  01 00 01 8c  lw      $1, 1($zero)
+# CHECK-NEXT:   138:  01 00 02 8c  lw      $2, 1($zero)
+# CHECK-NEXT:   13c:  b8 8e 21 24  addiu   $1, $1, -29000
+# CHECK: glob2:
+# CHECK-NEXT:   140:  01 00 01 8c  lw      $1, 1($zero)
+# CHECK-NEXT:   144:  01 00 02 8c  lw      $2, 1($zero)
+# CHECK-NEXT:   148:  ac 8e 21 24  addiu   $1, $1, -29012
 
 # CHECK: Sections:
 # CHECK: Idx Name  Size      Address          Type

Modified: lld/trunk/test/elf/Mips/plt-header.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/plt-header.test?rev=201133&r1=201132&r2=201133&view=diff
==============================================================================
--- lld/trunk/test/elf/Mips/plt-header.test (original)
+++ lld/trunk/test/elf/Mips/plt-header.test Tue Feb 11 01:17:09 2014
@@ -14,14 +14,14 @@
 # EXE: Disassembly of section .plt:
 # EXE: .plt:
 # PLT0 entry. Points to the .got.plt[0]
-# EXE:   400170:  40 00 1c 3c  lui     $gp, 64
-# EXE:   400174:  00 20 99 8f  lw      $25, 8192($gp)
-# EXE:   400178:  00 20 9c 27  addiu   $gp, $gp, 8192
-# EXE:   40017c:  23 c0 1c 03  subu    $24, $24, $gp
-# EXE:   400180:  21 78 e0 03  move    $15, $ra
-# EXE:   400184:  82 c0 18 00  srl     $24, $24, 2
-# EXE:   400188:  09 f8 20 03  jalr    $25
-# EXE:   40018c:  fe ff 18 27  addiu   $24, $24, -2
+# EXE-NEXT:   400170:  40 00 1c 3c  lui     $gp, 64
+# EXE-NEXT:   400174:  00 20 99 8f  lw      $25, 8192($gp)
+# EXE-NEXT:   400178:  00 20 9c 27  addiu   $gp, $gp, 8192
+# EXE-NEXT:   40017c:  23 c0 1c 03  subu    $24, $24, $gp
+# EXE-NEXT:   400180:  21 78 e0 03  move    $15, $ra
+# EXE-NEXT:   400184:  82 c0 18 00  srl     $24, $24, 2
+# EXE-NEXT:   400188:  09 f8 20 03  jalr    $25
+# EXE-NEXT:   40018c:  fe ff 18 27  addiu   $24, $24, -2
 
 # EXE: Sections:
 # EXE: Idx Name          Size      Address          Type

Modified: lld/trunk/test/elf/Mips/r26.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/r26.test?rev=201133&r1=201132&r2=201133&view=diff
==============================================================================
--- lld/trunk/test/elf/Mips/r26.test (original)
+++ lld/trunk/test/elf/Mips/r26.test Tue Feb 11 01:17:09 2014
@@ -15,45 +15,45 @@
 
 # Object file has three R_MIPS_26 relocations
 # OBJ-REL: Relocations [
-# OBJ-REL:   Section (2) .rel.text {
-# OBJ-REL:      0x8 R_MIPS_26 .text 0x0
-# OBJ-REL:     0x10 R_MIPS_26 glob  0x0
-# OBJ-REL:     0x18 R_MIPS_26 ext1  0x0
-# OBJ-REL:   }
-# OBJ-REL: ]
+# OBJ-REL-NEXT:   Section (2) .rel.text {
+# OBJ-REL-NEXT:      0x8 R_MIPS_26 .text 0x0
+# OBJ-REL-NEXT:     0x10 R_MIPS_26 glob  0x0
+# OBJ-REL-NEXT:     0x18 R_MIPS_26 ext1  0x0
+# OBJ-REL-NEXT:   }
+# OBJ-REL-NEXT: ]
 
 # Executable file has the only relocation for external symbol
 # EXE-REL: Relocations [
-# EXE-REL:   Section (5) .rel.plt {
-# EXE-REL:     0x402008 R_MIPS_JUMP_SLOT ext1 0x0
-# EXE-REL:   }
-# EXE-REL: ]
+# EXE-REL-NEXT:   Section (5) .rel.plt {
+# EXE-REL-NEXT:     0x402008 R_MIPS_JUMP_SLOT ext1 0x0
+# EXE-REL-NEXT:   }
+# EXE-REL-NEXT: ]
 
 # EXE: Disassembly of section .plt:
 # EXE: .plt:
 # PLTA entry. Points to the .got.plt[1]
-# EXE:   400180:  40 00 0f 3c  lui     $15, 64
-# EXE:   400184:  08 20 f9 8d  lw      $25, 8200($15)
-# EXE:   400188:  08 00 20 03  jr      $25
-# EXE:   40018c:  08 20 f8 25  addiu   $24, $15, 8200
+# EXE:        400180:  40 00 0f 3c  lui     $15, 64
+# EXE-NEXT:   400184:  08 20 f9 8d  lw      $25, 8200($15)
+# EXE-NEXT:   400188:  08 00 20 03  jr      $25
+# EXE-NEXT:   40018c:  08 20 f8 25  addiu   $24, $15, 8200
 
 # EXE: Disassembly of section .text:
 # EXE: glob:
-# EXE:   400190:  09 f8 20 03  jalr    $25
-# EXE:   400194:  00 00 00 00  nop
+# EXE-NEXT:   400190:  09 f8 20 03  jalr    $25
+# EXE-NEXT:   400194:  00 00 00 00  nop
 #
 # Jump to 'loc' label address
-# EXE:   400198:  6c 00 10 0c  jal     4194736
-# EXE:   40019c:  00 00 00 00  nop
+# EXE-NEXT:   400198:  6c 00 10 0c  jal     4194736
+# EXE-NEXT:   40019c:  00 00 00 00  nop
 #
 # EXE: loc:
 # Jump to 'glob' label address
-# EXE:   4001a0:  64 00 10 0c  jal     4194704
-# EXE:   4001a4:  00 00 00 00  nop
+# EXE-NEXT:   4001a0:  64 00 10 0c  jal     4194704
+# EXE-NEXT:   4001a4:  00 00 00 00  nop
 #
 # Jump to the first PLT entry (.plt + 32) for ext1 entry
-# EXE:   4001a8:  60 00 10 0c  jal     4194688
-# EXE:   4001ac:  00 00 00 00  nop
+# EXE-NEXT:   4001a8:  60 00 10 0c  jal     4194688
+# EXE-NEXT:   4001ac:  00 00 00 00  nop
 
 # EXE: Sections:
 # EXE: Idx Name          Size      Address          Type





More information about the llvm-commits mailing list