Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1975193ybl; Thu, 30 Jan 2020 09:13:43 -0800 (PST) X-Google-Smtp-Source: APXvYqzCzDWBvy/7p8k73kmuYri7gLM5pDQPs3sJpBz1DeLiUDBuirNrIRRCv8DV407V1vLjX+13 X-Received: by 2002:aca:dc04:: with SMTP id t4mr3444033oig.51.1580404423752; Thu, 30 Jan 2020 09:13:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580404423; cv=none; d=google.com; s=arc-20160816; b=Q6g6ZiQbhRmmb0E7rNceTywKkpv9g6IEfOK2mnhgQMq1bCtszdOW3y5D0bu5cmU+pH 9uT2k4l3vdEV9OoW3GBsr+dHoHcisQXKoC0bYD4gXcYY0FXSlP9S+AzJ2eUv/tB3G17N 0QQVz50yYYgpP3poP/hlBCpvK6Ue1GQFd6Kv7XaeALEG0syENZ+IKge/YU60iH4ktoNH xQB3LPQjO+IZoYGqPvfQbj/F8p92rJHoULOCBxW0dRPwWlaUYSf8u/VY3DrzDCHbLw/0 KyVwSWgHrG+FTlxRksowHZrg4eAa66snNC8yTYnDrFysnZk2fE8oKptZaqrgzDdHm6i3 aTOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:subject:cc:to:from:date; bh=y7q6rq4RCxQrgpNtaWRxBjSIcMCTi4Eu+LtJ6xdYSkU=; b=GzIqQEkeHjIQbwMdK8NDdtXEwDczAVZgk+RQHsrzyEPs79MNJT3hlFO+LDUq0IAsGZ c+TDjABnVGXS3F2z2knO33UDJTqwyWTsLqJrNVubjK6Ze6+L2RU5W0+e83qzTjwDA8wO xGjSI7jIlllSdhOEnBhJcOwNC7+KE7w7FU/X5ovOLqsn5zX/aCybida/E8tYQZMxTzJx vC4XDitw/5+teS8EuudYR3Hup5lSfZnMSCXdEb0ZdLUFB4fuOjCUnXsT8mDIjLtV6Ub7 CfqRRSs2Y9t7eR+jjLs2xF0IeP+8s9oNdDoQlrJ1GZnder+mJCf4ntNUc/2W8b21lcqF Szzg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g184si496172oib.162.2020.01.30.09.13.30; Thu, 30 Jan 2020 09:13:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727402AbgA3RMI (ORCPT + 99 others); Thu, 30 Jan 2020 12:12:08 -0500 Received: from mail.kernel.org ([198.145.29.99]:46332 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726514AbgA3RMI (ORCPT ); Thu, 30 Jan 2020 12:12:08 -0500 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3EF21206F0; Thu, 30 Jan 2020 17:12:07 +0000 (UTC) Date: Thu, 30 Jan 2020 12:12:05 -0500 From: Steven Rostedt To: Shuah Khan Cc: LKML , Masami Hiramatsu , Namhyung Kim Subject: [PATCH] selftests/ftrace: Have pid filter test use instance flag Message-ID: <20200130121205.40cbb903@gandalf.local.home> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Steven Rostedt (VMware)" While running the ftracetests, the pid filter test failed because the instance "foo" existed, and it was using it to rerun the test under a instance named foo. The collision caused the test to fail as the mkdir failed as the name already existed. As of commit b5b77be812de7 ("selftests: ftrace: Allow some tests to be run in a tracing instance") all a selftest needs to do to be tested in an instance is to set the "instance" flag. There's no reason a selftest needs to create an instance to run its test in an instance directly. Remove the open coded testing in an instance for the pid filter test and have it set the "instance" flag instead. Signed-off-by: Steven Rostedt (VMware) --- .../selftests/ftrace/test.d/ftrace/func-filter-pid.tc | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tools/testing/selftests/ftrace/test.d/ftrace/func-filter-pid.tc b/tools/testing/selftests/ftrace/test.d/ftrace/func-filter-pid.tc index 64cfcc75e3c1..f2ee1e889e13 100644 --- a/tools/testing/selftests/ftrace/test.d/ftrace/func-filter-pid.tc +++ b/tools/testing/selftests/ftrace/test.d/ftrace/func-filter-pid.tc @@ -1,6 +1,7 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0 # description: ftrace - function pid filters +# flags: instance # Make sure that function pid matching filter works. # Also test it on an instance directory @@ -96,13 +97,6 @@ do_test() { } do_test - -mkdir instances/foo -cd instances/foo -do_test -cd ../../ -rmdir instances/foo - do_reset exit 0 -- 2.20.1