trouble testing dispatch.cc

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

trouble testing dispatch.cc

bpabbott
Administrator
Using a fresh copy of the developers sources, I encountered some  
strange behavior with regards to the tests for dispatch.cc.

First time I did a make check, I encountered a seg-fault at dispatch.cc.

make check
make -f octMakefile check
make -C test check
./build_sparse_tests.sh
../run-octave --norc --silent --no-history ./fntests.m .

Integrated test scripts:

   src/DLD-FUNCTIONS/besselj.cc ........................... PASS  
180/180
   src/DLD-FUNCTIONS/betainc.cc ........................... PASS    6/6
   src/DLD-FUNCTIONS/bsxfun.cc ............................ PASS   55/55
   src/DLD-FUNCTIONS/cellfun.cc ........................... PASS   74/74
   src/DLD-FUNCTIONS/chol.cc .............................. PASS   23/23
   src/DLD-FUNCTIONS/conv2.cc ............................. PASS    2/2
   src/DLD-FUNCTIONS/dassl.cc ............................. PASS    4/4
   src/DLD-FUNCTIONS/det.cc ............................... PASS    5/5
   src/DLD-FUNCTIONS/dispatch.cc ..........................make[2]:  
*** [check] Segmentation fault
make[1]: *** [check] Error 2
make: *** [check] Error 2

The second time, I got a single failure for dispatch.cc

src/DLD-FUNCTIONS/dispatch.cc .......................... PASS    
12/13   FAIL 1

19 >>>>> processing /Users/bpabbott/Development/mercurial/
octave-3.1.51/src/DLD-FUNCTIONS/dispatch.cc
  20   ***** test # replace base m-file
  21  echo_to_file ('function a=dispatch_x(a)', "dispatch_x.m");
  22  dispatch('dispatch_x','length','string')
  23  assert(dispatch_x(3),3)
  24  assert(dispatch_x("a"),1)
  25  sleep (2);
  26  echo_to_file ('function a=dispatch_x(a),++a;', "dispatch_x.m");
  27  rehash();
  28  assert(dispatch_x(3),4)
  29  assert(dispatch_x("a"),1)
  30 !!!!! test failed
  31 `dispatch_x' undefined near line 5 column 9>>>>> processing /
Users/bpabbott/Development/mercurial/octave-3.1.51/src/DLD-FUNCTIONS/
dlmread.cc

When I ran "test dispatch.cc" from the prompt, all 13 tests passed.

octave:11> test dispatch.cc
PASSES 13 out of 13 tests

Has anyone else encountered this? ... I'd guess the sleep(2) is  
present to avoid these problems?

Ben

Reply | Threaded
Open this post in threaded view
|

Re: trouble testing dispatch.cc

Jaroslav Hajek-2
On Fri, Jan 23, 2009 at 1:22 PM, Ben Abbott <[hidden email]> wrote:

> Using a fresh copy of the developers sources, I encountered some strange
> behavior with regards to the tests for dispatch.cc.
>
> First time I did a make check, I encountered a seg-fault at dispatch.cc.
>
> make check
> make -f octMakefile check
> make -C test check
> ./build_sparse_tests.sh
> ../run-octave --norc --silent --no-history ./fntests.m .
>
> Integrated test scripts:
>
>  src/DLD-FUNCTIONS/besselj.cc ........................... PASS  180/180
>  src/DLD-FUNCTIONS/betainc.cc ........................... PASS    6/6
>  src/DLD-FUNCTIONS/bsxfun.cc ............................ PASS   55/55
>  src/DLD-FUNCTIONS/cellfun.cc ........................... PASS   74/74
>  src/DLD-FUNCTIONS/chol.cc .............................. PASS   23/23
>  src/DLD-FUNCTIONS/conv2.cc ............................. PASS    2/2
>  src/DLD-FUNCTIONS/dassl.cc ............................. PASS    4/4
>  src/DLD-FUNCTIONS/det.cc ............................... PASS    5/5
>  src/DLD-FUNCTIONS/dispatch.cc ..........................make[2]: ***
> [check] Segmentation fault
> make[1]: *** [check] Error 2
> make: *** [check] Error 2
>
> The second time, I got a single failure for dispatch.cc
>
> src/DLD-FUNCTIONS/dispatch.cc .......................... PASS   12/13   FAIL
> 1
>
> 19 >>>>> processing
> /Users/bpabbott/Development/mercurial/octave-3.1.51/src/DLD-FUNCTIONS/dispatch.cc
>  20   ***** test # replace base m-file
>  21  echo_to_file ('function a=dispatch_x(a)', "dispatch_x.m");
>  22  dispatch('dispatch_x','length','string')
>  23  assert(dispatch_x(3),3)
>  24  assert(dispatch_x("a"),1)
>  25  sleep (2);
>  26  echo_to_file ('function a=dispatch_x(a),++a;', "dispatch_x.m");
>  27  rehash();
>  28  assert(dispatch_x(3),4)
>  29  assert(dispatch_x("a"),1)
>  30 !!!!! test failed
>  31 `dispatch_x' undefined near line 5 column 9>>>>> processing
> /Users/bpabbott/Development/mercurial/octave-3.1.51/src/DLD-FUNCTIONS/dlmread.cc
>
> When I ran "test dispatch.cc" from the prompt, all 13 tests passed.
>
> octave:11> test dispatch.cc
> PASSES 13 out of 13 tests
>
> Has anyone else encountered this? ... I'd guess the sleep(2) is present to
> avoid these problems?
>
> Ben
>
>

