aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/kvm/lib/string_override.c
diff options
context:
space:
mode:
authorDavid Matlack <dmatlack@google.com>2022-09-22 16:17:23 -0700
committerPaolo Bonzini <pbonzini@redhat.com>2022-09-30 06:38:00 -0400
commit09636efd1bd164ac782ff0d3a714db2c53964776 (patch)
tree498b5df37ec1516e97c3360074fafbde9b7cad01 /tools/testing/selftests/kvm/lib/string_override.c
parent6336a810db5c7e8e48b55b12fbb5e9cbd36a3d19 (diff)
KVM: selftests: Gracefully handle empty stack traces
Bail out of test_dump_stack() if the stack trace is empty rather than invoking addr2line with zero addresses. The problem with the latter is that addr2line will block waiting for addresses to be passed in via stdin, e.g. if running a selftest from an interactive terminal. Opportunistically fix up the comment that mentions skipping 3 frames since only 2 are skipped in the code. Cc: Vipin Sharma <vipinsh@google.com> Cc: Sean Christopherson <seanjc@google.com> Signed-off-by: David Matlack <dmatlack@google.com> Message-Id: <20220922231724.3560211-1-dmatlack@google.com> [Small tweak to keep backtrace() call close to if(). - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/testing/selftests/kvm/lib/string_override.c')
0 files changed, 0 insertions, 0 deletions