[PATCH] A few Cygwin testsuite fixes.

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] A few Cygwin testsuite fixes.

pedro_alves (Bugzilla)
Hi all,

This patch fixes a few fails on i686-pc-cygwin.
 - It adds a few missing $EXEEXT.
 - Adds a new $DLLEXT variable for the dynamic library tests and uses it.

Please review and commit.

Cheers,
Pedro Alves

---
gdb/testsuite/ChangeLog:

2006-12-10  Pedro Alves  <[hidden email]>

    * configure.ac: Check dynamic library extension.  Pass down DLLEXT.
    * configure: Regenerate.
    * Makefile.in (DLLEXT): New variable.
    (just-check): Export DLLEXT.
    * lib/gdb.exp ($DLLEXT): Import from environment.
    * gdb.base/annota1.exp ($binfile): Append $EXEEXT.
    Expect "Loaded symbols for .*".
    * gdb.base/gdb1555.exp ($libobj): Append $DLLEXT instead of ".so".
    * gdb.base/pending.exp ($lib_sl): Append $DLLEXT instead of ".sl".
    * gdb.base/so-impl-ld.exp ($lib_sl): Append $DLLEXT instead of ".sl".


Index: configure.ac
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/configure.ac,v
retrieving revision 1.5
diff -u -p -r1.5 configure.ac
--- configure.ac 21 Jun 2006 13:57:21 -0000 1.5
+++ configure.ac 10 Dec 2006 13:27:07 -0000
@@ -110,6 +110,18 @@ AC_CHECK_HEADERS(pthread.h)
 
 AC_EXEEXT
 
