This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH]: fail gas tests which expect an error but don't get an error


Hi Chris,

gas/testsuite/ChangeLog:
2008-09-04  Christian Groessler  <chris@groessler.org>

	* lib/gas-defs.exp (run_dump_test): If the test expects an error,
	fail the test if gas doesn't report an error.

Approved and applied.


I applied the patch myself since I tested it locally. Sure enough there were some regressions - with the arm-vxworks port. So I have also checked in the attached patch to update those tests.

Cheers
  Nick

gas/testsuite/ChangeLog
2008-09-05  Nick Clifton  <nickc@redhat.com>

	* gas/arm/abs12.d: Update expected disassembly.
	* gas/arm/tls_vxworks.d: Likewise.
	* gas/arm/unwind_vxworks.d: Likewise.
	* gas/arm/group-reloc-alu-encoding-bad.d: Skip for vxworks
	targets.
	* gas/arm/group-reloc-alu.d: Likewise.
	* gas/arm/group-reloc-ldc-encoding-bad.d: Likewise.
	* gas/arm/group-reloc-ldc.d: Likewise.
	* gas/arm/group-reloc-ldr-encoding-bad.d: Likewise.
	* gas/arm/group-reloc-ldr.d: Likewise.
	* gas/arm/group-reloc-ldrs-encoding-bad.d: Likewise.
	* gas/arm/group-reloc-ldrs.d: Likewise.
	* gas/arm/local_function.d: Likewise.
	* gas/arm/mapshort-elf.d: Likewise.
	* gas/arm/undefined.d: Likewise.
Index: gas/testsuite/gas/arm/abs12.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/arm/abs12.d,v
retrieving revision 1.1
diff -c -3 -p -r1.1 abs12.d
*** gas/testsuite/gas/arm/abs12.d	7 Mar 2006 08:39:21 -0000	1.1
--- gas/testsuite/gas/arm/abs12.d	5 Sep 2008 11:19:28 -0000
***************
*** 5,11 ****
  
  Disassembly of section \.text:
  
! 00000000 <\.text>:
     0:	e5910000 	ldr	r0, \[r1\]
  			0: R_ARM_ABS12	global
     4:	e5910000 	ldr	r0, \[r1\]
--- 5,11 ----
  
  Disassembly of section \.text:
  
! 00000000 <.*>:
     0:	e5910000 	ldr	r0, \[r1\]
  			0: R_ARM_ABS12	global
     4:	e5910000 	ldr	r0, \[r1\]
Index: gas/testsuite/gas/arm/group-reloc-alu-encoding-bad.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/arm/group-reloc-alu-encoding-bad.d,v
retrieving revision 1.2
diff -c -3 -p -r1.2 group-reloc-alu-encoding-bad.d
*** gas/testsuite/gas/arm/group-reloc-alu-encoding-bad.d	18 Jun 2006 10:05:27 -0000	1.2
--- gas/testsuite/gas/arm/group-reloc-alu-encoding-bad.d	5 Sep 2008 11:19:28 -0000
***************
*** 1,3 ****
  #name: Group relocation tests, encoding failures (alu)
! #skip: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
  #error-output: group-reloc-alu-encoding-bad.l
--- 1,3 ----
  #name: Group relocation tests, encoding failures (alu)
! #skip: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix* *-*-vxworks
  #error-output: group-reloc-alu-encoding-bad.l
Index: gas/testsuite/gas/arm/group-reloc-alu.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/arm/group-reloc-alu.d,v
retrieving revision 1.2
diff -c -3 -p -r1.2 group-reloc-alu.d
*** gas/testsuite/gas/arm/group-reloc-alu.d	18 Jun 2006 10:05:27 -0000	1.2
--- gas/testsuite/gas/arm/group-reloc-alu.d	5 Sep 2008 11:19:28 -0000
***************
*** 1,5 ****
  #objdump: -dr --prefix-addresses --show-raw-insn
! #skip: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
  #name: Group relocation tests (alu)
  
  .*: +file format .*arm.*
--- 1,5 ----
  #objdump: -dr --prefix-addresses --show-raw-insn
