]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: selftests: Print the errno besides error-string in TEST_ASSERT
authorYanan Wang <wangyanan55@huawei.com>
Tue, 30 Mar 2021 08:08:50 +0000 (16:08 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 20 Apr 2021 08:18:52 +0000 (04:18 -0400)
commit9b606f6fc88a91559517eb7e5a78444d4ee5e05c
tree2dc63e9d61af1d1395bdbe4f06af30bfc91e96db
parentea62cf761f6448da5703ec05c4701688290d4952
KVM: selftests: Print the errno besides error-string in TEST_ASSERT

Print the errno besides error-string in TEST_ASSERT in the format of
"errno=%d - %s" will explicitly indicate that the string is an error
information. Besides, the errno is easier to be used for debugging
than the error-string.

Suggested-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Yanan Wang <wangyanan55@huawei.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Message-Id: <20210330080856.14940-5-wangyanan55@huawei.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/lib/assert.c