[v4,20/25] perf tests: Skip 'Setup struct perf_event_attr' test for hybrid
diff mbox series

Message ID 20210416140517.18206-21-yao.jin@linux.intel.com
State New
Headers show
Series
  • perf tool: AlderLake hybrid support series 1
Related show

Commit Message

Jin, Yao April 16, 2021, 2:05 p.m. UTC
For hybrid, the attr.type consists of pmu type id + original type.
There will be much changes for this test. Now we temporarily
skip this test case and TODO in future.

Signed-off-by: Jin Yao <yao.jin@linux.intel.com>
---
 tools/perf/tests/attr.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Jiri Olsa April 21, 2021, 6:29 p.m. UTC | #1
On Fri, Apr 16, 2021 at 10:05:12PM +0800, Jin Yao wrote:
> For hybrid, the attr.type consists of pmu type id + original type.
> There will be much changes for this test. Now we temporarily
> skip this test case and TODO in future.
> 
> Signed-off-by: Jin Yao <yao.jin@linux.intel.com>
> ---
>  tools/perf/tests/attr.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/tools/perf/tests/attr.c b/tools/perf/tests/attr.c
> index dd39ce9b0277..b37c35fb5a46 100644
> --- a/tools/perf/tests/attr.c
> +++ b/tools/perf/tests/attr.c
> @@ -34,6 +34,7 @@
>  #include "event.h"
>  #include "util.h"
>  #include "tests.h"
> +#include "pmu.h"
>  
>  #define ENV "PERF_TEST_ATTR"
>  
> @@ -184,6 +185,9 @@ int test__attr(struct test *test __maybe_unused, int subtest __maybe_unused)
>  	char path_dir[PATH_MAX];
>  	char *exec_path;
>  
> +	if (perf_pmu__has_hybrid())
> +		return 0;

should return TEST_SKIP

jirka

> +
>  	/* First try development tree tests. */
>  	if (!lstat("./tests", &st))
>  		return run_dir("./tests", "./perf");
> -- 
> 2.17.1
>
Jin, Yao April 22, 2021, 3:11 a.m. UTC | #2
Hi Jiri,

On 4/22/2021 2:29 AM, Jiri Olsa wrote:
> On Fri, Apr 16, 2021 at 10:05:12PM +0800, Jin Yao wrote:
>> For hybrid, the attr.type consists of pmu type id + original type.
>> There will be much changes for this test. Now we temporarily
>> skip this test case and TODO in future.
>>
>> Signed-off-by: Jin Yao <yao.jin@linux.intel.com>
>> ---
>>   tools/perf/tests/attr.c | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/tools/perf/tests/attr.c b/tools/perf/tests/attr.c
>> index dd39ce9b0277..b37c35fb5a46 100644
>> --- a/tools/perf/tests/attr.c
>> +++ b/tools/perf/tests/attr.c
>> @@ -34,6 +34,7 @@
>>   #include "event.h"
>>   #include "util.h"
>>   #include "tests.h"
>> +#include "pmu.h"
>>   
>>   #define ENV "PERF_TEST_ATTR"
>>   
>> @@ -184,6 +185,9 @@ int test__attr(struct test *test __maybe_unused, int subtest __maybe_unused)
>>   	char path_dir[PATH_MAX];
>>   	char *exec_path;
>>   
>> +	if (perf_pmu__has_hybrid())
>> +		return 0;
> 
> should return TEST_SKIP
> 

Got it, thanks Jiri!

> jirka
>

Thanks
Jin Yao

>> +
>>   	/* First try development tree tests. */
>>   	if (!lstat("./tests", &st))
>>   		return run_dir("./tests", "./perf");
>> -- 
>> 2.17.1
>>
>

Patch
diff mbox series

diff --git a/tools/perf/tests/attr.c b/tools/perf/tests/attr.c
index dd39ce9b0277..b37c35fb5a46 100644
--- a/tools/perf/tests/attr.c
+++ b/tools/perf/tests/attr.c
@@ -34,6 +34,7 @@ 
 #include "event.h"
 #include "util.h"
 #include "tests.h"
+#include "pmu.h"
 
 #define ENV "PERF_TEST_ATTR"
 
@@ -184,6 +185,9 @@  int test__attr(struct test *test __maybe_unused, int subtest __maybe_unused)
 	char path_dir[PATH_MAX];
 	char *exec_path;
 
+	if (perf_pmu__has_hybrid())
+		return 0;
+
 	/* First try development tree tests. */
 	if (!lstat("./tests", &st))
 		return run_dir("./tests", "./perf");