attr.c (ccf59d8da119ab03dcbdf95fb5e5adcef6ba51f2) | attr.c (c81251e808fe2386e71990ecd49c408bb7cb4666) |
---|---|
1 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 * --- 13 unchanged lines hidden (view full) --- 22#include <stdlib.h> 23#include <stdio.h> 24#include <inttypes.h> 25#include <linux/types.h> 26#include <linux/kernel.h> 27#include "../perf.h" 28#include "util.h" 29#include "exec_cmd.h" | 1 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 * --- 13 unchanged lines hidden (view full) --- 22#include <stdlib.h> 23#include <stdio.h> 24#include <inttypes.h> 25#include <linux/types.h> 26#include <linux/kernel.h> 27#include "../perf.h" 28#include "util.h" 29#include "exec_cmd.h" |
30#include "tests.h" |
|
30 31#define ENV "PERF_TEST_ATTR" 32 33extern int verbose; 34 35bool test_attr__enabled; 36 37static char *dir; --- 108 unchanged lines hidden (view full) --- 146 char cmd[3*PATH_MAX]; 147 148 snprintf(cmd, 3*PATH_MAX, "python %s/attr.py -d %s/attr/ -p %s %s", 149 d, d, perf, verbose ? "-v" : ""); 150 151 return system(cmd); 152} 153 | 31 32#define ENV "PERF_TEST_ATTR" 33 34extern int verbose; 35 36bool test_attr__enabled; 37 38static char *dir; --- 108 unchanged lines hidden (view full) --- 147 char cmd[3*PATH_MAX]; 148 149 snprintf(cmd, 3*PATH_MAX, "python %s/attr.py -d %s/attr/ -p %s %s", 150 d, d, perf, verbose ? "-v" : ""); 151 152 return system(cmd); 153} 154 |
154int test_attr__run(void) | 155int test__attr(void) |
155{ 156 struct stat st; 157 char path_perf[PATH_MAX]; 158 char path_dir[PATH_MAX]; 159 160 /* First try developement tree tests. */ 161 if (!lstat("./tests", &st)) 162 return run_dir("./tests", "./perf"); --- 12 unchanged lines hidden --- | 156{ 157 struct stat st; 158 char path_perf[PATH_MAX]; 159 char path_dir[PATH_MAX]; 160 161 /* First try developement tree tests. */ 162 if (!lstat("./tests", &st)) 163 return run_dir("./tests", "./perf"); --- 12 unchanged lines hidden --- |