public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Another PA GAS testsuite fix
@ 2001-11-12  8:29 law
  2001-11-12 10:12 ` Alan Modra
  2001-11-23  8:26 ` law
  0 siblings, 2 replies; 17+ messages in thread
From: law @ 2001-11-12  8:29 UTC (permalink / raw)
  To: binutils


This just disables a "generic" test that is not suitable for the PA.

        * gas/all/gas.exp (incbin): Do not run on the PA.

Index: gas.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/all/gas.exp,v
retrieving revision 1.8
diff -c -3 -p -r1.8 gas.exp
*** gas.exp	2001/11/13 14:22:43	1.8
--- gas.exp	2001/11/23 16:25:10
*************** proc test_cond {} {
*** 152,159 ****
      }
  }
  
  # again, p2align doesn't work on c54x target
! if ![istarget *c54x*-*-*] then {
      test_cond
      run_dump_test incbin
  }
--- 152,162 ----
      }
  }
  
+ # This test is not suitable for the PA for various reasons
+ # not limited to the fact that it depends on specific section
+ # names appearing in the output file.
  # again, p2align doesn't work on c54x target
! if { ![istarget *c54x*-*-*] ![istarget hppa*-*-*] } then {
      test_cond
      run_dump_test incbin
  }



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Another PA GAS testsuite fix
  2001-11-12  8:29 Another PA GAS testsuite fix law
@ 2001-11-12 10:12 ` Alan Modra
  2001-11-12 11:27   ` law
                     ` (2 more replies)
  2001-11-23  8:26 ` law
  1 sibling, 3 replies; 17+ messages in thread
From: Alan Modra @ 2001-11-12 10:12 UTC (permalink / raw)
  To: law; +Cc: binutils

On Fri, Nov 23, 2001 at 09:25:54AM -0500, law@redhat.com wrote:
> 
> + # This test is not suitable for the PA for various reasons
> + # not limited to the fact that it depends on specific section
> + # names appearing in the output file.
>   # again, p2align doesn't work on c54x target
> ! if { ![istarget *c54x*-*-*] ![istarget hppa*-*-*] } then {
>       test_cond
>       run_dump_test incbin
>   }

Runs fine under hppa-linux

../as-new  -I$srcdir/$subdir -o dump.o /src/binutils-current/gas/testsuite/gas/all/incbin.s
/scsi/binutils/gas/testsuite/../../binutils/objdump  -s -j .data dump.o > dump.out
PASS: incbin

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Another PA GAS testsuite fix
  2001-11-12 10:12 ` Alan Modra
@ 2001-11-12 11:27   ` law
  2001-11-23 16:23     ` law
  2001-11-23 16:00   ` Alan Modra
  2001-12-07  8:45   ` law
  2 siblings, 1 reply; 17+ messages in thread
From: law @ 2001-11-12 11:27 UTC (permalink / raw)
  To: Alan Modra; +Cc: binutils

> On Fri, Nov 23, 2001 at 09:25:54AM -0500, law@redhat.com wrote:
> > 
> > + # This test is not suitable for the PA for various reasons
> > + # not limited to the fact that it depends on specific section
> > + # names appearing in the output file.
> >   # again, p2align doesn't work on c54x target
> > ! if { ![istarget *c54x*-*-*] ![istarget hppa*-*-*] } then {
> >       test_cond
> >       run_dump_test incbin
> >   }
> 
> Runs fine under hppa-linux
Probably because you're not using SOM.

Adding || hppa*-*-linux || hppa64* is probably the right thing to do.

jeff

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Another PA GAS testsuite fix
  2001-11-12  8:29 Another PA GAS testsuite fix law
  2001-11-12 10:12 ` Alan Modra
