Ticket #4736 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

[with patch, positive review] The doctesting doesn't always report segfaults properly

Reported by: mabshoff Owned by: gfurnish
Priority: major Milestone: sage-3.2.2
Component: doctest coverage Keywords:
Cc: Work issues:
Report Upstream: Reviewers:
Authors: Merged in:
Dependencies: Stopgaps:

Description

When reintroducing the bug from #4540 on purposed the doctesting framework after applying #717 and #4719 has trouble detecting segfualts and summarizing them at the end. For example consider this failure:

sage -t  "devel/sage/sage/combinat/sf/kschur.py"           
Exception exceptions.TypeError: 'cannot convert a (= 1) to OP' in
'sage.libs.symmetrica.symmetrica._op_schur_general_dict' ignored
function: mult(1)
       [3.1 s]

When running "-tp 8 -long" the failure is reported as:

 sage -t -long devel/sage/sage/combinat/sf/kschur.py # 0 doctests failed

Cheers,

Michael

Attachments

trac_4736_bin.patch Download (2.7 KB) - added by gfurnish 4 years ago.
trac_4736_2_bin.patch Download (3.3 KB) - added by gfurnish 4 years ago.
Apply on top of existing patch.

Change History

Changed 4 years ago by gfurnish

comment:1 Changed 4 years ago by gfurnish

  • Status changed from new to assigned
  • Summary changed from The doctesting doesn't always report segfaults properly to [with patch, needs review] The doctesting doesn't always report segfaults properly

comment:2 Changed 4 years ago by mabshoff

  • Summary changed from [with patch, needs review] The doctesting doesn't always report segfaults properly to [with patch, needs work] The doctesting doesn't always report segfaults properly

Patch looks nice, but there are two small problems:

For -t the new line is missing before the time is being printed. I consider this cosmetic, but other people might be annoyed:

sage -t  "devel/sage/sage/combinat/sf/homogeneous.py"       	 [3.1 s]

CTRL-C isn't caught properly - at least it shouldn't print "Error!!!" with "-t":

sage -t  "devel/sage/sage/combinat/sf/jack.py"              Error!!!
	 [8.5 s]

For -tp CTRL-C now seems to kill all doctests:

sage -t  devel/doc/const/const.tex
Error!!!

	 [1.8 s]
sage -t  devel/doc/tut/tut.tex
Error!!!

	 [1.7 s]
sage -t  devel/doc/prog/prog.tex
Error!!!

	 [1.8 s]

The following tests failed:

	sage -t  devel/doc/const/const.tex # KeyboardInterrupt
	sage -t  devel/doc/tut/tut.tex # KeyboardInterrupt
	sage -t  devel/doc/prog/prog.tex # KeyboardInterrupt
-------------------------------------------------------------------

I think this is the desired behavior since now the timeout kills run away jobs properly.

Cheers,

Michael

Changed 4 years ago by gfurnish

Apply on top of existing patch.

comment:3 Changed 4 years ago by gfurnish

  • Summary changed from [with patch, needs work] The doctesting doesn't always report segfaults properly to [with patch, needs review] The doctesting doesn't always report segfaults properly

comment:4 Changed 4 years ago by mabshoff

  • Summary changed from [with patch, needs review] The doctesting doesn't always report segfaults properly to [with patch, positive review] The doctesting doesn't always report segfaults properly

Very nice, the second patch fixes all the issues I reported. Great work Gary!

Cheers,

Michael

comment:5 Changed 4 years ago by mabshoff

  • Status changed from assigned to closed
  • Resolution set to fixed

Merged in Sage 3.2.2.alpha1

Note: See TracTickets for help on using tickets.