diff options
| -rw-r--r-- | test/arch/x86/qemu/testqemu.py | 16 | ||||
| -rw-r--r-- | test/test_all.py | 3 |
2 files changed, 18 insertions, 1 deletions
diff --git a/test/arch/x86/qemu/testqemu.py b/test/arch/x86/qemu/testqemu.py index d04308e4..7cf2ab75 100644 --- a/test/arch/x86/qemu/testqemu.py +++ b/test/arch/x86/qemu/testqemu.py @@ -84,6 +84,22 @@ def xxx___printf_chk(jitter): nb_tests += 1 jitter.func_ret_cdecl(ret_ad, 0) +def xxx_puts(jitter): + ''' + #include <stdio.h> + int puts(const char *s); + + writes the string s and a trailing newline to stdout. + ''' + ret_addr, args = jitter.func_args_cdecl(['target']) + output = jitter.get_str_ansi(args.target) + # Check with expected result + line = expected.next() + if output != line.rstrip(): + print "Expected:", line + print "Obtained:", output + raise RuntimeError("Bad semantic") + return jitter.func_ret_cdecl(ret_addr, 1) # Parse arguments parser = Sandbox_Linux_x86_32.parser(description="ELF sandboxer") diff --git a/test/test_all.py b/test/test_all.py index 4dff7ed7..6288466a 100644 --- a/test/test_all.py +++ b/test/test_all.py @@ -105,10 +105,11 @@ QEMU_TESTS = { "jcc": ("tcc", "python"), "loop": ("tcc", "python"), "lea": ("tcc", "python"), + "self_modifying_code": ("tcc", "python"), "conv": ("tcc", "python"), # Unsupported # "floats", "bcd", "xchg", "string", "misc", "segs", "code16", "exceptions", - # "self_modifying_code", "single_step" + # "single_step" } |