@ 2001-11-23  8:26 ` law
  1 sibling, 0 replies; 17+ messages in thread
From: law @ 2001-11-23  8:26 UTC (permalink / raw)
  To: binutils

This just disables a "generic" test that is not suitable for the PA.

        * gas/all/gas.exp (incbin): Do not run on the PA.

Index: gas.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/all/gas.exp,v
retrieving revision 1.8
diff -c -3 -p -r1.8 gas.exp
*** gas.exp	2001/11/13 14:22:43	1.8
--- gas.exp	2001/11/23 16:25:10
*************** proc test_cond {} {
*** 152,159 ****
      }
  }
  
  # again, p2align doesn't work on c54x target
! if ![istarget *c54x*-*-*] then {
      test_cond
      run_dump_test incbin
  }
--- 152,162 ----
      }
  }
  
+ # This test is not suitable for the PA for various reasons
+ # not limited to the fact that it depends on specific section
+ # names appearing in the output file.
  # again, p2align doesn't work on c54x target
! if { ![istarget *c54x*-*-*] ![istarget hppa*-*-*] } then {
      test_cond
      run_dump_test incbin
  }



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Another PA GAS testsuite fix
  2001-11-12 10:12 ` Alan Modra
  2001-11-12 11:27   ` law
@ 2001-11-23 16:00   ` Alan Modra
  2001-12-07  8:45   ` law
  2 siblings, 0 replies; 17+ messages in thread
From: Alan Modra @ 2001-11-23 16:00 UTC (permalink / raw)
  To: law; +Cc: binutils

On Fri, Nov 23, 2001 at 09:25:54AM -0500, law@redhat.com wrote:
> 
> + # This test is not suitable for the PA for various reasons
> + # not limited to the fact that it depends on specific section
> + # names appearing in the output file.
>   # again, p2align doesn't work on c54x target
> ! if { ![istarget *c54x*-*-*] ![istarget hppa*-*-*] } then {
>       test_cond
>       run_dump_test incbin
>   }

Runs fine under hppa-linux

../as-new  -I$srcdir/$subdir -o dump.o /src/binutils-current/gas/testsuite/gas/all/incbin.s
/scsi/binutils/gas/testsuite/../../binutils/objdump  -s -j .data dump.o > dump.out
PASS: incbin

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Another PA GAS testsuite fix
  2001-11-12 11:27   ` law
@ 2001-11-23 16:23     ` law
  0 siblings, 0 replies; 17+ messages in thread
From: law @ 2001-11-23 16:23 UTC (permalink / raw)
  To: Alan Modra; +Cc: binutils

> On Fri, Nov 23, 2001 at 09:25:54AM -0500, law@redhat.com wrote:
> > 
> > + # This test is not suitable for the PA for various reasons
> > + # not limited to the fact that it depends on specific section
> > + # names appearing in the output file.
> >   # again, p2align doesn't work on c54x target
> > ! if { ![istarget *c54x*-*-*] ![istarget hppa*-*-*] } then {
> >       test_cond
> >       run_dump_test incbin
> >   }
> 
> Runs fine under hppa-linux
Probably because you're not using SOM.

Adding || hppa*-*-linux || hppa64* is probably the right thing to do.

jeff

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Another PA GAS testsuite fix
  2001-11-12 10:12 ` Alan Modra
  2001-11-12 11:27   ` law
  2001-11-23 16:00   ` Alan Modra
@ 2001-12-07  8:45   ` law
  2001-12-07 16:25     ` Alan Modra
  2 siblings, 1 reply; 17+ messages in thread
From: law @ 2001-12-07  8:45 UTC (permalink / raw)
  To: Alan Modra; +Cc: binutils

  > Runs fine under hppa-linux
  > 
  > ../as-new  -I$srcdir/$subdir -o dump.o /src/binutils-current/gas/testsuite/
ga
  > s/all/incbin.s
  > /scsi/binutils/gas/testsuite/../../binutils/objdump  -s -j .data dump.o > 
dum
  > p.out
  > PASS: incbin
Actually, I don't see how this could possibly be working under PA-linux;
incbin.s is mal-formed PA assembly syntax.  Anything in column zero is a
label.

