public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* Cannot run testsuite
@ 2022-03-21 15:37 jdoubleu
  2022-03-24 16:54 ` [PATCH] fix testsuite jdoubleu
  0 siblings, 1 reply; 5+ messages in thread
From: jdoubleu @ 2022-03-21 15:37 UTC (permalink / raw)
  To: newlib

Hi,

I'm currently trying to run the newlib testsuite on my linux host. 
Unforunately, it looks like the tests cannot be compiled (by DEJAGNU).

I've followed the steps in 
https://sourceware.org/git/?p=newlib-cygwin.git;a=blob;f=newlib/README;h=97890b9d20ca0ac9f206d7a2334d55a3d7052289;hb=HEAD#l470 
to setup and configure my environment.

I'm getting the following stack trace when I run `make check`:
```
$ make check
...
make[1]: Entering directory '/path/to/newlib-cygwin/build'
Found expect: expect
Found runtest: runtest
/path/to/newlib-cygwin/build/testsuite
WARNING: Couldn't find tool init file
Test run by jdoubleu on Mon Mar 21 16:27:27 2022
Target is x86_64-pc-linux-gnu
Host   is x86_64-pc-linux-gnu

                 === newlib tests ===

Schedule of variations:
     unix

Running target unix
Using /usr/share/dejagnu/baseboards/unix.exp as board description file 
for target.
Using /usr/share/dejagnu/config/unix.exp as generic interface file for 
target.
Using /path/to/newlib-cygwin/newlib/testsuite/config/default.exp as 
tool-and-target-specific interface file.
WARNING: Assuming target board is the local machine (which is probably 
wrong).
You may need to set your DEJAGNU environment variable.
Running /path/to/newlib-cygwin/newlib/testsuite/newlib.elix/elix.exp ...
Running /path/to/newlib-cygwin/newlib/testsuite/newlib.iconv/iconv.exp ...
ERROR: (DejaGnu) proc "newlib_target_compile 
/path/to/newlib-cygwin/newlib/testsuite/newlib.iconv/iconvnm.c 
/path/to/newlib-cygwin/build/testsuite/iconvnm.x executable {}" does not 
exist.
The error code is TCL LOOKUP COMMAND newlib_target_compile
The info on the error is:
invalid command name "newlib_target_compile"
     while executing
"::tcl_unknown newlib_target_compile 
/path/to/newlib-cygwin/newlib/testsuite/newlib.iconv/iconvnm.c 
/path/to/newli..."
     ("uplevel" body line 1)
     invoked from within
"uplevel 1 ::tcl_unknown $args"

                 === newlib Summary ===

