From patchwork Wed Jun 12 10:44:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muhammad Usama Anjum X-Patchwork-Id: 13694781 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6F7B016F0CB; Wed, 12 Jun 2024 10:45:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718189115; cv=none; b=NpqfOPooyNKHi3+UMQQoLpACH7GE8H7Y2myQWdOTfmQTUbb3JFFkkx7D+67Ia4fYHGppl46rPrp12ehFPvh14qH5QBxE+5uu1teiwinSjenUJP00H5q884bzXaYs4pLMFQya4AY4C1RbGcqvOJVcRwdsrP+lOUEykAWWbazlzmA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718189115; c=relaxed/simple; bh=7KBVdtrVyLAPbuJcgaNyt4TEuscLxt+vNyICK4BFFWs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=nctv1X3jIiqvC45B3WmRazPPCW1LAMYA4NQDQ7Dpu/avfaLSbxHDHg5dYqBbabI8totoKav4LtJuWtO/6QKGn25EAqwbjFiOYRlCaj+VBTRM+NKuqAxHUNFiiUn42Ucl8MqMuARY+ETZa/lfBmfuySnkNby7x71r3tWvRQBDsio= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=lDAW1UK9; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="lDAW1UK9" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1718189112; bh=7KBVdtrVyLAPbuJcgaNyt4TEuscLxt+vNyICK4BFFWs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lDAW1UK9XSiFTbaMyIXs26KjiQuqRgfPtZ/wTBP71dndmPiobFX8h1+7AapHudFWk QAPwCnqFlPi6oveoy7HtuXlkzqvP9GKETMnypvHWy4Gcp5sGw51CCdckMFeXrVZpMq OLii7gHCAr66NsdX0P/nWn+gKMUivLj10TEwrtsTy6FNSoO+tNW+6JtR+P4DW3/GAf PNCgvi5n6HbSAT7yRo6CiPsw6zSqUP/vEOPjZRauihDRDhyjXCNffHAV5xsTtrb/Zk VawiM6otyI0AD3R/Sc/6xZaKjz/hDEXPjyvn+X1rWIpBHkRXNFyZgfrCj1xjQGYqXW +KsMgg+TxZoGA== Received: from localhost.localdomain (ec2-34-240-57-77.eu-west-1.compute.amazonaws.com [34.240.57.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: usama.anjum) by madrid.collaboradmins.com (Postfix) with ESMTPSA id E35EF378219A; Wed, 12 Jun 2024 10:45:09 +0000 (UTC) From: Muhammad Usama Anjum To: Paolo Bonzini , Shuah Khan , Muhammad Usama Anjum , Anup Patel , Sean Christopherson , Oliver Upton , Claudio Imbrenda Cc: kernel@collabora.com, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] selftests: kvm: replace exit() with ksft_exit_fail_msg() Date: Wed, 12 Jun 2024 15:44:54 +0500 Message-Id: <20240612104500.425012-2-usama.anjum@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240612104500.425012-1-usama.anjum@collabora.com> References: <20240612104500.425012-1-usama.anjum@collabora.com> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 --- 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;