I'm curious how this test is managing to pass...
jeff


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Another PA GAS testsuite fix
  2001-12-07  8:45   ` law
@ 2001-12-07 16:25     ` Alan Modra
  2001-12-07 16:56       ` law
  0 siblings, 1 reply; 17+ messages in thread
From: Alan Modra @ 2001-12-07 16:25 UTC (permalink / raw)
  To: law; +Cc: binutils

On Fri, Dec 07, 2001 at 09:46:00AM -0700, law@redhat.com wrote:
>   > PASS: incbin
> Actually, I don't see how this could possibly be working under PA-linux;
> incbin.s is mal-formed PA assembly syntax.  Anything in column zero is a
> label.
> 
> I'm curious how this test is managing to pass...

Hmm, pa-linux _doesn't_ define LABELS_WITHOUT_COLONS.  I'd forgotten
that we didn't want that particular misfeature for linux.  :)

incbin.s needs fixing though.

 	* gas/all/incbin.s: Add spaces before directives.

Index: gas/all/incbin.s
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/all/incbin.s,v
retrieving revision 1.1
diff -u -p -r1.1 incbin.s
--- incbin.s    2001/07/09 08:19:18     1.1
+++ incbin.s    2001/12/08 00:24:36
@@ -1,5 +1,5 @@
-.data
-.incbin "incbin.s"
-.incbin "incbin.s",0,28
-.incbin "incbin.s",15,9
-.p2align 4
+ .data
+ .incbin "incbin.s"
+ .incbin "incbin.s",0,28
+ .incbin "incbin.s",15,9
+ .p2align 4

Alan

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Another PA GAS testsuite fix
  2001-12-07 16:25     ` Alan Modra
@ 2001-12-07 16:56       ` law
  2001-12-07 18:03         ` Alan Modra
  0 siblings, 1 reply; 17+ messages in thread
From: law @ 2001-12-07 16:56 UTC (permalink / raw)
  To: Alan Modra; +Cc: binutils

  > Hmm, pa-linux _doesn't_ define LABELS_WITHOUT_COLONS.  I'd forgotten
  > that we didn't want that particular misfeature for linux.  :)
Ahhh.  Yes.  Definitely a mis-feature.  Everyone loves compatibility...


  > incbin.s needs fixing though.
  > 
  >  	* gas/all/incbin.s: Add spaces before directives.
Don't you also have to twiddle the expected output too?

jeff

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Another PA GAS testsuite fix
  2001-12-07 16:56       ` law
@ 2001-12-07 18:03         ` Alan Modra
  2001-12-09  5:36           ` Anders Norlander
  0 siblings, 1 reply; 17+ messages in thread
From: Alan Modra @ 2001-12-07 18:03 UTC (permalink / raw)
  To: law; +Cc: binutils

On Fri, Dec 07, 2001 at 05:57:25PM -0700, law@redhat.com wrote:
>   >  	* gas/all/incbin.s: Add spaces before directives.
> Don't you also have to twiddle the expected output too?

Yeah.  You caught me making an "obvious" change without testing.
This file includes itself..

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Another PA GAS testsuite fix
  2001-12-07 18:03         ` Alan Modra
@ 2001-12-09  5:36           ` Anders Norlander
  2001-12-10 15:21             ` law
  0 siblings, 1 reply; 17+ messages in thread
From: Anders Norlander @ 2001-12-09  5:36 UTC (permalink / raw)
  To: Alan Modra; +Cc: law, binutils

On Sat, 2001-12-08 at 03:03, Alan Modra wrote:
> On Fri, Dec 07, 2001 at 05:57:25PM -0700, law@redhat.com wrote:
> >   >  	* gas/all/incbin.s: Add spaces before directives.
> > Don't you also have to twiddle the expected output too?
> 
> Yeah.  You caught me making an "obvious" change without testing.
> This file includes itself..
> 
> 

