Message ID | 20230204133454.260066-1-guillaume.tucker@collabora.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1360104wrn; Sat, 4 Feb 2023 05:57:52 -0800 (PST) X-Google-Smtp-Source: AK7set9+mzse/gLpNxiUVjWoDAB1/SKFAWdWoQa4R8Wj+PwihIMtMm9jmzrDfl00GofIebTrfrYq X-Received: by 2002:a05:6402:1bcc:b0:499:b672:ee30 with SMTP id ch12-20020a0564021bcc00b00499b672ee30mr12767406edb.11.1675519071897; Sat, 04 Feb 2023 05:57:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675519071; cv=none; d=google.com; s=arc-20160816; b=zFCh9npAXEijSN0S6aJiRXBCfue3zCXvs26s/Ydm3vqN2k1lzF5smAvQHp0cFCBp70 b6B7VsrY0OavEg42heZP3N1S21UfhmFFAPnr8Y91/IXYyfQ/aCpEjEQ61uofkeY4Kb3g p9W4yP79xGqsrbWeeI+g7qyk77NkV7SLG3syCj5e9G3gpYAAkfsxqhorvJW0OrgP/WjF z2lWocQotKvCY/xalQfeD8Mou9shEfzRSzbGiC8m6W9ztM7J+Q7rGJIr4FV/SY0tfORl DPPvwcr3k+VHc9jZOOS0RF3xHNgZanEWUtwdfaw//3ekqlEdmLC6HV913Km498ipNdMV 2gTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=sk2EEH4eV5Tj2zsr0WPJe3W+Q+PtALTcIkY2WpfnVkE=; b=K64zsQQl/RncE5/0swLO+4g8d+V8/AsQUYIYB8yN4SnLou/s4vuvHtjgtxzqLnE5Oq e3cbi3PKs5q6vNAhVpedvaUmkB2WPywEazcAhqMak6fFWO4D2uC8LerqE7CArYD3+EhQ LgzhlH6TiprrdCQSjTuZN5RPZl57ojtFpkS+h4FlJUK1WH1rKRkpBZTSVV74Xx0VWfKq G9pNpdorKy8hY4SD0ahPVHxAX7xJS4ORtsdMycrp8OwpL4LEYNzyGP0eD8BkD7US/npQ a93ixngVMBI1kWxg3xP5wf1h5jyBBRrptEqnB94LKILpfZFcBAX/N35fQWTe2N/lusb5 9GlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=c5Bw7M7g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u9-20020aa7d889000000b004a2121f5253si5224647edq.387.2023.02.04.05.57.28; Sat, 04 Feb 2023 05:57:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=c5Bw7M7g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233580AbjBDNg1 (ORCPT <rfc822;il.mystafa@gmail.com> + 99 others); Sat, 4 Feb 2023 08:36:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229516AbjBDNgZ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 4 Feb 2023 08:36:25 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1333769D; Sat, 4 Feb 2023 05:36:12 -0800 (PST) Received: from tincan.fosdem.net (unknown [151.216.142.144]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: gtucker) by madras.collabora.co.uk (Postfix) with ESMTPSA id E86C166029A5; Sat, 4 Feb 2023 13:36:10 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1675517771; bh=FVDft7SSZZEp5VDB0W0zJGD6iA/FVHvD+bbKj9XTAnU=; h=From:To:Cc:Subject:Date:From; b=c5Bw7M7gID98YlGOv2vScUbP9iVYqnhHu7W8H+u2ehQmKszgvywyzu9cuB+EuNPRH rfjpc3l0/KZjgSMWGv/a8b1qbZAs3F5CD0YgwXEgTOYAXIUnjiPDGwwrVoHblpYbLg 11Qsx4LUeME6T47KgvI5+A1MQpdyk0fhunUJC7AFctP2BzXqAMRMc7ODLczUBHgLVJ PZS1wOBByf5tTTT9pTkchlmGATvWIBf1GPuBWyrxCEv2C33IHPbRTgxfmfeZbztRd3 stboAjjRtF1T2WBTPES4/aO83nHdvIH+OfqcZNEoIjsJ1d6vGISVZQsrKY9wY2moIA 73nHd6PJSXHCw== From: Guillaume Tucker <guillaume.tucker@collabora.com> To: Guillaume Tucker <guillaume.tucker@collabora.com>, Shuah Khan <shuah@kernel.org>, Huang Rui <ray.huang@amd.com>, Meng Li <li.meng@amd.com>, Doug Smythies <dsmythies@telus.net> Cc: kernel@collabora.com, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, kernelci@lists.linux.dev Subject: [PATCH] selftests: amd-pstate: fix TEST_FILES Date: Sat, 4 Feb 2023 14:34:54 +0100 Message-Id: <20230204133454.260066-1-guillaume.tucker@collabora.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, URIBL_BLACK autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756909086606600299?= X-GMAIL-MSGID: =?utf-8?q?1756909086606600299?= |
Series |
selftests: amd-pstate: fix TEST_FILES
|
|
Commit Message
Guillaume Tucker
Feb. 4, 2023, 1:34 p.m. UTC
Bring back the Python scripts that were initially added with
TEST_GEN_FILES but now with TEST_FILES to avoid having them deleted
when doing a clean. Also fix the way the architecture is being
determined as they should also be installed when ARCH=x86_64 is
provided explicitly. Then also append extra files to TEST_FILES and
TEST_PROGS with += so they don't get discarded.
Fixes: ba2d788aa873 ("selftests: amd-pstate: Trigger tbench benchmark and test cpus")
Fixes: ac527cee87c9 ("selftests: amd-pstate: Don't delete source files via Makefile")
Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
---
tools/testing/selftests/amd-pstate/Makefile | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
Comments
Hi Shuah, On 04/02/2023 14:34, Guillaume Tucker wrote: > Bring back the Python scripts that were initially added with > TEST_GEN_FILES but now with TEST_FILES to avoid having them deleted > when doing a clean. Also fix the way the architecture is being > determined as they should also be installed when ARCH=x86_64 is > provided explicitly. Then also append extra files to TEST_FILES and > TEST_PROGS with += so they don't get discarded. > > Fixes: ba2d788aa873 ("selftests: amd-pstate: Trigger tbench benchmark and test cpus") > Fixes: ac527cee87c9 ("selftests: amd-pstate: Don't delete source files via Makefile") > Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com> > --- > tools/testing/selftests/amd-pstate/Makefile | 13 +++++++++---- > 1 file changed, 9 insertions(+), 4 deletions(-) > > diff --git a/tools/testing/selftests/amd-pstate/Makefile b/tools/testing/selftests/amd-pstate/Makefile > index 5fd1424db37d..c382f579fe94 100644 > --- a/tools/testing/selftests/amd-pstate/Makefile > +++ b/tools/testing/selftests/amd-pstate/Makefile > @@ -4,10 +4,15 @@ > # No binaries, but make sure arg-less "make" doesn't trigger "run_tests" > all: > > -uname_M := $(shell uname -m 2>/dev/null || echo not) > -ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s/x86_64/x86/) > +ARCH ?= $(shell uname -m 2>/dev/null || echo not) > +ARCH := $(shell echo $(ARCH) | sed -e s/i.86/x86/ -e s/x86_64/x86/) > > -TEST_PROGS := run.sh > -TEST_FILES := basic.sh tbench.sh gitsource.sh > +ifeq (x86,$(ARCH)) > +TEST_FILES += ../../../power/x86/amd_pstate_tracer/amd_pstate_trace.py > +TEST_FILES += ../../../power/x86/intel_pstate_tracer/intel_pstate_tracer.py > +endif > + > +TEST_PROGS += run.sh > +TEST_FILES += basic.sh tbench.sh gitsource.sh > > include ../lib.mk Is there anything blocking this patch from being applied? It brings back the tools needed to run the amd-pstate tests into the kselftest installation directory. I could try to run the test on an AMD platform and check it's working as before, but there was no change in the tools themselves and I've checked the scripts get installed correctly now like before. We might also actually run this test in KernelCI since there are a few AMD platforms available. Thanks, Guillaume
On Sat, Feb 04, 2023 at 09:34:54PM +0800, Guillaume Tucker wrote: > Bring back the Python scripts that were initially added with > TEST_GEN_FILES but now with TEST_FILES to avoid having them deleted > when doing a clean. Also fix the way the architecture is being > determined as they should also be installed when ARCH=x86_64 is > provided explicitly. Then also append extra files to TEST_FILES and > TEST_PROGS with += so they don't get discarded. > > Fixes: ba2d788aa873 ("selftests: amd-pstate: Trigger tbench benchmark and test cpus") > Fixes: ac527cee87c9 ("selftests: amd-pstate: Don't delete source files via Makefile") > Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com> Acked-by: Huang Rui <ray.huang@amd.com> > --- > tools/testing/selftests/amd-pstate/Makefile | 13 +++++++++---- > 1 file changed, 9 insertions(+), 4 deletions(-) > > diff --git a/tools/testing/selftests/amd-pstate/Makefile b/tools/testing/selftests/amd-pstate/Makefile > index 5fd1424db37d..c382f579fe94 100644 > --- a/tools/testing/selftests/amd-pstate/Makefile > +++ b/tools/testing/selftests/amd-pstate/Makefile > @@ -4,10 +4,15 @@ > # No binaries, but make sure arg-less "make" doesn't trigger "run_tests" > all: > > -uname_M := $(shell uname -m 2>/dev/null || echo not) > -ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s/x86_64/x86/) > +ARCH ?= $(shell uname -m 2>/dev/null || echo not) > +ARCH := $(shell echo $(ARCH) | sed -e s/i.86/x86/ -e s/x86_64/x86/) > > -TEST_PROGS := run.sh > -TEST_FILES := basic.sh tbench.sh gitsource.sh > +ifeq (x86,$(ARCH)) > +TEST_FILES += ../../../power/x86/amd_pstate_tracer/amd_pstate_trace.py > +TEST_FILES += ../../../power/x86/intel_pstate_tracer/intel_pstate_tracer.py > +endif > + > +TEST_PROGS += run.sh > +TEST_FILES += basic.sh tbench.sh gitsource.sh > > include ../lib.mk > -- > 2.30.2 >
On 3/2/23 23:05, Huang Rui wrote: > On Sat, Feb 04, 2023 at 09:34:54PM +0800, Guillaume Tucker wrote: >> Bring back the Python scripts that were initially added with >> TEST_GEN_FILES but now with TEST_FILES to avoid having them deleted >> when doing a clean. Also fix the way the architecture is being >> determined as they should also be installed when ARCH=x86_64 is >> provided explicitly. Then also append extra files to TEST_FILES and >> TEST_PROGS with += so they don't get discarded. >> >> Fixes: ba2d788aa873 ("selftests: amd-pstate: Trigger tbench benchmark and test cpus") >> Fixes: ac527cee87c9 ("selftests: amd-pstate: Don't delete source files via Makefile") >> Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com> > > Acked-by: Huang Rui <ray.huang@amd.com> > Thank you both. I will pick this up for 6.3-rc2 thanks, -- Shuah
On 03/03/2023 21:29, Shuah Khan wrote: > On 3/2/23 23:05, Huang Rui wrote: >> On Sat, Feb 04, 2023 at 09:34:54PM +0800, Guillaume Tucker wrote: >>> Bring back the Python scripts that were initially added with >>> TEST_GEN_FILES but now with TEST_FILES to avoid having them deleted >>> when doing a clean. Also fix the way the architecture is being >>> determined as they should also be installed when ARCH=x86_64 is >>> provided explicitly. Then also append extra files to TEST_FILES and >>> TEST_PROGS with += so they don't get discarded. >>> >>> Fixes: ba2d788aa873 ("selftests: amd-pstate: Trigger tbench benchmark and test cpus") >>> Fixes: ac527cee87c9 ("selftests: amd-pstate: Don't delete source files via Makefile") >>> Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com> >> >> Acked-by: Huang Rui <ray.huang@amd.com> >> > > Thank you both. I will pick this up for 6.3-rc2 Great, many thanks. Guillaume
diff --git a/tools/testing/selftests/amd-pstate/Makefile b/tools/testing/selftests/amd-pstate/Makefile index 5fd1424db37d..c382f579fe94 100644 --- a/tools/testing/selftests/amd-pstate/Makefile +++ b/tools/testing/selftests/amd-pstate/Makefile @@ -4,10 +4,15 @@ # No binaries, but make sure arg-less "make" doesn't trigger "run_tests" all: -uname_M := $(shell uname -m 2>/dev/null || echo not) -ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s/x86_64/x86/) +ARCH ?= $(shell uname -m 2>/dev/null || echo not) +ARCH := $(shell echo $(ARCH) | sed -e s/i.86/x86/ -e s/x86_64/x86/) -TEST_PROGS := run.sh -TEST_FILES := basic.sh tbench.sh gitsource.sh +ifeq (x86,$(ARCH)) +TEST_FILES += ../../../power/x86/amd_pstate_tracer/amd_pstate_trace.py +TEST_FILES += ../../../power/x86/intel_pstate_tracer/intel_pstate_tracer.py +endif + +TEST_PROGS += run.sh +TEST_FILES += basic.sh tbench.sh gitsource.sh include ../lib.mk