-
-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spec tests fail with ASCII locale ? #12
Comments
Pretty sure I fixed this recently by using an explicit |
andychu
pushed a commit
that referenced
this issue
Sep 4, 2018
Now we check file descriptors (even those above #10) before using them. This is a recurrence of the bug described here: http://www.oilshell.org/blog/2017/07/02.html If you do 'import random' in Python, it results in /dev/urandom being permanently open (which can be seen in the blog post!) At the time, I incorrectly fixed the bug by just opening our own descriptors above #10. But it's possible that CPython will subsequently open something above #10 (/dev/urandom appeared as #12), so we have to additionally check descriptors before we use them. NOTE: 'import cgi' eventually causes 'import random'. We're only using it for cgi.escape(), but cgi.FieldStorage() uses tempfile, which uses a random number generator. Also: minimize the test case as gold/configure-bug.sh. 'test/gold.sh configure' was the case that caught this bug. The spec tests didn't find it! Because it appears to take about 4 redirects for this to happen!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This was reported on the mailing list and also here:
https://lobste.rs/s/obktxo/oil_shell_help_needed_if_you_have_debian/comments/akvbsk#c_akvbsk
sh_spec.py needs to read with a known encoding. *.test.sh should be restricted to utf-8 ?
The text was updated successfully, but these errors were encountered: