[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240612104500.425012-2-usama.anjum@collabora.com>
Date: Wed, 12 Jun 2024 15:44:54 +0500
From: Muhammad Usama Anjum <usama.anjum@...labora.com>
To: Paolo Bonzini <pbonzini@...hat.com>,
Shuah Khan <shuah@...nel.org>,
Muhammad Usama Anjum <usama.anjum@...labora.com>,
Anup Patel <anup@...infault.org>,
Sean Christopherson <seanjc@...gle.com>,
Oliver Upton <oliver.upton@...ux.dev>,
Claudio Imbrenda <imbrenda@...ux.ibm.com>
Cc: kernel@...labora.com,
kvm@...r.kernel.org,
linux-kselftest@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] selftests: kvm: replace exit() with ksft_exit_fail_msg()
The KSFT_FAIL, exit code must be used instead of exit(254). The 254 code
here seems like anciant relic. Its even better if we use
ksft_exit_fail_msg() which will print out "Bail out" meaning the test
exited without completing. This string is TAP protocol specific.
Signed-off-by: Muhammad Usama Anjum <usama.anjum@...labora.com>
---
tools/testing/selftests/kvm/lib/assert.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/kvm/lib/assert.c b/tools/testing/selftests/kvm/lib/assert.c
index 33651f5b3a7fd..db648a7ac429b 100644
--- a/tools/testing/selftests/kvm/lib/assert.c
+++ b/tools/testing/selftests/kvm/lib/assert.c
@@ -87,7 +87,7 @@ test_assert(bool exp, const char *exp_str,
if (errno == EACCES)
ksft_exit_skip("Access denied - Exiting\n");
- exit(254);
+ ksft_exit_fail_msg("\n");
}
return;
--
2.39.2
Powered by blists - more mailing lists