octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #51994] strange path corruption when path is c


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #51994] strange path corruption when path is changed in a script or unit test
Date: Mon, 11 Sep 2017 18:49:46 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

URL:
  <http://savannah.gnu.org/bugs/?51994>

                 Summary: strange path corruption when path is changed in a
script or unit test
                 Project: GNU Octave
            Submitted by: mtmiller
            Submitted on: Mon 11 Sep 2017 03:49:45 PM PDT
                Category: Interpreter
                Severity: 4 - Important
                Priority: 5 - Normal
              Item Group: Unexpected Error
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: GNU/Linux

    _______________________________________________________

Details:

When running the full test suite under a minimal environment, I noticed this
strange behavior. It took me a while to narrow it down to a small reproducible
test case, and I'm still not sure I've captured it well. But I can reproduce
with the following (either as a script or in the interpreter)


>> graphics_toolkit gnuplot
>> figure
>> clear all
>> close all
>> addpath /tmp; rmpath /tmp; pathdef
error: if: undefined value used in conditional expression
error: called from
    /opt/gnu/octave/lib/octave/4.3.0+/oct/x86_64-pc-linux-gnu/PKG_ADD at line
4 column 1
    pathdef at line 75 column 7


I can only reproduce this error when I've built Octave *and* run 'make
install', but I am still running Octave out of the build directory. If I
haven't run 'make install' yet, I get no error, but I do get a much different
result from the 'pathdef' function than normal. If I run the actual installed
Octave I get no error, everything works fine.

The actual legitimate use case where this error comes up is


$ env DISPLAY= make check
...
  scripts/path/pathdef.m ...................................... PASS      0/1 
 
                                                                  FAIL    1
  scripts/path/savepath.m ..................................... PASS      0/1 
 
                                                                  FAIL    1
...

Fixed test scripts:

  bc-overloads.tst ............................................element number
3 undefined in return list


and at this point the test suite just exits, never finishes the fixed test
scripts. This is a very realistic thing to do on a headless build box.

Some tests run which bring up gnuplot figures. The test case for the 'run'
function calls 'addpath' and 'rmpath'. And then the test cases for 'pathdef'
and 'savepath' fail. And by the time it gets to bc-overloads.tst it can't even
locate the file in its load path, and the test function exits with an error.

I cannot reproduce this on the stable branch, this looks like new behavior.

As a workaround, maybe we shouldn't have unit tests that modify the load path.
I'll see if removing all of those commands fixes this for me also.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?51994>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]