! #skip: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix* *-*-vxworks
  #name: Group relocation tests (alu)
  
  .*: +file format .*arm.*
Index: gas/testsuite/gas/arm/group-reloc-ldc-encoding-bad.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/arm/group-reloc-ldc-encoding-bad.d,v
retrieving revision 1.2
diff -c -3 -p -r1.2 group-reloc-ldc-encoding-bad.d
*** gas/testsuite/gas/arm/group-reloc-ldc-encoding-bad.d	18 Jun 2006 10:05:27 -0000	1.2
--- gas/testsuite/gas/arm/group-reloc-ldc-encoding-bad.d	5 Sep 2008 11:19:28 -0000
***************
*** 1,3 ****
  #name: Group relocation tests, encoding failures (ldc)
! #skip: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
  #error-output: group-reloc-ldc-encoding-bad.l
--- 1,3 ----
  #name: Group relocation tests, encoding failures (ldc)
! #skip: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix* *-*-vxworks
  #error-output: group-reloc-ldc-encoding-bad.l
Index: gas/testsuite/gas/arm/group-reloc-ldc.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/arm/group-reloc-ldc.d,v
retrieving revision 1.2
diff -c -3 -p -r1.2 group-reloc-ldc.d
*** gas/testsuite/gas/arm/group-reloc-ldc.d	18 Jun 2006 10:05:27 -0000	1.2
--- gas/testsuite/gas/arm/group-reloc-ldc.d	5 Sep 2008 11:19:28 -0000
***************
*** 1,5 ****
  #objdump: -dr --prefix-addresses --show-raw-insn
! #skip: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
  #name: Group relocation tests (ldc)
  
  .*: +file format .*arm.*
--- 1,5 ----
  #objdump: -dr --prefix-addresses --show-raw-insn
! #skip: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix* *-*-vxworks
  #name: Group relocation tests (ldc)
  
  .*: +file format .*arm.*
Index: gas/testsuite/gas/arm/group-reloc-ldr-encoding-bad.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/arm/group-reloc-ldr-encoding-bad.d,v
retrieving revision 1.2
diff -c -3 -p -r1.2 group-reloc-ldr-encoding-bad.d
*** gas/testsuite/gas/arm/group-reloc-ldr-encoding-bad.d	18 Jun 2006 10:05:27 -0000	1.2
--- gas/testsuite/gas/arm/group-reloc-ldr-encoding-bad.d	5 Sep 2008 11:19:28 -0000
***************
*** 1,3 ****
  #name: Group relocation tests, encoding failures (ldr)
! #skip: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
  #error-output: group-reloc-ldr-encoding-bad.l
--- 1,3 ----
  #name: Group relocation tests, encoding failures (ldr)
! #skip: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix* *-*-vxworks
  #error-output: group-reloc-ldr-encoding-bad.l
Index: gas/testsuite/gas/arm/group-reloc-ldr.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/arm/group-reloc-ldr.d,v
retrieving revision 1.2
diff -c -3 -p -r1.2 group-reloc-ldr.d
*** gas/testsuite/gas/arm/group-reloc-ldr.d	18 Jun 2006 10:05:27 -0000	1.2
--- gas/testsuite/gas/arm/group-reloc-ldr.d	5 Sep 2008 11:19:28 -0000
***************
*** 1,5 ****
  #objdump: -dr --prefix-addresses --show-raw-insn
! #skip: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
  #name: Group relocation tests (ldr)
  
  .*: +file format .*arm.*
--- 1,5 ----
  #objdump: -dr --prefix-addresses --show-raw-insn
! #skip: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix* *-*-vxworks
  #name: Group relocation tests (ldr)
  
  .*: +file format .*arm.*
Index: gas/testsuite/gas/arm/group-reloc-ldrs-encoding-bad.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/arm/group-reloc-ldrs-encoding-bad.d,v
retrieving revision 1.2
diff -c -3 -p -r1.2 group-reloc-ldrs-encoding-bad.d
*** gas/testsuite/gas/arm/group-reloc-ldrs-encoding-bad.d	18 Jun 2006 10:05:27 -0000	1.2
--- gas/testsuite/gas/arm/group-reloc-ldrs-encoding-bad.d	5 Sep 2008 11:19:28 -0000
***************
*** 1,3 ****
  #name: Group relocation tests, encoding failures (ldrs)
