From nobody Sat May 9 07:14:42 2026 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2079.outbound.protection.outlook.com [40.107.237.79]) (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 5C07F3D6D for ; Tue, 28 Jan 2025 05:14:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.237.79 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738041300; cv=fail; b=PTSrp9G8KSQz+YWarb+mmb3pstTiOB3tfomRYYaZPczABAe5A4zVOvr5sAwlUzrfwSP671LrB+KbZfBI/YaHMvDZXkNtSY4sRVGhw1Lff1ysBCi9FVdELJbFQssa0hJYLt5UIlnizfu0QhiF4cmzsoJVhB4ZXJTX6EjEZ6FQ5mc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738041300; c=relaxed/simple; bh=ZBwwntt8FdVUlRkuFOjM5yb5M++WCo6pmGx7oRKd8RE=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=OrvnAdtAkYtEV5XuEDOdXd+OORLrMrYIDELY4kJbb3yvDgI6c6H1vGqowqzEnafr7SxLiE2LXs1uOvAbJBfYA5P/+vZ1MyQI5m0qjCU94+4AP6Jz9mEQ/Qoc2bOqf2Q0sdSIt+0CCVQNCvS8kQml7PUlcy7lagtU1O1gUB+Rj90= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=v3ulBJEl; arc=fail smtp.client-ip=40.107.237.79 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="v3ulBJEl" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=AZTja1j8l85u3+UJUsugX6XZiXHQC7Xqs+PnYIk/kqguswiidlZf09zlQ9AtEzeB87SdRl39duJZWofX9oWEtQOX++8qaIA0xVNFrORYk0DlIRteTSJYibawuJInbsN+w7Yi94uLberk1znzZe5uL6SKBUWAX7fC5ktzZgij1o6Sm6A9QVMLUenCLwPRoUQYxOhuAnQ2Y35OMYSrX6T4dX4CPNWWIte845durHlPbdbjzNPf39ehDEMOhNlyeClOZyLXbD5P9clyKOdIcoDLinO0xQ/apkWSoas2wJWePd3a+9e/4b62Jph0nl78cMBePivu0JXC/jU/rIjScQxokw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=LOU1FumD3izstFMG2b3NUSJY6mpuyEI/4GL3FTymqWQ=; b=Y4KH0MgQvNkFnazznhq7MOCuosWySAzSIZPnrk7xDvZDjTlnUypXBXcoNHDsPvvtZik2Amur6Amoim/BGX4M1YUG5yFzaf2RFQ4jWOep6rc8sIi7cCSGj6FbKg2JY5+3Bl2Dl89Jf2ruANTzkMD0s17hSkUOBHikb1AYy/oQzcGXh+hRjilYWpM+fS+fdOq7hQSlGD2eU7G+3sx/UzNHr0KhmqOATda4Xvph1WRwoG8yt+mO3fYYhTlpbZ3p0rIWDRzqTustwE4bHSDwNU1hFuniuwDIkO+Jtbjfjgi0f0vG1xoByIPMmG38C8HtMbSk/FadVZDsGNQ+wp6Yvtnlaw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=goodmis.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LOU1FumD3izstFMG2b3NUSJY6mpuyEI/4GL3FTymqWQ=; b=v3ulBJEljfVfyNtlPlpKLUqmDRdXKss03prJJQKE5ysyiru8ii8XfsTZHPE+9VGRzotDrsoXg8fUvigE33UMNol8Zk65wzUlD9WpRl0VJNdG3m3poHzq0yssrQbuHlBnZ8TjDjpS7U79lWwzn6wzIb2cQA1TcLwnz83Ha/IZf/8= Received: from CH2PR07CA0016.namprd07.prod.outlook.com (2603:10b6:610:20::29) by SA3PR12MB9159.namprd12.prod.outlook.com (2603:10b6:806:3a0::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8377.22; Tue, 28 Jan 2025 05:14:54 +0000 Received: from CH1PEPF0000A348.namprd04.prod.outlook.com (2603:10b6:610:20:cafe::68) by CH2PR07CA0016.outlook.office365.com (2603:10b6:610:20::29) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8356.21 via Frontend Transport; Tue, 28 Jan 2025 05:14:54 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CH1PEPF0000A348.mail.protection.outlook.com (10.167.244.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8398.14 via Frontend Transport; Tue, 28 Jan 2025 05:14:53 +0000 Received: from dellg853host.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 27 Jan 2025 23:14:52 -0600 From: Ayush Jain To: , , CC: , , Ayush Jain Subject: [PATCH RESEND v1] ktest: Fix Test Failures Due to Missing LOG_FILE Directories Date: Tue, 28 Jan 2025 05:14:27 +0000 Message-ID: <20250128051427.405808-1-Ayush.jain3@amd.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH1PEPF0000A348:EE_|SA3PR12MB9159:EE_ X-MS-Office365-Filtering-Correlation-Id: 5f66db82-8204-40e2-6526-08dd3f5ab2b6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|36860700013|376014|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?KXCBUGwLrwQkwH+wjzMpPoYdLkYLH25Ly8UKenPPB2nt11VNk74/kGfHAdvv?= =?us-ascii?Q?dNNigzoAh+YodnVHfvRTmiXsiO2cluUgsBCOy4w9ibc6xzYcWnPFhN6Lnp67?= =?us-ascii?Q?dQzjPJJSwFvUganZNBUAgd0roaR0CHdnVWb99AbBKOLOZOeplpUYBBixDi4f?= =?us-ascii?Q?I8JMkexza43nLvKf2aklkfkIfmIN0ITivxpZ2xAf2pTlzU/DNmHoZt4tRBDA?= =?us-ascii?Q?/dOUKFKfPQtjtsgxbfBZeSw+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gOH9peCRh?= =?us-ascii?Q?SMTUKbqBXJXaCI2MmSEjwa9zXDReZTTcl+jbfR6FUpCmPhgIxXQOU1eQBQmr?= =?us-ascii?Q?NsWCzS2TbxD/B82S0nU0g5Lb3Q/S+CYsf3kS6zAo6EZgXG/25KTvRi45rLKk?= =?us-ascii?Q?jmTvdgC6MIvBUX3NXTR79obRS5d/0fod4/IR8VaURus7JsHUSO3hq0ud90kH?= =?us-ascii?Q?R2ryh06pezvCa5FlvLkF3f5A5UGwP7gFFK2Y6pyCfcIXjcN0Xhg9/xvcu6jh?= =?us-ascii?Q?0ybth0jda6M6z+3ZtwRO4Rpj8/wr9P5orMmZhxVt0AE4AaR7plT6JzsG6ceB?= =?us-ascii?Q?cLde3VFJLeKT1Rmz/vqIhmzY9IN2O1EVFvH11YKJEDeaF4cTsl1iqy1dC8+C?= =?us-ascii?Q?vEb9QnXy1SyjIhI=3D?= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(82310400026)(36860700013)(376014)(1800799024);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jan 2025 05:14:53.3601 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5f66db82-8204-40e2-6526-08dd3f5ab2b6 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CH1PEPF0000A348.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR12MB9159 Content-Type: text/plain; charset="utf-8" Handle missing parent directories for LOG_FILE path to prevent test failures. If the parent directories don't exist, create them to ensure the tests proceed successfully. Signed-off-by: Ayush Jain --- tools/testing/ktest/ktest.pl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index 8c8da966c641..be707cbc56a7 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl @@ -4303,6 +4303,13 @@ if (defined($opt{"LOG_FILE"})) { if ($opt{"CLEAR_LOG"}) { unlink $opt{"LOG_FILE"}; } + if (! -e $opt{"LOG_FILE"}) { + my ($dir) =3D $opt{"LOG_FILE"} =3D~ m|^(.*/)|; + if ($dir && !-d $dir) { + mkpath($dir) or die "Failed to create directories '$dir': $!"; + print "\nThe log directory $dir did not exist, so it was created.\n"; + } + } open(LOG, ">> $opt{LOG_FILE}") or die "Can't write to $opt{LOG_FILE}"; LOG->autoflush(1); } --=20 2.34.1