make[1]: Leaving directory '/path/to/newlib-cygwin/build'
```

Building the lib (`make`) works.

I've also noticed, the docs are mentioning to run `make 
check-target-newlib` (see 
https://sourceware.org/git/?p=newlib-cygwin.git;a=blob;f=newlib/README;h=97890b9d20ca0ac9f206d7a2334d55a3d7052289;hb=HEAD#l505), 
which does not seem to exist. I could only run `check` which eventually 
runs `check-DEJAGNU`.


Best regards
-- 
🙎🏻‍♂️ jdoubleu

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

* [PATCH] fix testsuite
  2022-03-21 15:37 Cannot run testsuite jdoubleu
@ 2022-03-24 16:54 ` jdoubleu
  2022-04-01 13:02   ` Corinna Vinschen
  0 siblings, 1 reply; 5+ messages in thread
From: jdoubleu @ 2022-03-24 16:54 UTC (permalink / raw)
  To: newlib

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

I found the issue: newlib/testsuite/lib/passfail.exp was using a the 
function `newlib_target_compile` which is defined in newlib.exp but 
hasn't been included yet.

I attached a patch.

Still some tests fail to compile, but that seems more like an issue with 
the host environment or target board.


Cheers
---
🙎🏻‍♂️ jdoubleu
On 3/21/2022 4:37 PM, jdoubleu wrote:
> Hi,
> 
> I'm currently trying to run the newlib testsuite on my linux host. 
> Unforunately, it looks like the tests cannot be compiled (by DEJAGNU).
> 
> I've followed the steps in 
> https://sourceware.org/git/?p=newlib-cygwin.git;a=blob;f=newlib/README;h=97890b9d20ca0ac9f206d7a2334d55a3d7052289;hb=HEAD#l470 
> to setup and configure my environment.
> 
> I'm getting the following stack trace when I run `make check`:
> ```
> $ make check
> ...
> make[1]: Entering directory '/path/to/newlib-cygwin/build'
> Found expect: expect
> Found runtest: runtest
> /path/to/newlib-cygwin/build/testsuite
> WARNING: Couldn't find tool init file
> Test run by jdoubleu on Mon Mar 21 16:27:27 2022
> Target is x86_64-pc-linux-gnu
> Host   is x86_64-pc-linux-gnu
> 
>                  === newlib tests ===
> 
> Schedule of variations:
>      unix
> 
> Running target unix
> Using /usr/share/dejagnu/baseboards/unix.exp as board description file 
> for target.
> Using /usr/share/dejagnu/config/unix.exp as generic interface file for 
> target.
> Using /path/to/newlib-cygwin/newlib/testsuite/config/default.exp as 
> tool-and-target-specific interface file.
> WARNING: Assuming target board is the local machine (which is probably 
> wrong).
> You may need to set your DEJAGNU environment variable.
> Running /path/to/newlib-cygwin/newlib/testsuite/newlib.elix/elix.exp ...
> Running /path/to/newlib-cygwin/newlib/testsuite/newlib.iconv/iconv.exp ...
> ERROR: (DejaGnu) proc "newlib_target_compile 
> /path/to/newlib-cygwin/newlib/testsuite/newlib.iconv/iconvnm.c 
> /path/to/newlib-cygwin/build/testsuite/iconvnm.x executable {}" does not 
> exist.
> The error code is TCL LOOKUP COMMAND newlib_target_compile
> The info on the error is:
> invalid command name "newlib_target_compile"
>      while executing
> "::tcl_unknown newlib_target_compile 
> /path/to/newlib-cygwin/newlib/testsuite/newlib.iconv/iconvnm.c 
> /path/to/newli..."
>      ("uplevel" body line 1)
>      invoked from within
> "uplevel 1 ::tcl_unknown $args"
> 
>                  === newlib Summary ===
> 
> make[1]: Leaving directory '/path/to/newlib-cygwin/build'
> ```
> 
> Building the lib (`make`) works.
> 
> I've also noticed, the docs are mentioning to run `make 
> check-target-newlib` (see 
> https://sourceware.org/git/?p=newlib-cygwin.git;a=blob;f=newlib/README;h=97890b9d20ca0ac9f206d7a2334d55a3d7052289;hb=HEAD#l505), 
> which does not seem to exist. I could only run `check` which eventually 
> runs `check-DEJAGNU`.
> 
> 
> Best regards

[-- Attachment #2: 0001-fix-testsuite.patch --]
[-- Type: text/plain, Size: 757 bytes --]

From 367bac5167e3c24b26310bafd59a26dc548a3a33 Mon Sep 17 00:00:00 2001
From: jdoubleu <hi@jdoubleu.de>
Date: Thu, 24 Mar 2022 17:49:08 +0100
Subject: [PATCH] fix testsuite

---
 newlib/testsuite/lib/passfail.exp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/newlib/testsuite/lib/passfail.exp b/newlib/testsuite/lib/passfail.exp
index 5e7eb21..2c9abf6 100644
--- a/newlib/testsuite/lib/passfail.exp
+++ b/newlib/testsuite/lib/passfail.exp
@@ -4,6 +4,8 @@
 # is freely granted, provided that this notice is preserved.
 #
 
+load_lib newlib.exp
+
 # newlib_pass_fail_all compiles and runs all the source files in the
 # test directory. If flag is -x, then the sources whose basenames are
 # listed in exclude_list are not compiled and run.
-- 
2.35.1


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

* Re: [PATCH] fix testsuite
  2022-03-24 16:54 ` [PATCH] fix testsuite jdoubleu
@ 2022-04-01 13:02   ` Corinna Vinschen
  2022-04-07  9:38     ` jdoubleu
  0 siblings, 1 reply; 5+ messages in thread
From: Corinna Vinschen @ 2022-04-01 13:02 UTC (permalink / raw)
  To: jdoubleu; +Cc: newlib

Hi J,

On Mar 24 17:54, jdoubleu wrote:
> I found the issue: newlib/testsuite/lib/passfail.exp was using a the
> function `newlib_target_compile` which is defined in newlib.exp but hasn't
> been included yet.
> 
> I attached a patch.
> 
> Still some tests fail to compile, but that seems more like an issue with the
> host environment or target board.

