#include <debug.h>
#include <errno.h>
#include <inttypes.h>
#include <stdlib.h>
#include <stdio.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <sys/param.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include "../perf.h"
#include <subcmd/exec-cmd.h>
#include "tests.h"
Go to the source code of this file.
|
void | test_attr__init (void) |
|
static int | store_event (struct perf_event_attr *attr, pid_t pid, int cpu, int fd, int group_fd, unsigned long flags) |
|
void | test_attr__open (struct perf_event_attr *attr, pid_t pid, int cpu, int fd, int group_fd, unsigned long flags) |
|
void | test_attr__ready (void) |
|
static int | run_dir (const char *d, const char *perf) |
|
int | test__attr (struct test *test __maybe_unused, int subtest __maybe_unused) |
|
◆ __WRITE_ASS
#define __WRITE_ASS |
( |
|
str, |
|
|
|
fmt, |
|
|
|
data |
|
) |
| |
Value:do { \
\
if (1 != fwrite(buf, size, 1, file)) { \
perror("test attr - failed to write event file"); \
fclose(file); \
return -1; \
} \
\
} while (0)
static int str(yyscan_t scanner, int token)
Definition at line 50 of file attr.c.
◆ BUFSIZE
◆ ENV
#define ENV "PERF_TEST_ATTR" |
◆ WRITE_ASS
◆ run_dir()
static int run_dir |
( |
const char * |
d, |
|
|
const char * |
perf |
|
) |
| |
|
static |
◆ store_event()
static int store_event |
( |
struct perf_event_attr * |
attr, |
|
|
pid_t |
pid, |
|
|
int |
cpu, |
|
|
int |
fd, |
|
|
int |
group_fd, |
|
|
unsigned long |
flags |
|
) |
| |
|
static |
◆ test__attr()
int test__attr |
( |
struct test *test |
__maybe_unused, |
|
|
int subtest |
__maybe_unused |
|
) |
| |
◆ test_attr__init()
void test_attr__init |
( |
void |
| ) |
|
◆ test_attr__open()
void test_attr__open |
( |
struct perf_event_attr * |
attr, |
|
|
pid_t |
pid, |
|
|
int |
cpu, |
|
|
int |
fd, |
|
|
int |
group_fd, |
|
|
unsigned long |
flags |
|
) |
| |
◆ test_attr__ready()
void test_attr__ready |
( |
void |
| ) |
|
◆ dir
◆ ready