I'm having trouble with the dispatch tests, too. Mine doesn't crash,
but fails due to parse error.
I get a couple more parse errors during make check (in test_prefer). I
suspect this is related to the
recent changes in the parser.
What's worse, simple commands like "help help" fail. Functional forms work.

regards

--
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz
Reply | Threaded
Open this post in threaded view
|

Re: trouble testing dispatch.cc

John W. Eaton
Administrator
On 23-Jan-2009, Jaroslav Hajek wrote:

| I'm having trouble with the dispatch tests, too. Mine doesn't crash,
| but fails due to parse error.
| I get a couple more parse errors during make check (in test_prefer). I
| suspect this is related to the
| recent changes in the parser.

I see the following failures when I test my current build (the tip for
me is 8578:4b6558abe675):

  >>>>> processing /export/home/jwe/src/octave/src/DLD-FUNCTIONS/dispatch.cc
    ***** test # replace base m-file
   echo_to_file ('function a=dispatch_x(a)', "dispatch_x.m");
   dispatch('dispatch_x','length','string')
   assert(dispatch_x(3),3)
   assert(dispatch_x("a"),1)
   sleep (2);
   echo_to_file ('function a=dispatch_x(a),++a;', "dispatch_x.m");
   rehash();
   assert(dispatch_x(3),4)
   assert(dispatch_x("a"),1)
  !!!!! test failed
  `dispatch_x' undefined near line 5 column 9

  >>>>> processing /export/home/jwe/src/octave/src/data.cc
    ***** assert(log2(complex(0,Inf)), Inf + log2(i));
  !!!!! test failed
  assert (log2 (complex (0, Inf)),Inf + log2 (i)) expected
  Inf + 2.266i
  but got
  Inf - NaNi
  NaNs don't match

  >>>>> processing test_prefer
    ***** test
   ped = print_empty_dimensions ();
   print_empty_dimensions (0);
   a = cell (1, 1);
   b = type -q a;
   assert(!isempty(findstr(b,"[]")));
   assert(isempty(findstr(b,"[](0x0)")));
   print_empty_dimensions (ped);
  !!!!! test failed
  type: `a' undefined  ***** test
   ped = print_empty_dimensions ();
   print_empty_dimensions (1);
   a = cell (1, 1);
   b = type -q a;
   assert(!isempty(findstr(b,"[](0x0)")));
   print_empty_dimensions (ped);
  !!!!! test failed
  type: `a' undefined

The failing test in data.cc is not new for me.

| What's worse, simple commands like "help help" fail. Functional forms work.

Evaluating "help help" works for me.  Do you have a PKG_ADD file in
the new scripts/help directory in your build tree?  Did you run
configure again after the latest changes?

jwe