Could you please add the description of the error you're seeing to the
commit message of your patch, kind of as in your below first mail?
Just "Fix testsuite" is a bit on the terse side :)


Thanks,
Corinna



> 
> 
> Cheers
> ---
> 🙎🏻‍♂️ jdoubleu
> On 3/21/2022 4:37 PM, jdoubleu wrote:
> > Hi,
> > 
> > I'm currently trying to run the newlib testsuite on my linux host.
> > Unforunately, it looks like the tests cannot be compiled (by DEJAGNU).
> > 
> > I've followed the steps in https://sourceware.org/git/?p=newlib-cygwin.git;a=blob;f=newlib/README;h=97890b9d20ca0ac9f206d7a2334d55a3d7052289;hb=HEAD#l470
> > to setup and configure my environment.
> > 
> > I'm getting the following stack trace when I run `make check`:
> > ```
> > $ make check
> > ...
> > make[1]: Entering directory '/path/to/newlib-cygwin/build'
> > Found expect: expect
> > Found runtest: runtest
> > /path/to/newlib-cygwin/build/testsuite
> > WARNING: Couldn't find tool init file
> > Test run by jdoubleu on Mon Mar 21 16:27:27 2022
> > Target is x86_64-pc-linux-gnu
> > Host   is x86_64-pc-linux-gnu
> > 
> >                  === newlib tests ===
> > 
> > Schedule of variations:
> >      unix
> > 
> > Running target unix
> > Using /usr/share/dejagnu/baseboards/unix.exp as board description file
> > for target.
> > Using /usr/share/dejagnu/config/unix.exp as generic interface file for
> > target.
> > Using /path/to/newlib-cygwin/newlib/testsuite/config/default.exp as
> > tool-and-target-specific interface file.
> > WARNING: Assuming target board is the local machine (which is probably
> > wrong).
> > You may need to set your DEJAGNU environment variable.
> > Running /path/to/newlib-cygwin/newlib/testsuite/newlib.elix/elix.exp ...
> > Running /path/to/newlib-cygwin/newlib/testsuite/newlib.iconv/iconv.exp ...
> > ERROR: (DejaGnu) proc "newlib_target_compile
> > /path/to/newlib-cygwin/newlib/testsuite/newlib.iconv/iconvnm.c
> > /path/to/newlib-cygwin/build/testsuite/iconvnm.x executable {}" does not
> > exist.
> > The error code is TCL LOOKUP COMMAND newlib_target_compile
> > The info on the error is:
> > invalid command name "newlib_target_compile"
> >      while executing
> > "::tcl_unknown newlib_target_compile
> > /path/to/newlib-cygwin/newlib/testsuite/newlib.iconv/iconvnm.c
> > /path/to/newli..."
> >      ("uplevel" body line 1)
> >      invoked from within
> > "uplevel 1 ::tcl_unknown $args"
> > 
> >                  === newlib Summary ===
> > 
> > make[1]: Leaving directory '/path/to/newlib-cygwin/build'
> > ```
> > 
> > Building the lib (`make`) works.
> > 
> > I've also noticed, the docs are mentioning to run `make
> > check-target-newlib` (see https://sourceware.org/git/?p=newlib-cygwin.git;a=blob;f=newlib/README;h=97890b9d20ca0ac9f206d7a2334d55a3d7052289;hb=HEAD#l505),
> > which does not seem to exist. I could only run `check` which eventually
> > runs `check-DEJAGNU`.
> > 
> > 
> > Best regards

> From 367bac5167e3c24b26310bafd59a26dc548a3a33 Mon Sep 17 00:00:00 2001
> From: jdoubleu <hi@jdoubleu.de>
> Date: Thu, 24 Mar 2022 17:49:08 +0100
> Subject: [PATCH] fix testsuite
> 
> ---
>  newlib/testsuite/lib/passfail.exp | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/newlib/testsuite/lib/passfail.exp b/newlib/testsuite/lib/passfail.exp
> index 5e7eb21..2c9abf6 100644
> --- a/newlib/testsuite/lib/passfail.exp
> +++ b/newlib/testsuite/lib/passfail.exp
> @@ -4,6 +4,8 @@
>  # is freely granted, provided that this notice is preserved.
>  #
>  
> +load_lib newlib.exp
> +
>  # newlib_pass_fail_all compiles and runs all the source files in the
>  # test directory. If flag is -x, then the sources whose basenames are
>  # listed in exclude_list are not compiled and run.
> -- 
> 2.35.1
> 


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

* Re: [PATCH] fix testsuite
  2022-04-01 13:02   ` Corinna Vinschen
