#250 t/flexraw_fortran.t fails with long temp directory name

closed-fixed
other (94)
3
2010-10-20
2010-10-02
Derek Lamb
No

On Mac OS X 10.6.5, t/flexraw_fortran.t fails because the default temp directory is too long (50 characters, in my case). The file $TEMPDIR/tmpraw.f has a long character constant as the argument to 'file' in the 'open' function call. The subroutine code_fold in flexraw_fortran.t does not take into account character constants when breaking code across lines. I don't know enough about Fortran to figure out how to break character constants across lines--I tried several things that didn't work.

Setting TEMPDIR to something short (instead of undef) in perldl.conf causes this test to pass. So I believe it is a bug in the test script, not in the module being tested. You can probably reproduce it by setting your tempdir to something very long. The failing test output is below.

======================
$ perl -Mblib t/flexraw_fortran.t
1..29

ExtUtils::F77: Version 1.16
Loaded ExtUtils::F77 version 1.16
ExtUtils::F77: Using system=Darwin compiler=GFortran
Checking for gcc in disguise:
Compiler is gcc version 4.2.1 (Apple Inc. build 5664)
Runtime: -L/opt/local/lib/gcc43 -lgfortran -L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64 -lgcc
ExtUtils::F77: Validating -L/opt/local/lib/gcc43 -lgfortran -L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64 -lgcc [ok]
ExtUtils::F77: Compiler: gfortran-mp-4.3
ExtUtils::F77: Cflags:
Type float swapped
/var/folders/cp/cpF7SuTpEJqtly5xlloAak+++TI/-Tmp-/tmpraw.f:12.15:

$,status='new',form='unformatted')
1
Error: Syntax error in OPEN statement at (1)
/var/folders/cp/cpF7SuTpEJqtly5xlloAak+++TI/-Tmp-/tmpraw.f:12.6:

$,status='new',form='unformatted')
1
Error: Bad continuation line at (1)
/var/folders/cp/cpF7SuTpEJqtly5xlloAak+++TI/-Tmp-/tmpraw.f:12.7:

$,status='new',form='unformatted')
1
Error: Invalid character in name at (1)
ERROR: code did not create data file /var/folders/cp/cpF7SuTpEJqtly5xlloAak+++TI/-Tmp-/tmprawdata
# Looks like your test exited with 2 before it could output anything.

Discussion

  • Chris Marshall
    Chris Marshall
    2010-10-02

    I've modified the test code in git so that the
    filename is on a line by itself. That should give
    it the maximum possible size without a wrap.

    For portability, this routine uses F77 syntax.

    Maybe the next step needs to be to skip the test
    if the directory name is too long. Folks needing this
    test can run it by hand with a shorter TMPDIR
    setting.

    If fortran compatibility tests are needed, a new
    test based on modern line syntax could be written
    to supplement the flexraw_fortran test.

     
  • Chris Marshall
    Chris Marshall
    2010-10-02

    • priority: 5 --> 3
     
  • Chris Marshall
    Chris Marshall
    2010-10-05

    The t/flexraw_fortran.t test now skips all subtests if the $PDL::Config{TEMPDIR}
    would make the pathname to the data file too long for the fortran code and
    data generation. Please verify that the new code still works when the
    directory name is not too long.

    I've marked the status as Pending to close automatically in a couple of
    weeks if no-one follows up further for this ticket.

    Thank!

     
  • Chris Marshall
    Chris Marshall
    2010-10-05

    • assigned_to: nobody --> marshallch
    • status: open --> pending-fixed
     
  • This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     
    • status: pending-fixed --> closed-fixed