Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp24531lqb; Thu, 23 May 2024 09:45:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWHpzuRpSyRmEWliKu0K/E2RzwAdTTT/TrGaPY3rKX1ALmOoYCpRN3+spEYITPsf9f+fpX4O7+4KW/wymSpPx89ElRftKLi+3ygf3i4iQ== X-Google-Smtp-Source: AGHT+IFKCoGNMRppyQxcrkG0ZjsSTBzr0TVHo+LaxoBiY2aWn1uaQglqm3qgeHBl1xoPIDwFrSa+ X-Received: by 2002:a50:ab46:0:b0:570:5b70:d76d with SMTP id 4fb4d7f45d1cf-57832c1bb57mr3568954a12.28.1716482705846; Thu, 23 May 2024 09:45:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716482705; cv=pass; d=google.com; s=arc-20160816; b=Zi/8OSlHzZdo/DFdBTVZ2/aq1J1Piq9J0kD7Jq6xtLbYQJBG1wqW4HZ3nvJW6I2CO0 kkeSX5MzgJvR+IuwFKvv8hh/p/hIM/73fpqR+jzaNeVgNdpUStsJWnPEiOVLt3Syt3lo nxNU52kW9Z+sYmNLzZhjcumRs3MhROu3AFpSLpl3hv1d/JaAAkSraU7HZszrDJtOjCT6 RwnUGerORvedHYm969Ykq5x4M45jl4If8WO0cYRwA4Sbg7jnjFRR8U2uB42f5FzTT8BK tNbxyN26zZNVVUORDONZfqDGyN0xHMeglGvVWCKcLsL3BtC/ey62xb0vhc/IR8O6B1Ja 58ng== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:subject:cc:to:from :date; bh=n8ShYV0tXDvYEnB1Po0bXpYiZe442FEat9HyI78gEMs=; fh=/SlXxeAXqvE22YyP1l778pZJwqAWNVkI0uRzHvuw5js=; b=fjcvaCD2W1RoWSOL5jDK5DxxTmyvMZSmtRvuIeFgEpmfxJ52bEwI1ls11QcN4ZoQPP 1yqBdblR4//hygf4FWKBIeXUTSOZgIoh8Yfrkl1E++iyXgP5ROQqHEchSwMAGdJUTzXy LkhzJHnOXUnvasr/Yqo7dWg6DLNBh3zY4+emAuFISZP4SRBGnlgDtwNlcvraOaTZ/tXI mTMuaZIDHPQjc2Hqkoby2CijXVxMic+bLmICS05hyve4MFMKzigb2C6GX99KPE38pw95 1fOTtFMhLj693872iXB/m9yrytY8W8Npjzhy+Yy57XZUbtMWf+woCzp2sn/6ggHBW4Fi W7Mw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-187795-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-187795-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-574ef8fb9casi10139904a12.508.2024.05.23.09.45.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 09:45:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-187795-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-187795-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-187795-linux.lists.archive=gmail.com@vger.kernel.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 91CF21F21878 for ; Thu, 23 May 2024 16:45:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9146E1CFA9; Thu, 23 May 2024 16:44:58 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 0C0882C6B6; Thu, 23 May 2024 16:44:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716482698; cv=none; b=aGGY4gtKE2BsPs0yOjE2Zsie3DDjubwofm3VmEQYzdfCgUD1CFiNNFPkGKw1FgX9ro1C4o/Mg+f9CTiXXxji8Q/ByMucbZwwEXNs+XfR1cP0/vY+g25Bk1L1ukKPqKT9qrovfvGyryDDgvkBKfE4A7ED3KLTN+jN58HncCKsumo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716482698; c=relaxed/simple; bh=0tqQovrxEuibLPAzpAH/w232rjaoPyNb6yIOFTFXaY0=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type; b=O2MCZwGXKF1jS7cASbNTYKcZMIOGLuxLV3Zy95RDFlD/PMDRc6QelCcLSU16ToloIgirQDm0mvQ1JhtVVkTUOddoyTymEmxmNQalAi99QoNVgNxhY0iCAVrHP7OHjMT9rcttFzruXgLkV7z0mtXf3Y8L790ELy+Rtxe+RUH5AV4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6CDC2C32782; Thu, 23 May 2024 16:44:56 +0000 (UTC) Date: Thu, 23 May 2024 12:45:41 -0400 From: Steven Rostedt To: LKML , Linux Trace Kernel Cc: Masami Hiramatsu , Mathieu Desnoyers , Ali Zahraee , Shuah Khan , Shuah Khan , linux-kselftest@vger.kernel.org, Linus Torvalds Subject: [PATCH] tracing/selftests: Run the ownership test twice Message-ID: <20240523124541.7dd4cca9@gandalf.local.home> X-Mailer: Claws Mail 3.20.0git84 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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-Transfer-Encoding: 7bit From: "Steven Rostedt (Google)" A regression happened where running the ownership test passes on the first iteration but fails running it a second time. This was caught and fixed, but a later change brought it back. The regression was missed because the automated tests only run the tests once per boot. Change the ownership test to iterate through the tests twice, as this will catch the regression with a single run. Signed-off-by: Steven Rostedt (Google) --- .../ftrace/test.d/00basic/test_ownership.tc | 34 +++++++++++-------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/tools/testing/selftests/ftrace/test.d/00basic/test_ownership.tc b/tools/testing/selftests/ftrace/test.d/00basic/test_ownership.tc index c45094d1e1d2..71e43a92352a 100644 --- a/tools/testing/selftests/ftrace/test.d/00basic/test_ownership.tc +++ b/tools/testing/selftests/ftrace/test.d/00basic/test_ownership.tc @@ -83,32 +83,38 @@ run_tests() { done } -mount -o remount,"$new_options" . +# Run the tests twice as leftovers can cause issues +for loop in 1 2 ; do -run_tests + echo "Running iteration $loop" -mount -o remount,"$mount_options" . + mount -o remount,"$new_options" . -for d in "." "events" "events/sched" "events/sched/sched_switch" "events/sched/sched_switch/enable" $canary; do - test "$d" $original_group -done + run_tests + + mount -o remount,"$mount_options" . + + for d in "." "events" "events/sched" "events/sched/sched_switch" "events/sched/sched_switch/enable" $canary; do + test "$d" $original_group + done # check instances as well -chgrp $other_group instances + chgrp $other_group instances -instance="$(mktemp -u test-XXXXXX)" + instance="$(mktemp -u test-XXXXXX)" -mkdir instances/$instance + mkdir instances/$instance -cd instances/$instance + cd instances/$instance -run_tests + run_tests -cd ../.. + cd ../.. -rmdir instances/$instance + rmdir instances/$instance -chgrp $original_group instances + chgrp $original_group instances +done exit 0 -- 2.43.0