@ 2022-04-07  9:38     ` jdoubleu
  2022-04-07 15:28       ` Jeff Johnston
  0 siblings, 1 reply; 5+ messages in thread
From: jdoubleu @ 2022-04-07  9:38 UTC (permalink / raw)
  To: newlib

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

Wasn't sure what to write, since the fix was rather trivial.

Appended a patch with some more description. Please feel free to change 
the commit message, if you think something is still missing.


Thanks
---
🙎🏻‍♂️ jdoubleu
On 4/1/2022 3:02 PM, Corinna Vinschen wrote:
> Hi J,
> 
> On Mar 24 17:54, jdoubleu wrote:
>> I found the issue: newlib/testsuite/lib/passfail.exp was using a the
>> function `newlib_target_compile` which is defined in newlib.exp but hasn't
>> been included yet.
>>
>> I attached a patch.
>>
>> Still some tests fail to compile, but that seems more like an issue with the
>> host environment or target board.
> 
> Could you please add the description of the error you're seeing to the
> commit message of your patch, kind of as in your below first mail?
> Just "Fix testsuite" is a bit on the terse side :)
> 
> 
> Thanks,
> Corinna
> 

[-- Attachment #2: 0001-fix-testsuite-cannot-compile-tests.patch --]
[-- Type: text/plain, Size: 878 bytes --]

From 62a04f3a615d6c2da2277339d3dc60b34b6ac1c7 Mon Sep 17 00:00:00 2001
From: jdoubleu <hi@jdoubleu.de>
Date: Thu, 7 Apr 2022 11:31:40 +0200
Subject: [PATCH] fix testsuite cannot compile tests

DEJAGNU could not find the function 'newlib_target_compile', because it was defined in another file.
---
 newlib/testsuite/lib/passfail.exp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/newlib/testsuite/lib/passfail.exp b/newlib/testsuite/lib/passfail.exp
index 5e7eb21..2c9abf6 100644
--- a/newlib/testsuite/lib/passfail.exp
+++ b/newlib/testsuite/lib/passfail.exp
@@ -4,6 +4,8 @@
 # is freely granted, provided that this notice is preserved.
 #
 
+load_lib newlib.exp
+
 # newlib_pass_fail_all compiles and runs all the source files in the
 # test directory. If flag is -x, then the sources whose basenames are
 # listed in exclude_list are not compiled and run.
-- 
2.35.1


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

* Re: [PATCH] fix testsuite
  2022-04-07  9:38     ` jdoubleu
@ 2022-04-07 15:28       ` Jeff Johnston
  0 siblings, 0 replies; 5+ messages in thread
From: Jeff Johnston @ 2022-04-07 15:28 UTC (permalink / raw)
  To: jdoubleu; +Cc: Newlib

Thanks, patch pushed.

-- Jeff J.

On Thu, Apr 7, 2022 at 5:38 AM jdoubleu <hi@jdoubleu.de> wrote:

> Wasn't sure what to write, since the fix was rather trivial.
>
> Appended a patch with some more description. Please feel free to change
> the commit message, if you think something is still missing.
>
>
> Thanks
> ---
> 🙎🏻‍♂️ jdoubleu
> On 4/1/2022 3:02 PM, Corinna Vinschen wrote:
> > Hi J,
> >
> > On Mar 24 17:54, jdoubleu wrote:
> >> I found the issue: newlib/testsuite/lib/passfail.exp was using a the
> >> function `newlib_target_compile` which is defined in newlib.exp but
> hasn't
> >> been included yet.
> >>
> >> I attached a patch.
> >>
> >> Still some tests fail to compile, but that seems more like an issue
> with the
> >> host environment or target board.
> >
> > Could you please add the description of the error you're seeing to the
> > commit message of your patch, kind of as in your below first mail?
> > Just "Fix testsuite" is a bit on the terse side :)
> >
> >
> > Thanks,
> > Corinna
> >

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

end of thread, other threads:[~2022-04-07 15:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-21 15:37 Cannot run testsuite jdoubleu
2022-03-24 16:54 ` [PATCH] fix testsuite jdoubleu
2022-04-01 13:02   ` Corinna Vinschen
2022-04-07  9:38     ` jdoubleu
2022-04-07 15:28       ` Jeff Johnston

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).