I believe I'm to blame here. It doesn't seem like a good idea at all to
include the source file itself for the test. Really it should test including
a "binary" file different from the .s file itself, also I suspect that if
anybody would run the test on cygwin or similar platform it would fail because
of CRLF issues.

How about this patch, would that work on all platforms (including SOM)?
It adds another file called incbin.dat which unfortunately have to be
added as a binary otherwise various tools would insist on putting
a newline at the end.

2001-12-09  Anders Norlander  <anorland@synergenix.se>

	* gas/all/incbin.dat: New file.
	* gas/all/incbin.s: Use incbin.dat instead of incbin.s.
	* gas/all/incbin.d: Reflect change in incbin.s


-Anders



--- incbin.d.orig	Sat Dec  8 03:11:00 2001
+++ incbin.d	Sun Dec  9 14:24:02 2001
@@ -1,17 +1,13 @@
 #as: -I$srcdir/$subdir
-#objdump: -s -j .data
+#objdump: -s -j .text
 #name: incbin
 
 # Test the incbin pseudo-op
 
 .*: .*
 
-Contents of section .data:
- 0000 202e6461 74610a20 2e696e63 62696e20   .data. .incbin 
- 0010 22696e63 62696e2e 73220a20 2e696e63  "incbin.s". .inc
- 0020 62696e20 22696e63 62696e2e 73222c30  bin "incbin.s",0
- 0030 2c32380a 202e696e 6362696e 2022696e  ,28. .incbin "in
- 0040 6362696e 2e73222c 31352c39 0a202e70  cbin.s",15,9. .p
- 0050 32616c69 676e2034 0a202e64 6174610a  2align 4. .data.
- 0060 202e696e 6362696e 2022696e 6362696e   .incbin "incbin
- 0070 2e73220a 20202269 6e636269 6e2e0000  .s".  "incbin...
+Contents of section .text:
+ 0000 38383838 38383838 0c313232 3333330c  88888888.122333.
+ 0010 534f4d45 4d4f5245 44415441 44415441  SOMEMOREDATADATA
+ 0020 38383838 38383838 0c313232 3333330c  88888888.122333.
+ 0030 534f4d45 4d4f5245 44415441 44415441  SOMEMOREDATADATA
--- incbin.s.orig	Sat Dec  8 01:25:26 2001
+++ incbin.s	Sun Dec  9 14:21:17 2001
@@ -1,5 +1,5 @@
- .data
- .incbin "incbin.s"
- .incbin "incbin.s",0,28
- .incbin "incbin.s",15,9
- .p2align 4
+	.text
+	.incbin "incbin.dat"
+	.incbin "incbin.dat",0,8
+	.incbin "incbin.dat",8,8
+	.incbin "incbin.dat",16,16


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Another PA GAS testsuite fix
  2001-12-09  5:36           ` Anders Norlander
@ 2001-12-10 15:21             ` law
  2001-12-18  4:23               ` Nick Clifton
  0 siblings, 1 reply; 17+ messages in thread
From: law @ 2001-12-10 15:21 UTC (permalink / raw)
  To: Anders Norlander; +Cc: Alan Modra, binutils

  > On Sat, 2001-12-08 at 03:03, Alan Modra wrote:
  > How about this patch, would that work on all platforms (including SOM)?
  > It adds another file called incbin.dat which unfortunately have to be
  > added as a binary otherwise various tools would insist on putting
  > a newline at the end.
I'll let Nick comment on the patch itself.  It probably still won't work
for SOM as it depends on finding specific section names in the output.
SOM for various reasons uses different section naming conventions than the
rest of the world :(

jeff

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Another PA GAS testsuite fix
  2001-12-10 15:21             ` law
@ 2001-12-18  4:23               ` Nick Clifton
  2001-12-18  9:20                 ` Hans-Peter Nilsson
  0 siblings, 1 reply; 17+ messages in thread
From: Nick Clifton @ 2001-12-18  4:23 UTC (permalink / raw)
  To: anorland; +Cc: law, binutils

