From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) (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 32318158DC4 for ; Tue, 9 Apr 2024 23:46:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712706403; cv=none; b=XjSO5XQK00Ul0BGwKAiEdSkPNDEyxbqcvEawcrss2XEDdAMGBwhNiTzHFAe2HJsOf16PAbpoaeCrxLti9gx1rFbwRu4PTk1BNAtGPPuhoLbqGh4etA/VuVqxlFskjgxDqAhrSCvq4MmfBju0sJE6nGCO4po8DVPRP+WODL4vP9M= 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.173 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Zcbj2GTY" Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-1e3e56c9d2cso29275215ad.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=WP1yYNWMTIjAtyYsD7znIA6Zq4dL/0SaBuz4RFl0UsOvyZ+Ni2LiWCfYz8tL/7wNJg ktxwQj1N8slCtMd4NxFQOVBj+le/pF4u24AOtaMl3K5gexSKdO7LMKEVjU2H22fWqohi aQKBMiOILZVmiNokEFuv9qb2ZVwXuPJsPdvT5kZCunG4vf6Q0SoKLV2Kt71KODv2EBOd jUr+xJ2KrVbcxiD0D1N1cKZbNxFFVjpGZQp7NTmWuMWkywcsf19tF+dQ7oU8zs8QCx2/ TCkgS5YBhIdL7pHeOGMZA0P5O9jF0KZa9p+/TpNC8zikWhyC3i9E/9K2lPldffT7KaLO YzHQ== X-Forwarded-Encrypted: i=1; AJvYcCWjHl8E7mlRLx3a5XwVPMNnEPYtiANhOyFLu7BWGaBPDzVWuv4L7ng8VFnzdguZ42PJW9yAmwngcPw0zigk8l7Tv/TwR8K4xZEx0OF/vine X-Gm-Message-State: AOJu0Ywext+JW43EeoGrdnMrfGH37gKpzNLQfJTKhwUZSD2YI3S9WjoW kbF3HsAr1yLEIufHsZtTVfOca22k0jsIsKpyrX57QO+T9mN1YV/ClaZGiOEIpw== X-Google-Smtp-Source: AGHT+IGINmKk+cI6DD2WQ7SjjT99R0HHKYxf0CC6JwcygaTUpcCJ8LVus266jgna/DTBfAx9a5m9Ow== 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-kselftest@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