Message ID | 20240725015640.3647102-1-quic_apinski@quicinc.com |
---|---|
State | New |
Headers | show |
Series | libstdc++: Fix testsuite for remote testing (and sim) | expand |
On Thu, 25 Jul 2024, 02:58 Andrew Pinski, <quic_apinski@quicinc.com> wrote: > The problem here is that v3_additional_files will have a space > at the begining of the string as dg-additional-files will append > `" " $files` to it. Then when split is called on that string, > there will be an empty file and copying a dir will just fail for > remote/sim testing (I didn't look at why it works for native > testing though). > > Ran a full libstdc++ testsuite using a sim board for testing. > Ah I did notice the extra space but since it worked for my naive testing I didn't worry about it. OK for trunk, thanks. > libstdc++-v3/ChangeLog: > > * testsuite/lib/libstdc++.exp (v3_target_compile): Call > string trim on v3_target_compile before calling split. > > Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com> > --- > libstdc++-v3/testsuite/lib/libstdc++.exp | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp > b/libstdc++-v3/testsuite/lib/libstdc++.exp > index 4bf88e72d05..c11e752ecfb 100644 > --- a/libstdc++-v3/testsuite/lib/libstdc++.exp > +++ b/libstdc++-v3/testsuite/lib/libstdc++.exp > @@ -639,7 +639,8 @@ proc v3_target_compile { source dest type options } { > lappend options "timeout=[timeout_value]" > > global v3_additional_files > - foreach file [split $v3_additional_files " "] { > + # There will be an empty file at the begining of the list so trim it > off. > + foreach file [split [string trim $v3_additional_files] " "] { > global srcdir > v3-copy-file "$srcdir/data/$file" $file > } > -- > 2.43.0 > >
On Thu, 25 Jul 2024 at 07:32, Jonathan Wakely <jwakely.gcc@gmail.com> wrote: > > > > On Thu, 25 Jul 2024, 02:58 Andrew Pinski, <quic_apinski@quicinc.com> wrote: >> >> The problem here is that v3_additional_files will have a space >> at the begining of the string as dg-additional-files will append >> `" " $files` to it. Then when split is called on that string, >> there will be an empty file and copying a dir will just fail for >> remote/sim testing (I didn't look at why it works for native >> testing though). >> >> Ran a full libstdc++ testsuite using a sim board for testing. > > > Ah I did notice the extra space but since it worked for my naive testing I didn't worry about it. That was supposed to say native, but naive works too! > > OK for trunk, thanks. > > >> >> libstdc++-v3/ChangeLog: >> >> * testsuite/lib/libstdc++.exp (v3_target_compile): Call >> string trim on v3_target_compile before calling split. >> >> Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com> >> --- >> libstdc++-v3/testsuite/lib/libstdc++.exp | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp >> index 4bf88e72d05..c11e752ecfb 100644 >> --- a/libstdc++-v3/testsuite/lib/libstdc++.exp >> +++ b/libstdc++-v3/testsuite/lib/libstdc++.exp >> @@ -639,7 +639,8 @@ proc v3_target_compile { source dest type options } { >> lappend options "timeout=[timeout_value]" >> >> global v3_additional_files >> - foreach file [split $v3_additional_files " "] { >> + # There will be an empty file at the begining of the list so trim it off. >> + foreach file [split [string trim $v3_additional_files] " "] { >> global srcdir >> v3-copy-file "$srcdir/data/$file" $file >> } >> -- >> 2.43.0 >>
diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp index 4bf88e72d05..c11e752ecfb 100644 --- a/libstdc++-v3/testsuite/lib/libstdc++.exp +++ b/libstdc++-v3/testsuite/lib/libstdc++.exp @@ -639,7 +639,8 @@ proc v3_target_compile { source dest type options } { lappend options "timeout=[timeout_value]" global v3_additional_files - foreach file [split $v3_additional_files " "] { + # There will be an empty file at the begining of the list so trim it off. + foreach file [split [string trim $v3_additional_files] " "] { global srcdir v3-copy-file "$srcdir/data/$file" $file }
The problem here is that v3_additional_files will have a space at the begining of the string as dg-additional-files will append `" " $files` to it. Then when split is called on that string, there will be an empty file and copying a dir will just fail for remote/sim testing (I didn't look at why it works for native testing though). Ran a full libstdc++ testsuite using a sim board for testing. libstdc++-v3/ChangeLog: * testsuite/lib/libstdc++.exp (v3_target_compile): Call string trim on v3_target_compile before calling split. Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com> --- libstdc++-v3/testsuite/lib/libstdc++.exp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)