Hi Anders,

> 2001-12-09  Anders Norlander  <anorland@synergenix.se>
> 
>       * gas/all/incbin.dat: New file.
> 	* gas/all/incbin.s: Use incbin.dat instead of incbin.s.
> 	* gas/all/incbin.d: Reflect change in incbin.s

Approved.  Please apply.

Note - you did not include incbin.dat in the patch submission...  Of
course it is a binary file, but it could have been MIME encoded.

Cheers
        Nick



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Another PA GAS testsuite fix
  2001-12-18  4:23               ` Nick Clifton
@ 2001-12-18  9:20                 ` Hans-Peter Nilsson
  2001-12-19  1:19                   ` Anders Norlander
  0 siblings, 1 reply; 17+ messages in thread
From: Hans-Peter Nilsson @ 2001-12-18  9:20 UTC (permalink / raw)
  To: Nick Clifton; +Cc: anorland, binutils

On 18 Dec 2001, Nick Clifton wrote:
> Note - you did not include incbin.dat in the patch submission...  Of
> course it is a binary file, but it could have been MIME encoded.

(Not that incbin.dat looks particularly binary, but:)

Aren't we supposed to avoid binary "source" files.  What would
update patches, like a binutils-2.11-2.12.diff.gz look like?

brgds, H-P

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Another PA GAS testsuite fix
  2001-12-18  9:20                 ` Hans-Peter Nilsson
@ 2001-12-19  1:19                   ` Anders Norlander
  2001-12-19  2:56                     ` Alan Modra
  2001-12-21  3:50                     ` Nick Clifton
  0 siblings, 2 replies; 17+ messages in thread
From: Anders Norlander @ 2001-12-19  1:19 UTC (permalink / raw)
  To: Hans-Peter Nilsson; +Cc: Nick Clifton, binutils

[-- Attachment #1: Type: text/plain, Size: 818 bytes --]

On Tue, 2001-12-18 at 18:11, Hans-Peter Nilsson wrote:
> On 18 Dec 2001, Nick Clifton wrote:
> > Note - you did not include incbin.dat in the patch submission...  Of
Oops, so I did.

> > course it is a binary file, but it could have been MIME encoded.
> (Not that incbin.dat looks particularly binary, but:)
> 
> Aren't we supposed to avoid binary "source" files.  What would
> update patches, like a binutils-2.11-2.12.diff.gz look like?

Hmm, yes that's a problem. The windres tests do it and I believe there
was a discussion about ASCII encoding the files and binifying them
when running the tests. The only problem I see is that this test would
fail on CRLF platforms (like cygwin text-mounts) since that would
change the "binary" source file.

Here's the patch + incbin.dat.

If it's ok, please commit.

-Anders


[-- Attachment #2: incbin-test.diff --]
[-- Type: text/plain, Size: 1727 bytes --]

Index: incbin.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/all/incbin.d,v
retrieving revision 1.2
diff -u -p -r1.2 incbin.d
--- incbin.d	2001/12/08 02:11:00	1.2
+++ incbin.d	2001/12/19 08:42:06
@@ -1,17 +1,13 @@
 #as: -I$srcdir/$subdir
-#objdump: -s -j .data
+#objdump: -s -j .text
 #name: incbin
 
 # Test the incbin pseudo-op
 
 .*: .*
 
-Contents of section .data:
- 0000 202e6461 74610a20 2e696e63 62696e20   .data. .incbin 
- 0010 22696e63 62696e2e 73220a20 2e696e63  "incbin.s". .inc
- 0020 62696e20 22696e63 62696e2e 73222c30  bin "incbin.s",0
- 0030 2c32380a 202e696e 6362696e 2022696e  ,28. .incbin "in
- 0040 6362696e 2e73222c 31352c39 0a202e70  cbin.s",15,9. .p
- 0050 32616c69 676e2034 0a202e64 6174610a  2align 4. .data.
- 0060 202e696e 6362696e 2022696e 6362696e   .incbin "incbin
- 0070 2e73220a 20202269 6e636269 6e2e0000  .s".  "incbin...
+Contents of section .text:
+ 0000 38383838 38383838 0c313232 3333330c  88888888.122333.
+ 0010 534f4d45 4d4f5245 44415441 44415441  SOMEMOREDATADATA
+ 0020 38383838 38383838 0c313232 3333330c  88888888.122333.
+ 0030 534f4d45 4d4f5245 44415441 44415441  SOMEMOREDATADATA
Index: incbin.s
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/all/incbin.s,v
retrieving revision 1.2
diff -u -p -r1.2 incbin.s
--- incbin.s	2001/12/08 00:25:26	1.2
+++ incbin.s	2001/12/19 08:42:06
@@ -1,5 +1,5 @@
- .data
- .incbin "incbin.s"
- .incbin "incbin.s",0,28
- .incbin "incbin.s",15,9
- .p2align 4
+	.text
+	.incbin "incbin.dat"
+	.incbin "incbin.dat",0,8
+	.incbin "incbin.dat",8,8
+	.incbin "incbin.dat",16,16

[-- Attachment #3: incbin.dat --]
[-- Type: video/mpeg, Size: 32 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Another PA GAS testsuite fix
  2001-12-19  1:19                   ` Anders Norlander
