Created
June 13, 2009 19:33
-
-
Save tav/129402 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ./py.test ../../pypy/rpython/module/test/test_*.py | |
inserting into sys.path: /Users/tav/work/third_party/generic/pypy | |
===================================================== test session starts ===================================================== | |
python: platform darwin -- Python 2.5.1 | |
using py lib: /Users/tav/work/third_party/generic/pypy/py <rev 64398> | |
test object 1: /Users/tav/work/third_party/generic/pypy/pypy/rpython/module/test/test_ll_os.py | |
test object 2: /Users/tav/work/third_party/generic/pypy/pypy/rpython/module/test/test_ll_os_environ.py | |
test object 3: /Users/tav/work/third_party/generic/pypy/pypy/rpython/module/test/test_ll_os_path.py | |
test object 4: /Users/tav/work/third_party/generic/pypy/pypy/rpython/module/test/test_ll_os_stat.py | |
test object 5: /Users/tav/work/third_party/generic/pypy/pypy/rpython/module/test/test_ll_strtod.py | |
test object 6: /Users/tav/work/third_party/generic/pypy/pypy/rpython/module/test/test_ll_termios.py | |
test object 7: /Users/tav/work/third_party/generic/pypy/pypy/rpython/module/test/test_ll_time.py | |
test object 8: /Users/tav/work/third_party/generic/pypy/pypy/rpython/module/test/test_posix.py | |
../../pypy/rpython/module/test/test_ll_os.py ..ss...Fs | |
../../pypy/rpython/module/test/test_ll_os_environ.py . | |
../../pypy/rpython/module/test/test_ll_os_path.py ...s | |
../../pypy/rpython/module/test/test_ll_os_stat.py s | |
../../pypy/rpython/module/test/test_ll_strtod.py .. | |
../../pypy/rpython/module/test/test_ll_termios.py sssss | |
../../pypy/rpython/module/test/test_ll_time.py .F.... | |
../../pypy/rpython/module/test/test_posix.py ..s...............s............sss | |
========================================================== FAILURES =========================================================== | |
__________________________________________________________ FAILURES ___________________________________________________________ | |
def test_execve(): | |
if os.name != 'posix': | |
py.test.skip('posix specific function') | |
ll_execve = getllimpl(os.execve) | |
def run_execve(program, env): | |
# we cannot directly call ll_execve() because it replaces the | |
# current process. | |
fd_read, fd_write = os.pipe() | |
childpid = os.fork() | |
if childpid == 0: | |
# in the child | |
os.close(fd_read) | |
os.dup2(fd_write, 1) # stdout | |
os.close(fd_write) | |
ll_execve(program, [program], env) | |
assert 0, "should not arrive here" | |
else: | |
# in the parent | |
os.close(fd_write) | |
child_stdout = [] | |
while True: | |
data = os.read(fd_read, 4096) | |
if not data: break # closed | |
child_stdout.append(data) | |
pid, status = os.waitpid(childpid, 0) | |
os.close(fd_read) | |
return status, ''.join(child_stdout) | |
# Test exit status and code | |
> result, child_stdout = run_execve("/bin/true", {}) | |
/Users/tav/work/third_party/generic/pypy/pypy/rpython/module/test/test_ll_os.py:112: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
program = '/bin/true', env = {} | |
def run_execve(program, env): | |
# we cannot directly call ll_execve() because it replaces the | |
# current process. | |
fd_read, fd_write = os.pipe() | |
childpid = os.fork() | |
if childpid == 0: | |
# in the child | |
os.close(fd_read) | |
os.dup2(fd_write, 1) # stdout | |
os.close(fd_write) | |
> ll_execve(program, [program], env) | |
/Users/tav/work/third_party/generic/pypy/pypy/rpython/module/test/test_ll_os.py:97: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
path = '/bin/true', args = ['/bin/true'], env = {} | |
def execve_llimpl(path, args, env): | |
# XXX Check path, args, env for \0 and raise TypeErrors as | |
# appropriate | |
envstrs = [] | |
for item in env.iteritems(): | |
envstrs.append("%s=%s" % item) | |
l_args = rffi.liststr2charpp(args) | |
l_env = rffi.liststr2charpp(envstrs) | |
os_execve(path, l_args, l_env) | |
# XXX untested | |
rffi.free_charpp(l_env) | |
rffi.free_charpp(l_args) | |
> raise OSError(rposix.get_errno(), "execve failed") | |
E OSError: [Errno 2] execve failed | |
/Users/tav/work/third_party/generic/pypy/pypy/rpython/module/ll_os.py:245: OSError | |
------------------------------------------------------- Captured stderr ------------------------------------------------------- | |
[platform:execute] gcc -c -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 /var/folders/zO/zOHvL8VOE1y8uUqzZe6qRk+++TI/-Tmp-/usession-trunk-4/module_cache/module_3.c -o /var/folders/zO/zOHvL8VOE1y8uUqzZe6qRk+++TI/-Tmp-/usession-trunk-4/module_cache/module_3.o | |
[platform:execute] gcc -c -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 /var/folders/zO/zOHvL8VOE1y8uUqzZe6qRk+++TI/-Tmp-/usession-trunk-4/module_cache/module_4.c -o /var/folders/zO/zOHvL8VOE1y8uUqzZe6qRk+++TI/-Tmp-/usession-trunk-4/module_cache/module_4.o | |
[platform:execute] gcc -bundle -undefined dynamic_lookup /var/folders/zO/zOHvL8VOE1y8uUqzZe6qRk+++TI/-Tmp-/usession-trunk-4/module_cache/module_3.o /var/folders/zO/zOHvL8VOE1y8uUqzZe6qRk+++TI/-Tmp-/usession-trunk-4/module_cache/module_4.o -mmacosx-version-min=10.4 -o /var/folders/zO/zOHvL8VOE1y8uUqzZe6qRk+++TI/-Tmp-/usession-trunk-4/module_cache/externmod_0.so | |
[platform:execute] gcc -c -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 /var/folders/zO/zOHvL8VOE1y8uUqzZe6qRk+++TI/-Tmp-/usession-trunk-4/module_cache/module_5.c -o /var/folders/zO/zOHvL8VOE1y8uUqzZe6qRk+++TI/-Tmp-/usession-trunk-4/module_cache/module_5.o | |
[platform:execute] gcc -bundle -undefined dynamic_lookup /var/folders/zO/zOHvL8VOE1y8uUqzZe6qRk+++TI/-Tmp-/usession-trunk-4/module_cache/module_5.o -mmacosx-version-min=10.4 -o /var/folders/zO/zOHvL8VOE1y8uUqzZe6qRk+++TI/-Tmp-/usession-trunk-4/module_cache/externmod_1.so | |
__________________________________________________________ FAILURES ___________________________________________________________ | |
self = <pypy.rpython.module.test.test_ll_time.TestLLType object at 0x20bedb0> | |
def test_time_clock(self): | |
def f(): | |
return time.clock() | |
t0 = time.clock() | |
t1 = self.interpret(f, []) | |
t2 = time.clock() | |
t3 = self.interpret(f, []) | |
t4 = time.clock() | |
t5 = self.interpret(f, []) | |
t6 = time.clock() | |
# time.clock() and t1() might have a different notion of zero, so | |
# we can only subtract two numbers returned by the same function. | |
assert 0 <= t2-t0 | |
assert 0 <= t3-t1 <= t4-t0 | |
> assert 0 <= t4-t2 <= t5-t1 <= t6-t0 | |
E assert (7.3206129999999998 - 7.3186960000000001) <= (7.3099999999999996 - 7.3099999999999996) | |
/Users/tav/work/third_party/generic/pypy/pypy/rpython/module/test/test_ll_time.py:32: AssertionError | |
------------------------------------------------------- Captured stderr ------------------------------------------------------- | |
[annrpython] <FunctionGraph of (pypy.rpython.module.test.test_ll_time:19)f at 0x20cd210> -> SomeFloat() | |
[annrpython] <FunctionGraph of (pypy.rpython.lltypesystem.rclass:721)ll_runtime_type_info__objectPtr at 0x20e3a30> -> SomePtr(ll_ptrtype=<* RuntimeTypeInfo (opaque)>) | |
[rtyper] -=- specialized 4 blocks -=- | |
[annrpython] <FunctionGraph of (pypy.rpython.lltypesystem.rffi:147)clock___0 at 0x20ed170> -> SomeInteger(knowntype=r_uint, nonneg=True, unsigned=True) | |
[rtyper] -=- specialized 6 more blocks -=- | |
[annrpython] <FunctionGraph of (pypy.rpython.lltypesystem.rclass:697)ll_issubclass__object_vtablePtr_object_vtablePtr at 0x20e3350> -> SomeBool() | |
[annrpython] <FunctionGraph of (pypy.rpython.lltypesystem.rclass:694)ll_type__objectPtr at 0x20f3a80> -> SomePtr(ll_ptrtype=<* Struct object_vtable { subclassrange_min, subclassrange_max, rtti, name, instantiate }>) | |
[annrpython] <FunctionGraph of (pypy.rpython.lltypesystem.exceptiondata:91)ll_pyexcclass2exc__PyObjectPtr at 0x20e84b8> -> SomePtr(const=<* struct object { typeptr=... }>, ll_ptrtype=<* GcStruct object { typeptr }>) | |
[annrpython] <FunctionGraph of (pypy.rpython.lltypesystem.exceptiondata:91)ll_pyexcclass2exc__PyObjectPtr at 0x20e84b8> -> SomePtr(ll_ptrtype=<* GcStruct object { typeptr }>) | |
[annrpython] <FunctionGraph of (pypy.rpython.exceptiondata:53)ll_raise_OSError__Signed at 0x20b42b0> -> SomeImpossibleValue() | |
[rtyper] -=- specialized 13 more blocks -=- | |
====================================== 2 failed, 45 passed, 15 skipped in 28.66 seconds ======================================= | |
Fs | |
../../pypy/rpython/module/test/test_ll_os_environ.py . | |
../../pypy/rpython/module/test/test_ll_os_path.py ...s | |
../../pypy/rpython/module/test/test_ll_os_stat.py s | |
../../pypy/rpython/module/test/test_ll_strtod.py .. | |
../../pypy/rpython/module/test/test_ll_termios.py sssss | |
../../pypy/rpython/module/test/test_ll_time.py ...... | |
../../pypy/rpython/module/test/test_posix.py ..s...............s............sss | |
========================================================== FAILURES =========================================================== | |
__________________________________________________________ FAILURES ___________________________________________________________ | |
def test_execve(): | |
if os.name != 'posix': | |
py.test.skip('posix specific function') | |
ll_execve = getllimpl(os.execve) | |
def run_execve(program, env): | |
# we cannot directly call ll_execve() because it replaces the | |
# current process. | |
fd_read, fd_write = os.pipe() | |
childpid = os.fork() | |
if childpid == 0: | |
# in the child | |
os.close(fd_read) | |
os.dup2(fd_write, 1) # stdout | |
os.close(fd_write) | |
ll_execve(program, [program], env) | |
assert 0, "should not arrive here" | |
else: | |
# in the parent | |
os.close(fd_write) | |
child_stdout = [] | |
while True: | |
data = os.read(fd_read, 4096) | |
if not data: break # closed | |
child_stdout.append(data) | |
pid, status = os.waitpid(childpid, 0) | |
os.close(fd_read) | |
return status, ''.join(child_stdout) | |
# Test exit status and code | |
result, child_stdout = run_execve("/bin/true", {}) | |
assert os.WIFEXITED(result) | |
> assert os.WEXITSTATUS(result) == 0 | |
E assert 1 == 0 | |
E + where 1 = <built-in function WEXITSTATUS>(256) | |
E + where <built-in function WEXITSTATUS> = os.WEXITSTATUS | |
/Users/tav/work/third_party/generic/pypy/pypy/rpython/module/test/test_ll_os.py:114: AssertionError | |
------------------------------------------------------- Captured stderr ------------------------------------------------------- | |
[platform:execute] gcc -c -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 /var/folders/zO/zOHvL8VOE1y8uUqzZe6qRk+++TI/-Tmp-/usession-trunk-4/module_cache/module_3.c -o /var/folders/zO/zOHvL8VOE1y8uUqzZe6qRk+++TI/-Tmp-/usession-trunk-4/module_cache/module_3.o | |
[platform:execute] gcc -c -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 /var/folders/zO/zOHvL8VOE1y8uUqzZe6qRk+++TI/-Tmp-/usession-trunk-4/module_cache/module_4.c -o /var/folders/zO/zOHvL8VOE1y8uUqzZe6qRk+++TI/-Tmp-/usession-trunk-4/module_cache/module_4.o | |
[platform:execute] gcc -bundle -undefined dynamic_lookup /var/folders/zO/zOHvL8VOE1y8uUqzZe6qRk+++TI/-Tmp-/usession-trunk-4/module_cache/module_3.o /var/folders/zO/zOHvL8VOE1y8uUqzZe6qRk+++TI/-Tmp-/usession-trunk-4/module_cache/module_4.o -mmacosx-version-min=10.4 -o /var/folders/zO/zOHvL8VOE1y8uUqzZe6qRk+++TI/-Tmp-/usession-trunk-4/module_cache/externmod_0.so | |
[platform:execute] gcc -c -O3 -fomit-frame-pointer -mmacosx-version-min=10.4 /var/folders/zO/zOHvL8VOE1y8uUqzZe6qRk+++TI/-Tmp-/usession-trunk-4/module_cache/module_5.c -o /var/folders/zO/zOHvL8VOE1y8uUqzZe6qRk+++TI/-Tmp-/usession-trunk-4/module_cache/module_5.o | |
[platform:execute] gcc -bundle -undefined dynamic_lookup /var/folders/zO/zOHvL8VOE1y8uUqzZe6qRk+++TI/-Tmp-/usession-trunk-4/module_cache/module_5.o -mmacosx-version-min=10.4 -o /var/folders/zO/zOHvL8VOE1y8uUqzZe6qRk+++TI/-Tmp-/usession-trunk-4/module_cache/externmod_1.so | |
====================================== 1 failed, 46 passed, 15 skipped in 52.01 seconds ======================================= | |
rumi:bin tav$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment