Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp354738lqs; Thu, 13 Jun 2024 11:57:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXkruUpjQxElYZCeNMYawka4gvMOd19W4wmMa96mV3USBIrJWppnavyISi7Ca8gM/iQcEHNjItTUHMhcfQ9sgR3ry8KRZb0VFbX9DE4tA== X-Google-Smtp-Source: AGHT+IHUseRJeazHadIr/GMv9Hzn6lOUdgJcfsNRIsKbcimxo1af2ELBt4fyywfYJg1+xOfveKRW X-Received: by 2002:a17:902:d48d:b0:1f6:8a19:4562 with SMTP id d9443c01a7336-1f8625cf8femr7774225ad.24.1718305076668; Thu, 13 Jun 2024 11:57:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718305076; cv=pass; d=google.com; s=arc-20160816; b=Si5gGGbsX3buS+s10ZAsfDI1ga3FLvf6Aoqx1JTbwe8L3IQGbaBAJ+YbP9wuILTmJR WPQtrenS8ThtL87OTZMUwcJRtrhFDpVSdOYECV7kihqaz/jIjrwVhePvPp/Honv+KtK9 3Ozeijim6K0vGfwsg8iVhm511waroidyuN7IC1/IRTVTL+9iXtnnx1BtldDDggzfWgPE 13cAQGCCTqIfUNuMg+VwjXJuivRO0U7aNq7JoU5Ym07TpQvnN3WHE2zPTLAAP49iU2Ne mw6l+C1b/VvJwbJ7U/UScHW28+Dw98yPutOBW7ry4p4lTMtC5F7ndsQkLlH9G3kURaEB +Saw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:references:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:in-reply-to:date :dkim-signature; bh=C5Fndbx/eA449NVcOCPdnOjxiUO14w1zakbsrpN7bkY=; fh=NIUnA2j5UGVS1LEphVNon0lhuERMXleS0aweaxLoD7s=; b=JFbOP7xeNbpVZVWXu0Zosr4WDuL9ElBzPewq9jUf9kSncYZVyTX+aYEB0q7eL2Mq7w nTDEkEB3KDmbYXgHRMBiXZqUrvN4vvGy54+rFVzgvSC7jiHAITcDqrqrpgO+XnB90F1F QTvRAfqZ2hgvE6VoiIxEeIllMZrrUVC2b1YihPGV/3XvOgu1oR3AZzmwWrz7Kk6NNCyy f5bcCKHC8DsvghWlsSB64b8QewrPyizvj9W8/AIaXq3RBwMFVDY3GiW7k30VsX2e20bA Rauswy9OFHlSRIRdggTLdb9Rv1g2I/+DWWd22eDc69p3zK2qWzbUihqbDbvFohRWL1Kp BDmA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=G+ueFLQP; arc=pass (i=1 spf=pass spfdomain=flex--seanjc.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-213870-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213870-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f855f176f6si18271715ad.562.2024.06.13.11.57.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 11:57:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-213870-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=G+ueFLQP; arc=pass (i=1 spf=pass spfdomain=flex--seanjc.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-213870-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213870-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id C7157283392 for ; Thu, 13 Jun 2024 18:57:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9F7C714C585; Thu, 13 Jun 2024 18:57:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="G+ueFLQP" Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6FEAA14A4E7 for ; Thu, 13 Jun 2024 18:57:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718305053; cv=none; b=rFCi+nw9Mh/KwwUZl/3SxE4rwjGIKv/mUmb0E6jreRBbPV3jI6b91z+8jGwSsg1ifYg1x7M5k+zWb8+7X/CrdtUkZKe+K8MuMYweJcXFbp4IjZB9AKgF//rR8C0Oip2PprFt6QEPum8aA/Z0Z7VkOig3QSSqasfe/+02FVrmbxQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718305053; c=relaxed/simple; bh=tSGg8GhzkVKrJZ6e6lZkA8/ZUCa4bAOubkF1I12udL4=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=CHvsZIAwdcBPSSZUnVSbb1EHwQ02oJDfH4JpKqoBc26nLxfGMisjyPwKoe2bDz1l/5jB0gSFeZ5ryAR0oA8m+3SnjJR8qQhLIbEm9xYrNXh12cepRHRf8NGUt0l+fciej+Ifl1JxZi29lwFmOtqDOLzYkByqxF1CgYqN34VTEEI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=G+ueFLQP; arc=none smtp.client-ip=209.85.128.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-6312750ce56so16596527b3.1 for ; Thu, 13 Jun 2024 11:57:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1718305051; x=1718909851; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=C5Fndbx/eA449NVcOCPdnOjxiUO14w1zakbsrpN7bkY=; b=G+ueFLQPrvYGJO1ILHQSKacSbWHY318hzKz/2Cxe6D+AkjO2OisZeOGFNsiXDXX4Hi BFR4lTMpdFPcR+PTZzmlBkctfvO6ZCz27Ul1tEP9zu9uEoKvgHhVpL4DwPelKTOyV/Pw BUV/I1ZXnnTpSDlVGNwXr8eeAuQI2sl5j4+l1fjU5cm+u9phuTOMjPiMKqUx9TmkiEkm rQJon4fE7Uo2hLHbq1H4wAdV2CycVtfkzJYntR64dcbPeWpZwpYupuFJy7BS1KaoVB+T GLuXNUNOZCKBq2zT5nFBHZJaGclkxF86ISe0fbIYlkco5+pYasz+H8JOyHFg2ForjwX1 Qr5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718305051; x=1718909851; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=C5Fndbx/eA449NVcOCPdnOjxiUO14w1zakbsrpN7bkY=; b=X3EShak4AvDCOsRUuXJ9Sca70TDVW6c1leySC+4k8vQroEr9mTEyQ+lNgx5ayQWE+o 5SvH7Z4f5lR5HN3bIYLDuQYbmz1G2tIc/P7LOHthKWBvMwzh4t9ErOwugxxh7PILXvPD oId9C+35pxxAATwQpEvcISJwvKOtGFHopB6jDMNFXW1QeVD5lE+vH7jAr3s0fXxMsjQL fvUpV29ZWiulLeQN8P7tNpeor4tpKEpL26Q3vKgnqwS/VOXZnCm+skVL9sL0skavjGLP PlM5SXLg2mg/NKWjbvxpGiFrt9mOhI4wqUzbUp0kk+x7m4hpNg/gocRySpiBMX3Obe2x Eeyw== X-Forwarded-Encrypted: i=1; AJvYcCXwG8VVVs9uw46CzayiI0b/vskhKzIlgrAjDjEt7tJwQYbcUIXFOBhcDzzdDMtLHsq0Rcvr1KVxZZWBxjJI3a94PUX6jSJSHUQJXbbl X-Gm-Message-State: AOJu0YzpgilE0EJFv2iow+6bD0Xjd/oHAGxaW8l9MzXYTMJ76KyFYGkF 3pUpNLRk9/mpe0oz5pxCdslU3BsEGHOkfYoYjusEd5caOECbB2nws42I5/MI895Cy9DURawWHLw zxQ== X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a05:690c:398:b0:61b:e689:7347 with SMTP id 00721157ae682-6322216bf24mr873747b3.2.1718305051510; Thu, 13 Jun 2024 11:57:31 -0700 (PDT) Date: Thu, 13 Jun 2024 11:57:30 -0700 In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240612104500.425012-1-usama.anjum@collabora.com> <20240612104500.425012-2-usama.anjum@collabora.com> Message-ID: Subject: Re: [PATCH 2/2] selftests: kvm: replace exit() with ksft_exit_fail_msg() From: Sean Christopherson To: Muhammad Usama Anjum Cc: Paolo Bonzini , Shuah Khan , Anup Patel , Oliver Upton , Claudio Imbrenda , kernel@collabora.com, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="us-ascii" On Thu, Jun 13, 2024, Muhammad Usama Anjum wrote: > > As above, AFAICT it comes from Google's internal test infrastructure (KVM selftests > > came from Google). > > > >> 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. > > > > This is debatable and not obviously correct. The documentation says: > > > > Bail out! > > As an emergency measure a test script can decide that further tests are > > useless (e.g. missing dependencies) and testing should stop immediately. In > > that case the test script prints the magic words > > > > which suggests that a test should only emit "Bail out!" if it wants to stop > > entirely. We definitely don't want KVM selftests to bail out if a TEST_ASSERT() > > fails in one testcase. > But KVM tests are bailing out if assert fails, exit(254) is being called > which stops the further execution of the test cases. Not if the TEST_ASSERT() fires from within a test fixture, in which case the magic in tools/testing/selftests/kselftest_harness.h captures the failure but continues on with the next test.