@ 2001-12-19  2:56                     ` Alan Modra
  2001-12-21  3:50                     ` Nick Clifton
  1 sibling, 0 replies; 17+ messages in thread
From: Alan Modra @ 2001-12-19  2:56 UTC (permalink / raw)
  To: Anders Norlander; +Cc: Hans-Peter Nilsson, Nick Clifton, binutils

On Wed, Dec 19, 2001 at 09:55:19AM +0100, Anders Norlander wrote:
> 
> when running the tests. The only problem I see is that this test would
> fail on CRLF platforms (like cygwin text-mounts) since that would
> change the "binary" source file.

I'd prefer to leave the test as is.  Since ".incbin" should definitely
_not_ do CRLF translation, it would be a small improvement to ensure
some CR,LF pairs were in the test data.  However, I'm not sure whether
they would survive CVS check-in/out.

Alan

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Another PA GAS testsuite fix
  2001-12-19  1:19                   ` Anders Norlander
  2001-12-19  2:56                     ` Alan Modra
@ 2001-12-21  3:50                     ` Nick Clifton
  1 sibling, 0 replies; 17+ messages in thread
From: Nick Clifton @ 2001-12-21  3:50 UTC (permalink / raw)
  To: anorland; +Cc: binutils

Hi Anders,

> Hmm, yes that's a problem. The windres tests do it and I believe there
> was a discussion about ASCII encoding the files and binifying them
> when running the tests. The only problem I see is that this test would
> fail on CRLF platforms (like cygwin text-mounts) since that would
> change the "binary" source file.
> 
> Here's the patch + incbin.dat.
> 
> If it's ok, please commit.

Approved and applied.  If the binary file proves to be a problem we
will have to rethink.

Cheers
        Nick

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2001-12-21 11:43 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-12  8:29 Another PA GAS testsuite fix law
2001-11-12 10:12 ` Alan Modra
2001-11-12 11:27   ` law
2001-11-23 16:23     ` law
2001-11-23 16:00   ` Alan Modra
2001-12-07  8:45   ` law
2001-12-07 16:25     ` Alan Modra
2001-12-07 16:56       ` law
2001-12-07 18:03         ` Alan Modra
2001-12-09  5:36           ` Anders Norlander
2001-12-10 15:21             ` law
2001-12-18  4:23               ` Nick Clifton
2001-12-18  9:20                 ` Hans-Peter Nilsson
2001-12-19  1:19                   ` Anders Norlander
2001-12-19  2:56                     ` Alan Modra
2001-12-21  3:50                     ` Nick Clifton
2001-11-23  8:26 ` law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).