! #skip: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
  #error-output: group-reloc-ldrs-encoding-bad.l
--- 1,3 ----
  #name: Group relocation tests, encoding failures (ldrs)
! #skip: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix* *-*-vxworks
  #error-output: group-reloc-ldrs-encoding-bad.l
Index: gas/testsuite/gas/arm/group-reloc-ldrs.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/arm/group-reloc-ldrs.d,v
retrieving revision 1.2
diff -c -3 -p -r1.2 group-reloc-ldrs.d
*** gas/testsuite/gas/arm/group-reloc-ldrs.d	18 Jun 2006 10:05:27 -0000	1.2
--- gas/testsuite/gas/arm/group-reloc-ldrs.d	5 Sep 2008 11:19:28 -0000
***************
*** 1,5 ****
  #objdump: -dr --prefix-addresses --show-raw-insn
! #skip: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
  #name: Group relocation tests (ldrs)
  
  .*: +file format .*arm.*
--- 1,5 ----
  #objdump: -dr --prefix-addresses --show-raw-insn
! #skip: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix* *-*-vxworks
  #name: Group relocation tests (ldrs)
  
  .*: +file format .*arm.*
Index: gas/testsuite/gas/arm/local_function.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/arm/local_function.d,v
retrieving revision 1.1
diff -c -3 -p -r1.1 local_function.d
*** gas/testsuite/gas/arm/local_function.d	11 May 2006 15:05:17 -0000	1.1
--- gas/testsuite/gas/arm/local_function.d	5 Sep 2008 11:19:28 -0000
***************
*** 1,7 ****
  #objdump: -r
  #name: Relocations agains local function symbols
  # This test is only valid on ELF based ports.
! #not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
  
  .*:     file format.*
  
--- 1,7 ----
  #objdump: -r
  #name: Relocations agains local function symbols
  # This test is only valid on ELF based ports.
! #not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix* *-*-vxworks
  
  .*:     file format.*
  
Index: gas/testsuite/gas/arm/mapshort-elf.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/arm/mapshort-elf.d,v
retrieving revision 1.3
diff -c -3 -p -r1.3 mapshort-elf.d
*** gas/testsuite/gas/arm/mapshort-elf.d	19 Jul 2007 16:47:40 -0000	1.3
--- gas/testsuite/gas/arm/mapshort-elf.d	5 Sep 2008 11:19:28 -0000
***************
*** 1,7 ****
  #objdump: --syms --special-syms -d
  #name: ARM Mapping Symbols for .short (ELF version)
  # This test is only valid on ELF based ports.
! #not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix* *-*-*eabi *-*-syymbianelf *-*-linux-*
  #source: mapshort.s
  
  # Test the generation and use of ARM ELF Mapping Symbols
--- 1,7 ----
  #objdump: --syms --special-syms -d
  #name: ARM Mapping Symbols for .short (ELF version)
  # This test is only valid on ELF based ports.
! #not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix* *-*-*eabi *-*-syymbianelf *-*-linux-* *-*-vxworks
  #source: mapshort.s
  
  # Test the generation and use of ARM ELF Mapping Symbols
Index: gas/testsuite/gas/arm/tls_vxworks.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/arm/tls_vxworks.d,v
retrieving revision 1.1
diff -c -3 -p -r1.1 tls_vxworks.d
*** gas/testsuite/gas/arm/tls_vxworks.d	4 Jul 2005 14:57:45 -0000	1.1
--- gas/testsuite/gas/arm/tls_vxworks.d	5 Sep 2008 11:19:28 -0000
*************** Disassembly of section .text:
*** 16,30 ****
     0:	e1a00000 	nop			\(mov r0,r0\)
     4:	e1a00000 	nop			\(mov r0,r0\)
     8:	e1a0f00e 	mov	pc, lr
