[PATCH 1/3] Redesign mock environment for gdbarch selftests
Yao Qi
qiyaoltc@gmail.com
Wed Oct 4 10:39:00 GMT 2017
Pedro Alves <palves@redhat.com> writes:
> OK. I propose we stick with something like I had, and still build
> an isolated inferior/aspace etc. To me, that feels like more robust
I like the way that we can build an isolated inferior/aspace for unit test.
> mocking/isolation. If I run the tests while debugging something
> with the updated patch (below), I get:
>
> (gdb) maint selftest
> Running selftest array_view.
> Running selftest copy_bitwise.
> Running selftest copy_integer_to_size.
> Running selftest current_regcache.
> Running selftest execute_cfa_program.
> Running selftest function_view.
> Running selftest gdb_environ.
> Running selftest gdb_realpath.
> Running selftest memory_error.
> Running selftest offset_type.
> Running selftest optional.
> Running selftest print_one_insn.
> Running selftest producer-parser.
> Running selftest register_to_value.
> Self test failed: arch i386: target already pushed
> Self test failed: arch i386:x86-64: target already pushed
> Self test failed: arch i386:x64-32: target already pushed
> Self test failed: arch i8086: target already pushed
> Self test failed: arch i386:intel: target already pushed
> Self test failed: arch i386:x86-64:intel: target already pushed
> Self test failed: arch i386:x64-32:intel: target already pushed
> Self test failed: arch i386:nacl: target already pushed
> Self test failed: arch i386:x86-64:nacl: target already pushed
> Self test failed: arch i386:x64-32:nacl: target already pushed
> Self test failed: self-test failed at
> /home/pedro/gdb/mygit/src/gdb/selftest-arch.c:86
> Running selftest rust-lex.
> Running selftest scoped_restore.
> Running selftest string_printf.
> Running selftest string_vprintf.
> Running selftest xml_escape_text.
> Ran 19 unit tests, 1 failed
>
> So it ends up being best effort, with most things passing and
> the gdbarch test failing.
>
> WDYT?
That is fine by me. Patch is good to me.
--
Yao (齐尧)
More information about the Gdb-patches
mailing list