Re: [PATCH 6/7] python: Add tests for record Python bindings

Simon Marchi
2016-10-27T15:59:54Z

On 2016-10-27 02:28, Tim Wiederhake wrote:
> +# Skip this test if btrace is disabled.
> +
> +if { [skip_btrace_tests] } { return -1 }

Would it be helpful to have at least some minimal tests using the "full"
method, even if btrace is not available?

> +with_test_prefix "no or double record" {
> + gdb_test "python print(gdb.current_recording())" "None"
> +
> + gdb_test_no_output "python gdb.start_recording()"
> + gdb_test "python gdb.start_recording(\"full\")" ".*gdb\.error:
> The process is already being recorded\..*"
> +
> + gdb_test_no_output "python gdb.stop_recording()"
> + gdb_test "python gdb.stop_recording()" ".*gdb\.error: No record
> target is currently active\..*"

These last two tests give the same test name (which must be unique).
You could give a specific name to one of them.