!    c:	00000000 	andeq	r0, r0, r0
  			c: R_ARM_TLS_GD32	a
  # ??? The addend is appearing in both the RELA field and the
  # contents.  Shouldn't it be just one?  bfd_install_relocation
  # appears to write the addend into the contents unconditionally,
  # yet somehow this does not happen for the majority of relocations.
!   10:	00000004 	andeq	r0, r0, r4
  			10: R_ARM_TLS_LDM32	b\+0x4
!   14:	00000008 	andeq	r0, r0, r8
  			14: R_ARM_TLS_IE32	c\+0x8
!   18:	00000000 	andeq	r0, r0, r0
  			18: R_ARM_TLS_LE32	d
--- 16,30 ----
     0:	e1a00000 	nop			\(mov r0,r0\)
     4:	e1a00000 	nop			\(mov r0,r0\)
     8:	e1a0f00e 	mov	pc, lr
!    c:	00000000 	.word	0x00000000
  			c: R_ARM_TLS_GD32	a
  # ??? The addend is appearing in both the RELA field and the
  # contents.  Shouldn't it be just one?  bfd_install_relocation
  # appears to write the addend into the contents unconditionally,
  # yet somehow this does not happen for the majority of relocations.
!   10:	00000004 	.word	0x00000004
  			10: R_ARM_TLS_LDM32	b\+0x4
!   14:	00000008 	.word	0x00000008
  			14: R_ARM_TLS_IE32	c\+0x8
!   18:	00000000 	.word	0x00000000
  			18: R_ARM_TLS_LE32	d
Index: gas/testsuite/gas/arm/undefined.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/arm/undefined.d,v
retrieving revision 1.2
diff -c -3 -p -r1.2 undefined.d
*** gas/testsuite/gas/arm/undefined.d	10 Nov 2006 07:35:20 -0000	1.2
--- gas/testsuite/gas/arm/undefined.d	5 Sep 2008 11:19:28 -0000
***************
*** 1,5 ****
  #name: Undefined local label error
  # COFF and aout based ports, except Windows CE, 
  # use a different naming convention for local labels.
! #skip: *-*-*coff *-unknown-pe *-epoc-pe *-*-*aout* *-*-netbsd *-*-riscix*
  #error-output: undefined.l
--- 1,5 ----
  #name: Undefined local label error
  # COFF and aout based ports, except Windows CE, 
  # use a different naming convention for local labels.
! #skip: *-*-*coff *-unknown-pe *-epoc-pe *-*-*aout* *-*-netbsd *-*-riscix* *-*-vxworks
  #error-output: undefined.l
Index: gas/testsuite/gas/arm/unwind_vxworks.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/arm/unwind_vxworks.d,v
retrieving revision 1.5
diff -c -3 -p -r1.5 unwind_vxworks.d
*** gas/testsuite/gas/arm/unwind_vxworks.d	16 Sep 2006 16:24:28 -0000	1.5
--- gas/testsuite/gas/arm/unwind_vxworks.d	5 Sep 2008 11:19:28 -0000
*************** OFFSET   TYPE              VALUE 
*** 30,36 ****
  
  Contents of section .text:
   0000 (0000a0e3 0100a0e3 0200a0e3 0300a0e3|e3a00000 e3a00001 e3a00002 e3a00003)  .*
!  0010 (04200520|20052004)                             .*
  Contents of section .ARM.extab:
   0000 (449b0181 b0b08086|81019b44 8680b0b0) 00000000 00000000  .*
   0010 (8402b101 b0b0b005 2a000000 00c60281|01b10284 05b0b0b0 0000002a 8102c600)  .*
--- 30,36 ----
  
  Contents of section .text:
   0000 (0000a0e3 0100a0e3 0200a0e3 0300a0e3|e3a00000 e3a00001 e3a00002 e3a00003)  .*
!  0010 (04200520|20052004) .*
  Contents of section .ARM.extab:
   0000 (449b0181 b0b08086|81019b44 8680b0b0) 00000000 00000000  .*
   0010 (8402b101 b0b0b005 2a000000 00c60281|01b10284 05b0b0b0 0000002a 8102c600)  .*

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]