From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 BF3451B87C0; Sat, 30 May 2026 18:42:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780166566; cv=none; b=lQ+XcQ2+rpDFeb04nN6X6nOkWM2eHHQqJZpCSaZ6KidIrh6kRhqacPm/+ZY0ls4AOp4YKvoXVVSbP76umSFIH/tAqTmhT0CGlIxNkpjuQki/LuhX0EnrseC3HHC5JqYEMEhy/66FO1+yRZPG4flFeasTsQ6TH6STfF+hMyDjLQA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780166566; c=relaxed/simple; bh=2XHQzUAxoonQW2Vv9/QwW+xAINisYtk9/+3sKN8F2R8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=I7xPtFchsFFu86aGgFsvObg/LJ84BMaYqzGJdqc8d65KUbMogLLr9qOeuG2785ftV7uETT9LNPZyUYtCkvFnu3mwXynv3BXdNK+aKREZ5iWm+fWCJpx+hNy6ItQAhbwOPXa9zQeMonIvSyZpaCyM62WWOxFiLTPCCUTkNfMlSwQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=rftb9uUK; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="rftb9uUK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1A0A71F00893; Sat, 30 May 2026 18:42:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1780166565; bh=TYr3Q4TLJ1SRttmxlvp8+7dMxnVX3CE2yvLEI2ecATw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=rftb9uUKJzhxCRLfUWqrBr3mZ0Kq7M24E4n7JLj10SO6f4RbXstZ1Mrx/4dDMq3e6 eEJSFBQvJ2+3ImUZYYqYEEMfYwJ4LvmSz9YlVvboDIMc+5fQ1RzFZ1iqxJwVKLra3G 2/Nniay+JGoos6VHpFqsNmPv+EoAsoNkol7Gklf8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, John Hawley , Andrea Righi , Marcos Paulo de Souza , Matthieu Baerts , Fernando Fernandez Mancera , Pedro Falcato , "=?UTF-8?q?Ricardo=20B . =20Marli=C3=A8re?=" , Steven Rostedt , Sasha Levin Subject: [PATCH 5.10 355/589] ktest: Avoid undef warning when WARNINGS_FILE is unset Date: Sat, 30 May 2026 18:03:56 +0200 Message-ID: <20260530160234.188564466@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260530160224.570625122@linuxfoundation.org> References: <20260530160224.570625122@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ricardo B. Marlière [ Upstream commit 057854f8a595160656fe77ed7bf0d2403724b915 ] check_buildlog() probes $warnings_file with -f even when WARNINGS_FILE is not configured. Perl warns about the uninitialized value and adds noise to the test log, which can hide the output we actually care about. Check that WARNINGS_FILE is defined before testing whether the file exists. Cc: John Hawley Cc: Andrea Righi Cc: Marcos Paulo de Souza Cc: Matthieu Baerts Cc: Fernando Fernandez Mancera Cc: Pedro Falcato Link: https://patch.msgid.link/20260307-ktest-fixes-v1-1-565d412f4925@suse.com Fixes: 4283b169abfb ("ktest: Add make_warnings_file and process full warnings") Signed-off-by: Ricardo B. Marlière Signed-off-by: Steven Rostedt Signed-off-by: Sasha Levin --- tools/testing/ktest/ktest.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index 512a3cc586fdd..a5c1871d3c8e7 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl @@ -2419,7 +2419,7 @@ sub check_buildlog { my $save_no_reboot = $no_reboot; $no_reboot = 1; - if (-f $warnings_file) { + if (defined($warnings_file) && -f $warnings_file) { open(IN, $warnings_file) or dodie "Error opening $warnings_file"; -- 2.53.0