Ticket #12021 (closed defect: fixed)
Doctest failure in sage_object.pyx when test run as root
| Reported by: | emil | Owned by: | mvngu |
|---|---|---|---|
| Priority: | minor | Milestone: | sage-5.6 |
| Component: | doctest coverage | Keywords: | doctest root |
| Cc: | Work issues: | ||
| Report Upstream: | N/A | Reviewers: | Volker Braun |
| Authors: | Emil Widmann | Merged in: | sage-5.6.beta0 |
| Dependencies: | Stopgaps: |
Description
sage -t -force_lib "devel/sage/sage/structure/sage_object.pyx"
*************************************************************
File "/mnt/sda6/COMPILE/sage-4.7.2/devel/sage/sage/structure/
sage_object.pyx", line 1042:
sage: sage.structure.sage_object.picklejar(1, dir + '/noaccess')
Expected:
Traceback (most recent call last):
...
OSError: ...
Got nothing
*******************************************************************
the doctest creates a directory and sets permissions to 0000. if running as root no error is thrown when accessing this directory, hence the failure of the doctest.
Proposed fix: check if running the test as root or flag example as no test
[ http://groups.google.com/group/sage-devel/browse_thread/thread/e1886d5ba5ade945]
Attachments
Change History
Changed 19 months ago by emil
-
attachment
trac120221_root.patch
added
comment:1 Changed 19 months ago by emil
- Status changed from new to needs_review
I attached a patch which fixes the error when run as root. However there is no warning about running tests as root which was suggested on sage-devel.
Example: WARNING: You are running doctests as root! It is strongly advised to stop and run the tests as restricted user Are you sure you want to continue as root (y/n)?
There was another ticket mentioned (#5155), maybe it should be implemented there?
comment:3 Changed 8 months ago by emil
Still get the same error in 5.3, so this is still a minor issue. I filled my real name in the comment of the patch. Where else should I fill it in?
comment:4 Changed 7 months ago by vbraun
- Status changed from needs_review to positive_review
looks good to me

patch (see Volker Braun) to avoid error in sage_object.pyx