#518 Some cmake tests hang

open
nobody
None
5
2013-02-26
2013-02-26
Orion Poplawski
No

Running make check with cmake results in the tests hanging here:

49/128 Test #49: test_call_procedure.pro ............ Passed 0.26 sec
Start 50: test_ce.pro

Running the test by hand:

$ "/export/home/orion/fedora/gdl/gdl-0.9.3/build/testsuite/launchtest" test_ce.pro

GDL - GNU Data Language, Version 0.9.3 CVS

- For basic information type HELP,/INFO
- Please report bugs, feature or help requests and patches at:
http://sourceforge.net/projects/gnudatalanguage/

:0
% Warning: Keyword parameter TRUE not supported in call to: DEVICE. Ignored.
% Warning: Keyword parameter RETAIN not supported in call to: DEVICE. Ignored.
% Compiled module: LOADCT.
% LOADCT: Loading table B-W LINEAR
% Compiled module: TEST_CE.
% TEST_CE: using library file: libtest_ce.so
Starting test Byte
libtest_ce.so: cannot open shared object file: No such file or directory
% CALL_EXTERNAL: Error opening shared object: libtest_ce.so
% Execution halted at: TEST_CE 28 /export/home/orion/fedora/gdl/gdl-0.9.3/testsuite/test_ce.pro
% $MAIN$
GDL>

So I think the fact that the test dumps you into the GDL prompt is not being handled.

In this particular case, LD_LIBRARY_PATH need to be set. But there are other tests failing this way as well that need to be handled.

Discussion

  • giloo
    giloo
    2013-03-09

    I should add, everything equal, the test suite passes when GDL is built with configure ad not CMake.

     
  • Patch for test_ce

     
    Attachments
  • I've attached two fixes - one for the general problem of tests hanging, one for the test_ce test. The first reopens stdin to point to /dev/null causing gdl to exit after running the erroring test. The second puts a ./ in front of the shared library name so the the current directory is searched. In the libtool case the .libs/./libtest_ce.so path should continue to work.

     
  • Still have some failing tests to explore:

    The following tests FAILED:
    9 - test_bug_2876161.pro (Failed)
    10 - test_bug_2974380.pro (Failed)
    25 - test_bug_3104326.pro (Failed)
    35 - test_bug_3275334.pro (Failed)
    60 - test_execute.pro (Failed)
    64 - test_fft_leak.pro (Failed)
    78 - test_get_screen_size.pro (Failed)
    79 - test_grib.pro (Failed)
    83 - test_image_statistics.pro (Failed)
    89 - test_mpfit.pro (Failed)
    99 - test_python_module_0.pro (Failed)
    100 - test_python_module_1.pro (Failed)
    101 - test_python_module_2.pro (Failed)
    116 - test_str_sep.pro (Failed)
    Errors while running CTest

     
  • Patch for cmake tests

     
    Attachments
  • Okay, here is fuller tests patch that does the following:

    - unsetenv of GDL_STARTUP, IDL_STARTUP because my personal IDL_STARTUP was causing issues with some of the tests
    - reopens /dev/null as stdin. This causes gdl to exit after running a test with an error instead of hanging at a prompt.
    - Runs the test as a child process in order to return success for "skipped" tests as cmake does not handle this.

     
  • test_bug_3104326 is failing because my output is slightly different:

    % Compiled module: TEST_BUG_3104326.
    % Compiled module: TEST_BUG_3104326_HELPER.
    % Compiled module: TEST_BUG_3104326_HELPER_SUB.
    % TEST_BUG_3104326_HELPER_SUB: Procedure not found: NONEXISTENT
    % Execution halted at: TEST_BUG_3104326_HELPER_SUB 14 /export/home/orion/fedora/gdl/gdl-0.9.3/testsuite/test_bug_3104326.pro
    % TEST_BUG_3104326_HELPER 10 /export/home/orion/fedora/gdl/gdl-0.9.3/testsuite/test_bug_3104326.pro
    % $MAIN$

    It seems like the test expects no full path to be output:

    if strpos(out[n_elements(out) - 2], '10 test_bug_3104326.pro') eq -1 then exit, status=1

    Not sure the best way to fix this.

     
  • With test_execute.pro, it is this that is failing because DISPLAY is not set:

    ; internal intrinsic procedure (better idea welcome !)
    ;
    com='plot, SIN(!pi*findgen(100)/10.)'
    status=EXECUTE(com)

    I'm not sure I have a better idea for an intrinsic procedure, but one that doesn't access the display might be good.

     
  • Also, the WDELETE command at the end of BASIC_EXECUTE should go too then.