I am seeing a doctest failure caused by my patch #13908 but it might be
interpreted as a bug in the doctesting code.

Essentially, the failure boils down to:
"""
sage: import os
sage: pid = os.fork()
sage: if pid == 0: sys.exit()
sage: if pid > 0: _ = os.waitpid(pid, 0)
"""
We create a child process, let that process exit normally and wait for it.

When doctesting this, I get
**********************************************************************
File "/home/jdemeyer/doctest/fork.py", line 4:
    sage: if pid == 0: sys.exit()
Exception raised:
    Traceback (most recent call last):
      File "/release/merger/sage-5.6.rc1/local/bin/ncadoctest.py", line
1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/release/merger/sage-5.6.rc1/local/bin/sagedoctest.py", line
38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename,
compileflags)
      File "/release/merger/sage-5.6.rc1/local/bin/ncadoctest.py", line
1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_0[4]>", line 1, in <module>
        if pid == Integer(0): sys.exit()###line 4:
    sage: if pid == 0: sys.exit()
    SystemExit
**********************************************************************

And with the new doctester (#12415):
**********************************************************************
File "/home/jdemeyer/doctest/fork.py", line 3, in fork
Failed example:
    pid = os.fork()
Expected nothing
Got:
    sage: if pid == 0: sys.exit() ## line 4 ##
**********************************************************************

My feeling says that the test should pass, but I don't know enough about
the implementation of the doctester to know whether that's even
possible.  Anyway, it's a strange situation because I believe the whole
doctester is actually forked.

So the big question is: what should happen in this situation and can we
fix it?

Jeroen.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To post to this group, send email to sage-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-devel+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.


Reply via email to