From nobody Thu Apr 9 16:13:54 2026 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (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 1B77537F726 for ; Sat, 7 Mar 2026 22:08:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772921303; cv=none; b=RyHN9aGziAauGQU11w0yiX/Ky1alCOrQo+mQCEtIl+ZcqnOZADfmLwtttufnEjd5l8rLIkq3BR/64dYL5sHFNk9eYzxKCixT9OjnVmaX5pzgQvqNbE4LTfwZlyAd6gZ/7vu1GzytMTDZZKFzooi2Rbp3fjZHO7ckH+BDjViadug= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772921303; c=relaxed/simple; bh=EhN7FFnDvnqHW//c47ECrqUn9sxmAtlNrlZARJa/Vh8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=SCGUl3WpKJSqBrMd8yVAhj2KxbsLvfAUETlERheqCPc6/JbdzFYBigyuDADiFo1SiC00Fhd0rebFtZIbugs3wtvtMCPASn4rIKIfx2Sz9+u6EHvlUSxog9iwfetVQvgZkVwQvNqc1MakUu9J32VCIlTaMIb1IHvDsAYNk9ioa/8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=A8XMEGna; arc=none smtp.client-ip=209.85.128.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="A8XMEGna" Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-4806ce0f97bso92376945e9.0 for ; Sat, 07 Mar 2026 14:08:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1772921300; x=1773526100; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=l+cLrLaCup31MPE3GDka6+sYqhwwZYhPp5M9acTvvVQ=; b=A8XMEGna+aOyIWbqtXhCD0KNn7WjBeccqh4jFSV0Q7EUAXYnW0SZJiUhG8j0BVB0Xv 4PNBmZPjqqIEfDotoDQiwP9cuu1Wi0qFeHKGFQM3Cmh1L0jo86ZoqzRB072hHqfJaIiP Wnj+AF/vKyXo4VosMMND471luJKBn06u4oyejI75GGUUbKlPccsUZ2c2Mw5xsQm78+o/ FDuTIzui9eYRCPUL1UWJyI+5yWvq2Fsqh4GAUM951x3aMUdaDjq2Fwn+/uO10goh9L6N So7zLSWYIEhQZtMzIgmVB3RJTR+TY+jgi2pqRi71IpsCJNBmr1AuoeJ5ueYNRXpY+JrW Dbww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772921300; x=1773526100; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=l+cLrLaCup31MPE3GDka6+sYqhwwZYhPp5M9acTvvVQ=; b=K47dJnrQ15Ng/i+SQVLxHEeqgpjQ75zDBlN7NiniICxPJs/3CgDLVp0ueMGe9NX5g5 rc48ugjl/02ee8u6SbJ7r6KO2FS09LWpTBFvIZ/jW0zdtpDPzyTxryZxI45n1dXrb1Kc uEyJ8Qy3dJGiFSgGWMmFaPywSmOIPFGP6BN+Vh/iXWSHJ82yQ3B/iBUA76N2A5A8DvYt Ypg6ZtP1Dw2OV9GUSGgTVeFV0Y3SySlNG0ub5BzDnySrJNXcUed5vR4UkTfgeeX6Nyt/ x1nQIZD6fPj7Qef2fo4RzDobQb1xi70103XNkLJTkiaDFSmlLW6QfVeS5QIWBSFTMGtX XQtg== X-Forwarded-Encrypted: i=1; AJvYcCWk1jcTz4O1MOG5vHMH/O3H/cJkMmfGunF/6ZPU2GvB5NIOWhqWG46vHJO0TiqjSRldjWsMsDxoMsJRO9c=@vger.kernel.org X-Gm-Message-State: AOJu0YxhpexV39W1WpQQ+B8q3aEPSPve5BeFNmKPiiT+zHD1mb7vCQIK z/wDW8lx7bxgq87eTGO3Yei08opJiYn6hduqcXAEQkcR/5am30kVTq2/yHo9Aoh02Y0= X-Gm-Gg: ATEYQzwcZ6w9rUFjOrGLnL3w0GPUOOK4mH2HqJQ+J1lab1wMYCHXXdVQLbSV7qeBslv tL61jBrWvkNa6z/gCldxHLm7Jv9gbot50V0A9etPgZIL+3KDLAWT2SMyhC0T7wKL6n2+kZi6isw xu8jyV5NxMIllzCPmUH16Vt6B6VO7IncUsC4lB9/MypkM0pc8x0alsbzGjuDay5q80CBM13yNYY vF9udMEw97RYiTO+pfI7m6XxkUv5FhY2xSp4PJEST4RMq/XlhPNWPNRVBN9EIgx7MwBpPF3700+ S1aSFStWTsQyEpXRUJn2fKJ7qkAyKAstes9vSjfmS97xebu27I/L1F4qNeTxLv3NofHvoYrXtvy APg2v4OTxwS7yEaRfa8OsBwkQNwyz6ZIgd390j2pa2nUsy0yKS3zI4SBEQwO1EGsSXFnMXablDN F57Il/P7f16MDYKxSLEoIO X-Received: by 2002:a05:600c:1e88:b0:47d:8479:78d5 with SMTP id 5b1f17b1804b1-4852690f599mr129881545e9.7.1772921300512; Sat, 07 Mar 2026 14:08:20 -0800 (PST) Received: from localhost ([189.99.238.164]) by smtp.gmail.com with ESMTPSA id 71dfb90a1353d-56b09a08ebbsm6088065e0c.1.2026.03.07.14.08.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Mar 2026 14:08:19 -0800 (PST) From: =?utf-8?q?Ricardo_B=2E_Marli=C3=A8re?= Date: Sat, 07 Mar 2026 19:08:00 -0300 Subject: [PATCH 5/9] ktest: Run commands through list-form shell open 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260307-ktest-fixes-v1-5-565d412f4925@suse.com> References: <20260307-ktest-fixes-v1-0-565d412f4925@suse.com> In-Reply-To: <20260307-ktest-fixes-v1-0-565d412f4925@suse.com> To: Steven Rostedt , John Hawley Cc: Andrea Righi , Marcos Paulo de Souza , Matthieu Baerts , Fernando Fernandez Mancera , Pedro Falcato , linux-kernel@vger.kernel.org, Steven Rostedt , =?utf-8?q?Ricardo_B=2E_Marli=C3=A8re?= X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openssh-sha256; t=1772921280; l=1117; i=rbm@suse.com; h=from:subject:message-id; bh=EhN7FFnDvnqHW//c47ECrqUn9sxmAtlNrlZARJa/Vh8=; b=U1NIU0lHAAAAAQAAADMAAAALc3NoLWVkMjU1MTkAAAAgguRCc5X8/UX9M40lkMnr//aFGOhce x5ezt8MFNUFlqYAAAAGcGF0YXR0AAAAAAAAAAZzaGE1MTIAAABTAAAAC3NzaC1lZDI1NTE5AAAA QGaTcI3mhAeziZ5TriIL786oZBDfydIOs8LPCuUnyQUwzRVKuCgRO1B+Mul4oF3CznOMSx8P1hj LX2qKJwyHWwk= X-Developer-Key: i=rbm@suse.com; a=openssh; fpr=SHA256:pzhe0fJpYLz+3cZ33FFPhIfaUElk9CXPFFXmalIH+1g run_command() currently uses string-form open(): open(CMD, "$command 2>&1 |") That delegates parsing to the shell but also mixes the stderr redirection into the command string. Switch to list-form open() with an explicit sh -c wrapper so shell syntax errors are captured in the same output stream as command output. Otherwise, important errors can not be retrieved from the ktest LOG_FILE. Signed-off-by: Ricardo B. Marli=C3=A8re --- tools/testing/ktest/ktest.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index 42bc505e14cb..9d6f50045dbd 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl @@ -1921,7 +1921,10 @@ sub run_command { doprint("$command ... "); $start_time =3D time; =20 - $pid =3D open(CMD, "$command 2>&1 |") or + $pid =3D open(CMD, "-|", + "sh", "-c", + 'command=3D$1; shift; exec 2>&1; eval "$command"', + "sh", $command) or (fail "unable to exec $command" and return 0); =20 if (defined($opt{"LOG_FILE"})) { --=20 2.53.0