Message ID | 532B4081.3080200@net-b.de |
---|---|
State | New |
Headers | show |
On Thu, Mar 20, 2014 at 08:24:49PM +0100, Tobias Burnus wrote: > gfortran's modules are since GCC 4.9 zipped. There are two functions, > which test for the existence and absent of strings in the .mod files. > > While one was updated to apply gunzip before reading, the other wasn't. > This patch copies over the unzip call from the other function. I have > tested it that it properly fails if and only if the string is present in > the (uncompressed) .mod file. > > OK for the trunk? > > Tobias > > PS: Thanks to Dominique for pointing out this problem! > 2014-03-20 Tobias Burnus <burnus@net-b.de> > > PR fortran/60599 > * lib/gcc-dg.exp (scan-module): Uncompress .mod files for > reading. > Looks good to me. Not sure, I can give an OK as the file is outside of gfortran directories.
On Mar 20, 2014, at 1:48 PM, Steve Kargl <sgk@troutmask.apl.washington.edu> wrote: > On Thu, Mar 20, 2014 at 08:24:49PM +0100, Tobias Burnus wrote: >> gfortran's modules are since GCC 4.9 zipped. There are two functions, >> which test for the existence and absent of strings in the .mod files. > >> PR fortran/60599 >> * lib/gcc-dg.exp (scan-module): Uncompress .mod files for >> reading. > > Looks good to me. Not sure, I can give an OK as the > file is outside of gfortran directories. My take (as test suite maintainer)... So the test suite has bits in it that domain experts know about and care about. It is always better if a domain expert reviews and approves that patch if they think the patch is in the right direction or nixes it if in the wrong direction. I’ll step forward and scream if you all run amok. If .mod files are fortran bits, then fortran people that know what a .mod is, would be the right people to review. I’m a catch all, if you all don’t do your job, then, you risk me approving it. :-) Short version, yes, you can.
2014-03-20 Tobias Burnus <burnus@net-b.de> PR fortran/60599 * lib/gcc-dg.exp (scan-module): Uncompress .mod files for reading. diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp index 59d394c..f9d52bc 100644 --- a/gcc/testsuite/lib/gcc-dg.exp +++ b/gcc/testsuite/lib/gcc-dg.exp @@ -656,7 +656,7 @@ proc scan-module { args } { # Argument 1 is the regexp to match proc scan-module-absence { args } { set modfilename [string tolower [lindex $args 0]].mod - set fd [open $modfilename r] + set fd [open [list | gzip -dc $modfilename] r] set text [read $fd] close $fd