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]: Gold testsuite fixes


David Miller <davem@davemloft.net> writes:

> This implements the testsuite fixups needed for sparc, which were
> discussed the other day.
>
> 2008-04-10  David S. Miller  <davem@davemloft.net>
>
> 	* testsuite/justsyms.t: Start at 0x100.
> 	* testsuite/justsyms_1.cc: Adjust justsyms_string assertion.
> 	* script_test_2b.cc (script_test_string_b): Make 8 bytes long.
> 	* script_test_2.cc: Adjust string and section length checks.

I had to adjust this a little bit to pass on i386, as follows.
Hopefully it will still pass on SPARC.

I also noticed a missing dependency, which I fixed in this patch also.

Ian


2008-04-11  Ian Lance Taylor  <iant@google.com>

	* testsuite/Makefile.am (justsyms_2r.o): Add dependency on
	justsyms.t.
	* testsuite/Makefile.in: Rebuild.

	* testsuite/script_test_2a.cc (script_test_string_a): Make 8 bytes
	long.
	* testsuite/script_test_2.cc (main): Adjust test.


Index: testsuite/Makefile.am
===================================================================
RCS file: /cvs/src/src/gold/testsuite/Makefile.am,v
retrieving revision 1.59
diff -u -p -r1.59 Makefile.am
--- testsuite/Makefile.am	10 Apr 2008 01:02:46 -0000	1.59
+++ testsuite/Makefile.am	11 Apr 2008 20:43:06 -0000
@@ -664,7 +664,7 @@ justsyms_DEPENDENCIES = gcctestdir/ld ju
 justsyms_LDFLAGS = -Bgcctestdir/ -Wl,-R,justsyms_2r.o
 justsyms_2.o: justsyms_2.cc
 	$(CXXCOMPILE) -c -o $@ $<
-justsyms_2r.o: justsyms_2.o gcctestdir/ld
+justsyms_2r.o: justsyms_2.o gcctestdir/ld $(srcdir)/justsyms.t
 	gcctestdir/ld -o $@ -r -T $(srcdir)/justsyms.t justsyms_2.o
 
 check_PROGRAMS += binary_test
Index: testsuite/script_test_2.cc
===================================================================
RCS file: /cvs/src/src/gold/testsuite/script_test_2.cc,v
retrieving revision 1.2
diff -u -p -r1.2 script_test_2.cc
--- testsuite/script_test_2.cc	11 Apr 2008 18:49:40 -0000	1.2
+++ testsuite/script_test_2.cc	11 Apr 2008 20:43:06 -0000
@@ -51,7 +51,7 @@ main(int, char**)
   // Next the string from script_test_2a.o, after the subalign.
   for (int i = 16 + 7; i < 48; ++i)
     assert(start_test_area_1[i] == 0);
-  assert(strcmp(start_test_area_1 + 48, "test a") == 0);
+  assert(strcmp(start_test_area_1 + 48, "test aa") == 0);
 
   // Move four bytes forward to start_data.
   assert(reinterpret_cast<uintptr_t>(start_test_area_1 + 48 + 8 + 4)
Index: testsuite/script_test_2a.cc
===================================================================
RCS file: /cvs/src/src/gold/testsuite/script_test_2a.cc,v
retrieving revision 1.1
diff -u -p -r1.1 script_test_2a.cc
--- testsuite/script_test_2a.cc	4 Feb 2008 05:43:05 -0000	1.1
+++ testsuite/script_test_2a.cc	11 Apr 2008 20:43:06 -0000
@@ -21,4 +21,4 @@
 // MA 02110-1301, USA.
 
 char script_test_string_a[] __attribute__ ((section(".gold_test"))) =
-  "test a";
+  "test aa";

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