Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp572105lqd; Wed, 24 Apr 2024 10:19:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWRzqsNlFoVjLat93j/S/zt3FloZwm/0AC72FXMPE36wuWO65rnP8W7N7/QkHG7UoPu7hWfUdFa08mWwHTlioqaFfLNO51ejbrJ3UG7zA== X-Google-Smtp-Source: AGHT+IEC89xUrugLTW9gepHULWTE4AqFhGLF6KioQOk02KKeO2qc1+9M/pio+gWCKzgBxDyFKffl X-Received: by 2002:a05:620a:2236:b0:78d:7760:3ffb with SMTP id n22-20020a05620a223600b0078d77603ffbmr3012325qkh.61.1713979178342; Wed, 24 Apr 2024 10:19:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713979178; cv=pass; d=google.com; s=arc-20160816; b=ZN37fl6ZAd1wR3R6pUFJJvlNmPAqBNKE9DRuEFS5oV+GE0NGTvmbgOdU7REo9zi7Lx dx3/rmqNdZ/z3rCa+XpobHFX08EHFih/nJH8qntoBUYDwLDd0BmKzw1TYiAZc62NuiyQ 5dNkpOWkJT0/4g97oZOyGaqeB3NMxajaGImldTRITvt28Ou8yzIXEs8eDWFNj9wJXslm 5FHrR+uR3Drsgk1RllWG13H40Ky7f/nabC6aqH65SyEFn3GaGeHUYuPvF5ZXy1FWSaTK xdn7gLKyfKoQUVGOSVfsB5IHdNO3AJbNTmwX+rlKKln8rd2Y1xvJjcmqGWXUMdK3HLT9 c+2Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:dkim-signature:date; bh=MPnSCqBZNeTYi6Yq+K5T2lPK1pkupPn4Yzg+HFxV4RA=; fh=hfgjPQ43TI/iqnXYDHiBcFjnHDBxG6eNObUwm/Zq4L0=; b=bXi+aOZ/gQccvw6VgF0QRomauIQh8Pz3FFuWG2wSqJqonVRRJw6b1IgX83NxkxOXOe M0dTkZtWt+EfyMKQcbjNJ9fx8mfy8BGpDc9lsb+5uM3Qu6Y2KxpnMYbCyCKd3+6wSAYd bw8vhv6QKunX1YWhJWUniiyAka5fdwETKgtCgMtopQXaBPI0Loh5aMSJaAbD6X4mw5mt 6SEBX8hHMtqHpOaNHYlmORPZu6QF6sLJe+fWSaCUvSLIOvzorzKy9D9FoHnOmw8aeoyI CgGxSu1DDrG2SbeIQqkMySpgvSILOrkwLNCLbIxbvRLBr4ZYkxIO2EpTAVYzLZ534HU6 VtMA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=PsCtRx8a; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-157377-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157377-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id oq38-20020a05620a612600b0078ede0d1ecdsi15085747qkn.529.2024.04.24.10.19.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 10:19:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-157377-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=PsCtRx8a; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-157377-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157377-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 169231C22E28 for ; Wed, 24 Apr 2024 17:19:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6170716D9A3; Wed, 24 Apr 2024 17:19:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="PsCtRx8a" Received: from out-182.mta0.migadu.com (out-182.mta0.migadu.com [91.218.175.182]) (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 AE8FB16D4CC for ; Wed, 24 Apr 2024 17:19:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713979147; cv=none; b=m2bhCDab6smsq+XJEkz3rU3lV4LeWilFVM61lD2zvnkpAT/FUhqy2Zx3WUq45CNgH7/6S7FHyJYGMEh6Sr3vMR6m/g66ekOq5darIMBy1p+QY5hAcFvPhgJdogxZalUo4Txnm65i1rTy0Zq0Qd6Du/JsyPAPuI7RTkPHs6ehL/U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713979147; c=relaxed/simple; bh=fzUP5jXS3/ennNTINiF3XeycfhJxeMlYoYeWebVYLrE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=r5a4fP3jJK9hCxixgif+EoRnH5TXVDP1vN8c2pWbJ4d+ABDVEFUU/u9GUKzMQdVZ9kTHOEw/8Sp51TuHytdIQsUH6+J8vzYBMQhdtsSH1V+fR+8Cb3jDQE+2hPK7pTW7rEynjLX5HakiOm4c3F2X3i7iCVNj9zlbfsGAqFKx/nY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=PsCtRx8a; arc=none smtp.client-ip=91.218.175.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Date: Wed, 24 Apr 2024 10:18:57 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1713979143; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=MPnSCqBZNeTYi6Yq+K5T2lPK1pkupPn4Yzg+HFxV4RA=; b=PsCtRx8aCSAoweOsm30ih69vNYVTRPodlMVcmiUBkctOGzu3pRGbw1sE5GGh7nsoNHVM5h 5QOF1Z7R8cBa1l8TH1edsuJdhO/kJb3MMCiOmD1nDIQZWbQLOr280pl0WKUUtvCtbe/b/D kbfVKJFn8471rDFj+eFGUfHVrQqeYr8= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Sean Christopherson Cc: Andrew Jones , Markus Elfring , Kunwu Chan , linux-kselftest@vger.kernel.org, kvm@vger.kernel.org, kernel-janitors@vger.kernel.org, Muhammad Usama Anjum , Paolo Bonzini , Shuah Khan , LKML , Kunwu Chan , Anup Patel , Thomas Huth Subject: Re: [PATCH] KVM: selftests: Add 'malloc' failure check in test_vmx_nested_state Message-ID: References: <20240423073952.2001989-1-chentao@kylinos.cn> <878bf83c-cd5b-48d0-8b4e-77223f1806dc@web.de> <20240423-0db9024011213dcffe815c5c@orel> <20240424-e31c64bda7872b0be52e4c16@orel> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT Hey, On Wed, Apr 24, 2024 at 07:51:44AM -0700, Sean Christopherson wrote: > On Wed, Apr 24, 2024, Andrew Jones wrote: > > On Tue, Apr 23, 2024 at 12:15:47PM -0700, Sean Christopherson wrote: > > ... > > > I almost wonder if we should just pick a prefix that's less obviously connected > > > to KVM and/or selftests, but unique and short. > > > > > > > How about kvmsft_ ? It's based on the ksft_ prefix of kselftest.h. Maybe > > it's too close to ksft though and would be confusing when using both in > > the same test? > > I would prefer something short, and for whatever reason I have a mental block > with ksft. I always read it as "k soft", which is completely nonsensical :-) I despise brevity in tests, so my strong preference is to use some form of 'namespaced' helper. Perhaps others have better memory than I do, but I'm quick to forget the selftests library and find the more verbose / obvious function names helpful for jogging my memory. > > I'm not a huge fan of capital letters, but we could also do something like > > MALLOC()/CALLOC(). > > Hmm, I'm not usually a fan either, but that could actually work quite well in this > case. It would be quite intuitive, easy to visually parse whereas tmalloc() vs > malloc() kinda looks like a typo, and would more clearly communicate that they're > macros. Ooo, don't leave me out on the bikeshedding! How about TEST_MALLOC() / TEST_CALLOC(). It is vaguely similar to TEST_ASSERT(), which I'd hope would give the impression that an assertion is lurking below. -- Thanks, Oliver