Opened 8 years ago
Closed 7 years ago
#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: | Merged in: | sage-5.6.beta0 | |
Authors: | Emil Widmann | Reviewers: | Volker Braun |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
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 (1)
Change History (7)
Changed 8 years ago by
comment:1 Changed 8 years ago by
- 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:2 Changed 7 years ago by
Please fill in your real name as Author.
comment:3 Changed 7 years ago by
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 years ago by
- Status changed from needs_review to positive_review
looks good to me
comment:5 Changed 7 years ago by
- Keywords sage_object removed
- Reviewers set to Volker Braun
comment:6 Changed 7 years ago by
- Merged in set to sage-5.6.beta0
- Resolution set to fixed
- Status changed from positive_review to closed
- Summary changed from doctest failure insage_object.pyx when test run as root to Doctest failure in sage_object.pyx when test run as root
patch (see Volker Braun) to avoid error in sage_object.pyx