Received: by 2002:ab2:687:0:b0:1f4:6588:b3a7 with SMTP id s7csp112589lqe; Tue, 9 Apr 2024 16:55:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUVZAZf6/YOCJWRATVTGG3mzMgE949X35vBzaUYQyuuhVjJ7tzYDPjCeBKRR9+PF6PR1CjcjFYSqiedJ9xZ0JHIQRbOSx1dFyoQPvRU2g== X-Google-Smtp-Source: AGHT+IGVEj30E/PevIOgBB7NKvyHwSeR6fKFscQ6bGfU7b1tgQJgNZoTNYJDXTkUN6JGVpSFaXCJ X-Received: by 2002:a05:6a00:1486:b0:6ec:db05:36d2 with SMTP id v6-20020a056a00148600b006ecdb0536d2mr1227569pfu.4.1712706925701; Tue, 09 Apr 2024 16:55:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712706925; cv=pass; d=google.com; s=arc-20160816; b=1FD5i1EqCf10ROqRA44yAmJ3wLRPS2PGVvi4RlDS6akSF5260w9asXhO7y5kEonjlo PJVV2iKvTkVXY1Wvbx4D+PgCNTATunxGi5bbgCOPkHJmpxoWy+gFoMIDP823q/OUqdO6 AtHb94wojL27Wr4oZ789WcP1J37TPlAW4lZPm/fqXH1dBec4iFGyDz5h694VoecpjJV7 RXDFqAEYNg4YoEKX6/uN7btmW02NEn9W4aOM9Ta4SAcMUf2Ioukj5jF9XZZCd/nq54rk 0f78Rk6FRM0EPowtuCzBiTHsbwijt5Y3RSmu2EPQQnzzmYO8WiuaKo7Mc319eG7Vb/N4 mVdQ== 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:date:dkim-signature; bh=iAaMW4DkptdB8vkfU6X0XRhtKwrtwp59dGPucd4k3xk=; fh=T6AIzvQ/8hQdoMRldK8UONGB/DkshEo0iDuMf5SHKiI=; b=SVeqaG+R+Wkdct1NqtmTV7qNcG/y7ifS9d6OfEq8eDkgKZb/K7RTL3CbxBJyV8pwoi 5oz/4PsadcLjjBFfi1QEC/S+USZdmsiW16gbwzp6E3YLqdt1ZZNxDBAS8OCuwa5d1e7V fXEDb5t9Yo5ce+1JJc/4BfI0yvOPeCvBClhRaoqdsa7OgC8agbFAOuD+/XS6MnUxsefl N/gFQ1eshWx5jfZt6MMwENT6ZKWPCVCuvVbQ8HKYwA6DmKUpbR0EhveZHfdCHmc/JAjF yb9p3ezvjsFSrp5UY3fXdcWndatiLzORYH6NmJaMPSxpO6INHMlMPHWtpjccGS5oV36J tOSw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Zcbj2GTY; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-137719-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137719-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id r5-20020aa78b85000000b006ecee76286bsi9156043pfd.233.2024.04.09.16.55.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 16:55:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-137719-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Zcbj2GTY; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-137719-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137719-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org 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 0E168285971 for ; Tue, 9 Apr 2024 23:46:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 62C2C158DDE; Tue, 9 Apr 2024 23:46:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Zcbj2GTY" Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) (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 2DBD2158DAA for ; Tue, 9 Apr 2024 23:46:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712706403; cv=none; b=kPc8hb6FzQqp8Kgd84hV7GIdN7lUWJVhWpcQpOlhgbSLO2NH5pzIneQ7sgLCbY+UdIOHtBM9jbkqHDpIPcBeUTzSXbgjMpBJuB+HR/DFguBjSMFsGWCNGFR4Eer9Zwbs25L1VG9YM/LsC3QqMmEHu6niIActUs4Swxao/X848Lo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712706403; c=relaxed/simple; bh=jNSBzWXhZJZfc+eIqIw5Gr2uSmaIhh7uL5umKj2kPfg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=AQDBC1IS4NUG51XMQf9e39agMGQ2qFmjvZHwbIjeiZuiKMR7Y/hZQuAsH7jezma4oWbFOmCWC5EagC7pFM4vxD4dS6VW7YHaivN68pvMxCqhbc3lndvWNwNUB/qZWQ7YXbsrUqtmv6C2NOsPxfSUTcfV7/DCV+5/luxXbJDxBso= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=Zcbj2GTY; arc=none smtp.client-ip=209.85.214.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-pl1-f172.google.com with SMTP id d9443c01a7336-1e3e56c9d2cso29275205ad.1 for ; Tue, 09 Apr 2024 16:46:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1712706401; x=1713311201; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=iAaMW4DkptdB8vkfU6X0XRhtKwrtwp59dGPucd4k3xk=; b=Zcbj2GTYCWEyQONPzz/ca0ax9BEJU1j4H7WYHwfusA7b5HiFO9dim32PdP+GMBk5J6 F4KNg1gEmgOZRBdhrZiOpTA/FgmX9lllGLX6bKUFLv51je9iNs1Hkp3EDgAu5cE57ilu YnFG7kKgqjPXzUn7HT/Iye17drfYtVGU1m2p4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712706401; x=1713311201; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=iAaMW4DkptdB8vkfU6X0XRhtKwrtwp59dGPucd4k3xk=; b=iPl5mz3E83/EoYKjtCfcxY8ftu8W3NcufXUN1lNUfnXQ9gZMauUGAD0D/vDt5CeHvh Dsb2AYCObl379sAgZNxKgoMT5vUzmwk71+LO+njZUXtCp1Rcq1yvbeuDFBlSmne1DRgo QfjDYHVBDuVx7cy7WQu9e9WIe4n/e+l5tDJ6X2ZNcgCkhlWb/sQKcbn+e9YjuyCu9dW6 KdsZGWBoEadeylZY0Ro6SwoNNnKBBfiPAnBM6BHlcdBAJ7UimZS7FM53wcOvDgyFjGPl g1XVE+qwK2FfrC+zI0fe0CXLtpYV18SRd1FgdONVXH0JLgXeyTj44Lni9h9YgMzNlloo qohw== X-Forwarded-Encrypted: i=1; AJvYcCU0pGsFt5Ul2mUugHUIbZtFPXvmGClZM2ppLDBR7Nn5kR44SG7WnCNlmrb95tbtkR6Hn0h3+xrV/iB2AnsfmvkvjXt/UT912ITaTF86 X-Gm-Message-State: AOJu0YyxZESbCRtJtnQUdElZpCDBAFRgJaa6Uq+v8JSzqyNA+BX0s7t9 RD7srz8Y9RzvlfA6U0ESPRLD96+q9DHRLEcBxokCvvLaDLPyWpXNw9xmp5AD9A== X-Received: by 2002:a17:902:eb8f:b0:1e3:cf18:7344 with SMTP id q15-20020a170902eb8f00b001e3cf187344mr1829767plg.11.1712706401500; Tue, 09 Apr 2024 16:46:41 -0700 (PDT) Received: from www.outflux.net ([198.0.35.241]) by smtp.gmail.com with ESMTPSA id i13-20020a170902eb4d00b001e2086fddecsm9497419pli.139.2024.04.09.16.46.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 16:46:41 -0700 (PDT) Date: Tue, 9 Apr 2024 16:46:40 -0700 From: Kees Cook To: Jakub Kicinski Cc: Sean Christopherson , Shuah Khan , Nathan Chancellor , linux-kselftest@vger.kernel.org, llvm@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] selftests: kselftest_harness: Print empty string, not empty fmt on PASS/FAIL Message-ID: <202404091644.9CFF82A@keescook> References: <20240409224256.1581292-1-seanjc@google.com> <20240409160920.3bfe3eeb@kernel.org> 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: <20240409160920.3bfe3eeb@kernel.org> On Tue, Apr 09, 2024 at 04:09:20PM -0700, Jakub Kicinski wrote: > On Tue, 9 Apr 2024 15:42:56 -0700 Sean Christopherson wrote: > > - ksft_test_result_code(t->exit_code, test_name, > > - diagnostic ? "%s" : "", diagnostic); > > + ksft_test_result_code(t->exit_code, test_name, "%s", diagnostic); > > Have you tested that to make sure it doesn't change the output? > > .. warning: ^^ leading question ;) Probably should be just this, without changing the NULL init? ksft_test_result_code(t->exit_code, test_name, "%s", diagnostic ?: ""); -- Kees Cook