attr.c (03ab8e6297acd1bc0eedaa050e2a1635c576fd11) attr.c (1eaf496ed386934f1c2439a120fe84a05194f91a)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * The struct perf_event_attr test support.
4 *
5 * This test is embedded inside into perf directly and is governed
6 * by the PERF_TEST_ATTR environment variable and hook inside
7 * sys_perf_event_open function.
8 *

--- 20 unchanged lines hidden (view full) ---

29#include <sys/param.h>
30#include <sys/types.h>
31#include <sys/stat.h>
32#include <unistd.h>
33#include <subcmd/exec-cmd.h>
34#include "event.h"
35#include "util.h"
36#include "tests.h"
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * The struct perf_event_attr test support.
4 *
5 * This test is embedded inside into perf directly and is governed
6 * by the PERF_TEST_ATTR environment variable and hook inside
7 * sys_perf_event_open function.
8 *

--- 20 unchanged lines hidden (view full) ---

29#include <sys/param.h>
30#include <sys/types.h>
31#include <sys/stat.h>
32#include <unistd.h>
33#include <subcmd/exec-cmd.h>
34#include "event.h"
35#include "util.h"
36#include "tests.h"
37#include "pmu.h"
37#include "pmus.h"
38
39#define ENV "PERF_TEST_ATTR"
40
41static char *dir;
42static bool ready;
43
44void test_attr__init(void)
45{

--- 134 unchanged lines hidden (view full) ---

180
181static int test__attr(struct test_suite *test __maybe_unused, int subtest __maybe_unused)
182{
183 struct stat st;
184 char path_perf[PATH_MAX];
185 char path_dir[PATH_MAX];
186 char *exec_path;
187
38
39#define ENV "PERF_TEST_ATTR"
40
41static char *dir;
42static bool ready;
43
44void test_attr__init(void)
45{

--- 134 unchanged lines hidden (view full) ---

180
181static int test__attr(struct test_suite *test __maybe_unused, int subtest __maybe_unused)
182{
183 struct stat st;
184 char path_perf[PATH_MAX];
185 char path_dir[PATH_MAX];
186 char *exec_path;
187
188 if (perf_pmu__has_hybrid())
188 if (perf_pmus__has_hybrid())
189 return TEST_SKIP;
190
191 /* First try development tree tests. */
192 if (!lstat("./tests", &st))
193 return run_dir("./tests", "./perf");
194
195 exec_path = get_argv_exec_path();
196 if (exec_path == NULL)

--- 15 unchanged lines hidden ---
189 return TEST_SKIP;
190
191 /* First try development tree tests. */
192 if (!lstat("./tests", &st))
193 return run_dir("./tests", "./perf");
194
195 exec_path = get_argv_exec_path();
196 if (exec_path == NULL)

--- 15 unchanged lines hidden ---