pyston / pyston_v1

The previous version of Pyston, a faster implementation of the Python programming language. Please use this link for the new repository:
https://github.com/pyston/pyston/
4.89k stars 290 forks source link

What does "Expected failure (got code -6, should be 1)" mean? #431

Closed arbipher closed 9 years ago

arbipher commented 9 years ago

For example when I run "make check_assign_literal", it says "Expected failure (got code -6, should be 1)"

The content of test/assign_literal.py is

expected: fail

2 = 2

I know it's wrong since we can not assign to literal. My question is where does "-6" and "1" come from?

kmod commented 9 years ago

Hmm yeah it's not clear, but it's talking about the exit codes of Pyston vs CPython. 1 is the exception code that CPython uses when program exits by throwing an exception, which in this case is a SyntaxError. -6 is -SIGABRT, which means that we called abort(), which is probably from a failed assert() ie not handling that SyntaxrError gracefully. So it just means that we were expected to fail gracefully but we crashed instead. For exitcode (crashing) issues, it's usually easier to debug if you do make run_assign_literal and make pyrun_assign_literal.