+AC_MSG_CHECKING(for dynamic library extension)
+case $target in
+  *-*-cygwin* | *-*-mingw* | *-*-pe*)
+    DLLEXT=".dll"
+    ;;
+  *)
+    DLLEXT=".so"
+    ;;
+esac
+AC_MSG_RESULT($DLLEXT)
+AC_SUBST(DLLEXT)
+
 AC_OUTPUT([Makefile \
   gdb.ada/Makefile \
   gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile \
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/Makefile.in,v
retrieving revision 1.14
diff -u -p -r1.14 Makefile.in
--- Makefile.in 21 Jun 2006 13:57:21 -0000 1.14
+++ Makefile.in 10 Dec 2006 13:27:07 -0000
@@ -33,6 +33,7 @@ target_cpu = @gdb_target_cpu@
 
 SHELL = @SHELL@
 EXEEXT = @EXEEXT@
+DLLEXT = @DLLEXT@
 SUBDIRS = @subdirs@
 RPATH_ENVVAR = @RPATH_ENVVAR@
 ALL_SUBDIRS = gdb.ada gdb.arch gdb.asm gdb.base gdb.cp gdb.disasm \
@@ -128,6 +129,7 @@ just-check:
  srcdir=${srcdir} ; export srcdir ; \
  EXPECT=${EXPECT} ; export EXPECT ; \
  EXEEXT=${EXEEXT} ; export EXEEXT ; \
+ DLLEXT=${DLLEXT} ; export DLLEXT ; \
         $(RPATH_ENVVAR)=$$rootme/../../expect:$$rootme/../../libstdc++:$$rootme/../../tk/unix:$$rootme/../../tcl/unix:$$rootme/../../bfd:$$rootme/../../opcodes:$$$(RPATH_ENVVAR); \
  export $(RPATH_ENVVAR); \
  if [ -f $${rootme}/../../expect/expect ] ; then  \
Index: lib/gdb.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v
retrieving revision 1.72
diff -u -p -r1.72 gdb.exp
--- lib/gdb.exp 10 Nov 2006 16:58:53 -0000 1.72
+++ lib/gdb.exp 10 Dec 2006 13:27:12 -0000
@@ -73,6 +73,7 @@ set fullname_syntax "($fullname_syntax_P
 
 # Needed for some tests under Cygwin.
 global EXEEXT
+global DLLEXT
 global env
 
 if ![info exists env(EXEEXT)] {
@@ -81,6 +82,12 @@ if ![info exists env(EXEEXT)] {
     set EXEEXT $env(EXEEXT)
 }
 
+if ![info exists env(DLLEXT)] {
+    set DLLEXT ".so"
+} else {
+    set DLLEXT $env(DLLEXT)
+}
+
 ### Only procedures should come after this point.
 
 #
Index: gdb.base/annota1.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/annota1.exp,v
retrieving revision 1.20
diff -u -p -r1.20 annota1.exp
--- gdb.base/annota1.exp 12 Oct 2006 19:03:22 -0000 1.20
+++ gdb.base/annota1.exp 10 Dec 2006 13:27:13 -0000
@@ -40,7 +40,7 @@ set bug_id 0
 
 set testfile "annota1"
 set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+set binfile ${objdir}/${subdir}/${testfile}$EXEEXT
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] != "" } {
     untested annota1.exp
@@ -150,7 +150,7 @@ gdb_expect {
 set binexp [string_to_regexp $binfile]
 send_gdb "run\n"
 gdb_expect {
-    -re "\r\n\032\032post-prompt\r\nStarting program: $binexp \(\r\n\r\n\032\032frames-invalid\)+\(\(\r\n\r\n\032\032frames-invalid\)|\(\r\n\r\n\032\032breakpoints-invalid\)\)*\r\n\r\n\032\032starting\(\r\n\r\n\032\032frames-invalid\)+\(\(\r\n\r\n\032\032frames-invalid\)|\(\r\n\r\n\032\032breakpoints-invalid\)\)*\r\n\r\n\032\032breakpoint 1\r\n\r\nBreakpoint 1, \r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*annota1.c\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n$main_line\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source.*$srcfile:$main_line:.*:beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped.*$gdb_prompt$" {
+    -re "\r\n\032\032post-prompt\r\nStarting program: $binexp \(\(\r\n\r\n\032\032frames-invalid\)|\(\r\nLoaded symbols for .*\)\)+\(\(\r\n\r\n\032\032frames-invalid\)|\(\r\n\r\n\032\032breakpoints-invalid\)\)*\r\n\r\n\032\032starting\(\r\n\r\n\032\032frames-invalid\)+\(\(\r\n\r\n\032\032frames-invalid\)|\(\r\n\r\n\032\032breakpoints-invalid\)\)*\r\n\r\n\032\032breakpoint 1\r\n\r\nBreakpoint 1, \r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*annota1.c\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n$main_line\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source.*$srcfile:$main_line:.*:beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped.*$gdb_prompt$" {
  pass "run until main breakpoint"
     }
     -re ".*$gdb_prompt$" {
Index: gdb.base/gdb1555.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/gdb1555.exp,v
retrieving revision 1.2
diff -u -p -r1.2 gdb1555.exp
--- gdb.base/gdb1555.exp 22 Jun 2006 19:53:46 -0000 1.2
+++ gdb.base/gdb1555.exp 10 Dec 2006 13:27:14 -0000
@@ -31,7 +31,7 @@ set srcfile ${testfile}.c
 set binfile ${objdir}/${subdir}/${testfile}
 
 set libsrc "${srcdir}/${subdir}/${libfile}.c"
-set libobj "${objdir}/${subdir}/${libfile}.so"
+set libobj "${objdir}/${subdir}/${libfile}$DLLEXT"
 set execsrc "${srcdir}/${subdir}/${srcfile}"
 
 remote_exec build "rm -f ${binfile}"
Index: gdb.base/pending.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/pending.exp,v
retrieving revision 1.5
diff -u -p -r1.5 pending.exp
--- gdb.base/pending.exp 28 Apr 2005 23:04:28 -0000 1.5
+++ gdb.base/pending.exp 10 Dec 2006 13:27:14 -0000
@@ -37,7 +37,7 @@ set libfile "pendshr"
 set srcfile $testfile.c
 set libsrc  $srcdir/$subdir/$libfile.c
 set binfile $objdir/$subdir/$testfile
-set lib_sl  $objdir/$subdir/$libfile.sl
+set lib_sl  $objdir/$subdir/$libfile$DLLEXT
 
 set lib_opts  debug
 set exec_opts [list debug shlib=$lib_sl]
Index: gdb.base/so-impl-ld.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/so-impl-ld.exp,v
retrieving revision 1.7
diff -u -p -r1.7 so-impl-ld.exp
--- gdb.base/so-impl-ld.exp 29 Apr 2005 20:45:32 -0000 1.7
+++ gdb.base/so-impl-ld.exp 10 Dec 2006 13:27:15 -0000
@@ -32,7 +32,7 @@ set libfile "solib1"
 set srcfile $srcdir/$subdir/$testfile.c
 set libsrc  $srcdir/$subdir/$libfile.c
 set binfile $objdir/$subdir/$testfile
-set lib_sl  $objdir/$subdir/$libfile.sl
+set lib_sl  $objdir/$subdir/$libfile$DLLEXT
 
 set lib_opts  debug
 set exec_opts [list debug shlib=$lib_sl]
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] A few Cygwin testsuite fixes.

Christopher Faylor-9
On Sun, Dec 10, 2006 at 01:43:03PM +0000, Pedro Alves wrote:
>Hi all,
>
>This patch fixes a few fails on i686-pc-cygwin.
>- It adds a few missing $EXEEXT.
>- Adds a new $DLLEXT variable for the dynamic library tests and uses it.
>
>Please review and commit.

I don't have the right to approve or commit this but I have to say that
while the logic looks ok, I don't think the name of the variable you're
using should be "DLLEXT".  A "DLL" is generally a windows thing.  Maybe
it should be SOEXT instead.

cgf
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] A few Cygwin testsuite fixes.

pedro_alves (Bugzilla)
Christopher Faylor escreveu:
> On Sun, Dec 10, 2006 at 01:43:03PM +0000, Pedro Alves wrote:
>
> I don't have the right to approve or commit this but I have to say that
> while the logic looks ok, I don't think the name of the variable you're
> using should be "DLLEXT".  A "DLL" is generally a windows thing.  Maybe
> it should be SOEXT instead.

Thanks for taking a look.  I had considered both, but, in the end I sticked
with DLLEXT, because I felt that the 'dynamic' in DLL goes more to the point, than
'shared' in SO goes.  I can change that, no prob.

Attached is the updated/renamed patch.

Please review and commit.

---
gdb/testsuite/ChangeLog:

2006-12-10  Pedro Alves  <[hidden email]>

    * configure.ac: Check dynamic library extension.  Pass down SOEXT.
    * configure: Regenerate.
    * Makefile.in (SOEXT): New variable.
    (just-check): Export SOEXT.
    * lib/gdb.exp ($SOEXT): Import from environment.
    * gdb.base/annota1.exp ($binfile): Append $EXEEXT.
    Expect "Loaded symbols for .*".
    * gdb.base/gdb1555.exp ($libobj): Append $SOEXT instead of ".so".
    * gdb.base/pending.exp ($lib_sl): Append $SOEXT instead of ".sl".
    * gdb.base/so-impl-ld.exp ($lib_sl): Append $SOEXT instead of ".sl".

Index: configure.ac
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/configure.ac,v
retrieving revision 1.5
diff -u -p -r1.5 configure.ac
--- configure.ac 21 Jun 2006 13:57:21 -0000 1.5
+++ configure.ac 10 Dec 2006 13:27:07 -0000
@@ -110,6 +110,18 @@ AC_CHECK_HEADERS(pthread.h)
 
 AC_EXEEXT
 
+AC_MSG_CHECKING(for shared object extension)
+case $target in
+  *-*-cygwin* | *-*-mingw* | *-*-pe*)
+    SOEXT=".dll"
+    ;;
+  *)
+    SOEXT=".so"
+    ;;
+esac
+AC_MSG_RESULT($SOEXT)
+AC_SUBST(SOEXT)
+
 AC_OUTPUT([Makefile \
   gdb.ada/Makefile \
   gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile \
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/Makefile.in,v
retrieving revision 1.14
diff -u -p -r1.14 Makefile.in
--- Makefile.in 21 Jun 2006 13:57:21 -0000 1.14
+++ Makefile.in 10 Dec 2006 13:27:07 -0000
@@ -33,6 +33,7 @@ target_cpu = @gdb_target_cpu@
 
 SHELL = @SHELL@
 EXEEXT = @EXEEXT@
+SOEXT = @SOEXT@
 SUBDIRS = @subdirs@
 RPATH_ENVVAR = @RPATH_ENVVAR@
 ALL_SUBDIRS = gdb.ada gdb.arch gdb.asm gdb.base gdb.cp gdb.disasm \
@@ -128,6 +129,7 @@ just-check:
  srcdir=${srcdir} ; export srcdir ; \
  EXPECT=${EXPECT} ; export EXPECT ; \
  EXEEXT=${EXEEXT} ; export EXEEXT ; \
+ SOEXT=${SOEXT} ; export SOEXT ; \
         $(RPATH_ENVVAR)=$$rootme/../../expect:$$rootme/../../libstdc++:$$rootme/../../tk/unix:$$rootme/../../tcl/unix:$$rootme/../../bfd:$$rootme/../../opcodes:$$$(RPATH_ENVVAR); \
  export $(RPATH_ENVVAR); \
  if [ -f $${rootme}/../../expect/expect ] ; then  \
Index: lib/gdb.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v
retrieving revision 1.72
diff -u -p -r1.72 gdb.exp
--- lib/gdb.exp 10 Nov 2006 16:58:53 -0000 1.72
+++ lib/gdb.exp 10 Dec 2006 13:27:12 -0000
@@ -73,6 +73,7 @@ set fullname_syntax "($fullname_syntax_P
 
 # Needed for some tests under Cygwin.
 global EXEEXT
+global SOEXT
 global env
 
 if ![info exists env(EXEEXT)] {
@@ -81,6 +82,12 @@ if ![info exists env(EXEEXT)] {
     set EXEEXT $env(EXEEXT)
 }
 
+if ![info exists env(SOEXT)] {
+    set SOEXT ".so"
+} else {
+    set SOEXT $env(SOEXT)
+}
+
 ### Only procedures should come after this point.
 
 #
Index: gdb.base/annota1.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/annota1.exp,v
retrieving revision 1.20
diff -u -p -r1.20 annota1.exp
--- gdb.base/annota1.exp 12 Oct 2006 19:03:22 -0000 1.20
+++ gdb.base/annota1.exp 10 Dec 2006 13:27:13 -0000
@@ -40,7 +40,7 @@ set bug_id 0
 
 set testfile "annota1"
 set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+set binfile ${objdir}/${subdir}/${testfile}$EXEEXT
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] != "" } {
     untested annota1.exp
@@ -150,7 +150,7 @@ gdb_expect {
 set binexp [string_to_regexp $binfile]
 send_gdb "run\n"
 gdb_expect {
-    -re "\r\n\032\032post-prompt\r\nStarting program: $binexp \(\r\n\r\n\032\032frames-invalid\)+\(\(\r\n\r\n\032\032frames-invalid\)|\(\r\n\r\n\032\032breakpoints-invalid\)\)*\r\n\r\n\032\032starting\(\r\n\r\n\032\032frames-invalid\)+\(\(\r\n\r\n\032\032frames-invalid\)|\(\r\n\r\n\032\032breakpoints-invalid\)\)*\r\n\r\n\032\032breakpoint 1\r\n\r\nBreakpoint 1, \r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*annota1.c\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n$main_line\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source.*$srcfile:$main_line:.*:beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped.*$gdb_prompt$" {
+    -re "\r\n\032\032post-prompt\r\nStarting program: $binexp \(\(\r\n\r\n\032\032frames-invalid\)|\(\r\nLoaded symbols for .*\)\)+\(\(\r\n\r\n\032\032frames-invalid\)|\(\r\n\r\n\032\032breakpoints-invalid\)\)*\r\n\r\n\032\032starting\(\r\n\r\n\032\032frames-invalid\)+\(\(\r\n\r\n\032\032frames-invalid\)|\(\r\n\r\n\032\032breakpoints-invalid\)\)*\r\n\r\n\032\032breakpoint 1\r\n\r\nBreakpoint 1, \r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*annota1.c\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n$main_line\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source.*$srcfile:$main_line:.*:beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped.*$gdb_prompt$" {
  pass "run until main breakpoint"
     }
     -re ".*$gdb_prompt$" {
Index: gdb.base/gdb1555.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/gdb1555.exp,v
retrieving revision 1.2
diff -u -p -r1.2 gdb1555.exp
--- gdb.base/gdb1555.exp 22 Jun 2006 19:53:46 -0000 1.2
+++ gdb.base/gdb1555.exp 10 Dec 2006 13:27:14 -0000
@@ -31,7 +31,7 @@ set srcfile ${testfile}.c
 set binfile ${objdir}/${subdir}/${testfile}
 
 set libsrc "${srcdir}/${subdir}/${libfile}.c"
-set libobj "${objdir}/${subdir}/${libfile}.so"
+set libobj "${objdir}/${subdir}/${libfile}$SOEXT"
 set execsrc "${srcdir}/${subdir}/${srcfile}"
 
 remote_exec build "rm -f ${binfile}"
Index: gdb.base/pending.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/pending.exp,v
retrieving revision 1.5
diff -u -p -r1.5 pending.exp
--- gdb.base/pending.exp 28 Apr 2005 23:04:28 -0000 1.5
+++ gdb.base/pending.exp 10 Dec 2006 13:27:14 -0000
@@ -37,7 +37,7 @@ set libfile "pendshr"
 set srcfile $testfile.c
 set libsrc  $srcdir/$subdir/$libfile.c
 set binfile $objdir/$subdir/$testfile
-set lib_sl  $objdir/$subdir/$libfile.sl
+set lib_sl  $objdir/$subdir/$libfile$SOEXT
 
 set lib_opts  debug
 set exec_opts [list debug shlib=$lib_sl]
Index: gdb.base/so-impl-ld.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/so-impl-ld.exp,v
retrieving revision 1.7
diff -u -p -r1.7 so-impl-ld.exp
--- gdb.base/so-impl-ld.exp 29 Apr 2005 20:45:32 -0000 1.7
+++ gdb.base/so-impl-ld.exp 10 Dec 2006 13:27:15 -0000
@@ -32,7 +32,7 @@ set libfile "solib1"
 set srcfile $srcdir/$subdir/$testfile.c
 set libsrc  $srcdir/$subdir/$libfile.c
 set binfile $objdir/$subdir/$testfile
-set lib_sl  $objdir/$subdir/$libfile.sl
+set lib_sl  $objdir/$subdir/$libfile$SOEXT
 
 set lib_opts  debug
 set exec_opts [list debug shlib=$lib_sl]
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] A few Cygwin testsuite fixes.

Daniel Jacobowitz-2
On Sun, Dec 10, 2006 at 06:01:39PM +0000, Pedro Alves wrote:

> Christopher Faylor escreveu:
> >On Sun, Dec 10, 2006 at 01:43:03PM +0000, Pedro Alves wrote:
> >
> >I don't have the right to approve or commit this but I have to say that
> >while the logic looks ok, I don't think the name of the variable you're
> >using should be "DLLEXT".  A "DLL" is generally a windows thing.  Maybe
> >it should be SOEXT instead.
>
> Thanks for taking a look.  I had considered both, but, in the end I sticked
> with DLLEXT, because I felt that the 'dynamic' in DLL goes more to the
> point, than
> 'shared' in SO goes.  I can change that, no prob.
>
> Attached is the updated/renamed patch.
>
> Please review and commit.

Hi Pedro,

Do you want to go ahead with this or drop the $SOEXT portions (after
your ld patch)?

--
Daniel Jacobowitz
CodeSourcery
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] A few Cygwin testsuite fixes.

pedro_alves (Bugzilla)
Daniel Jacobowitz escreveu:

> On Sun, Dec 10, 2006 at 06:01:39PM +0000, Pedro Alves wrote:
>> Christopher Faylor escreveu:
>>> On Sun, Dec 10, 2006 at 01:43:03PM +0000, Pedro Alves wrote:
>>>
>>> I don't have the right to approve or commit this but I have to say that
>>> while the logic looks ok, I don't think the name of the variable you're
>>> using should be "DLLEXT".  A "DLL" is generally a windows thing.  Maybe
>>> it should be SOEXT instead.
>> Thanks for taking a look.  I had considered both, but, in the end I sticked
>> with DLLEXT, because I felt that the 'dynamic' in DLL goes more to the
>> point, than
>> 'shared' in SO goes.  I can change that, no prob.
>>
>> Attached is the updated/renamed patch.
>>
>> Please review and commit.
>
> Hi Pedro,
>
> Do you want to go ahead with this or drop the $SOEXT portions (after
> your ld patch)?
>

Sorry I didn't say anything here.

Well, after the ld patch is applied, there is no need for this for
Cygwin/MinGW/arm-wince anymore, so I am OK with dropping it.

Thanks,

Cheers,
Pedro Alves