fixture
struct fgraph_fixture *fixture = container_of(gops, struct fgraph_fixture, gops);
const char *type = fixture->store_type_name;
int size = fixture->store_size;
snprintf(fixture->error_str_buf, ERRSTR_BUFLEN,
struct fgraph_fixture *fixture = container_of(gops, struct fgraph_fixture, gops);
const char *type = fixture->store_type_name;
snprintf(fixture->error_str_buf, ERRSTR_BUFLEN,
if (fixture->store_size > size) {
snprintf(fixture->error_str_buf, ERRSTR_BUFLEN,
size, (int)fixture->store_size);
switch (fixture->store_size) {
snprintf(fixture->error_str_buf, ERRSTR_BUFLEN,
fixture->error_str = NULL;
static int __init init_fgraph_fixture(struct fgraph_fixture *fixture)
snprintf(fixture->error_str_buf, ERRSTR_BUFLEN,
"Failed to execute storage %s\n", fixture->store_type_name);
fixture->error_str = fixture->error_str_buf;
return ftrace_set_filter(&fixture->gops.ops, func_name, len, 1);
static int __init test_graph_storage_single(struct fgraph_fixture *fixture)
int size = fixture->store_size;
ret = init_fgraph_fixture(fixture);
ret = register_ftrace_graph(&fixture->gops);
unregister_ftrace_graph(&fixture->gops);
if (fixture->error_str) {
pr_cont("*** %s ***", fixture->error_str);
struct fgraph_fixture *fixture;
fixture = &store_bytes[i];
ret = init_fgraph_fixture(fixture);
fixture = &store_bytes[j];
ret = register_ftrace_graph(&fixture->gops);
fixture = &store_bytes[j];
unregister_ftrace_graph(&fixture->gops);
if (fixture->error_str && !printed) {
pr_cont("*** %s ***", fixture->error_str);
fixture = &store_bytes[i];
ftrace_free_filter(&fixture->gops.ops);
if (fixture->error_str && !printed) {
pr_cont("*** %s ***", fixture->error_str);
struct fixture *fix = init_fixture();
struct fixture *fix = init_fixture();
struct fixture *fix = init_fixture();
struct fixture *fix = init_fixture();
struct fixture *fix = init_fixture();
struct fixture *fix = init_fixture();
static struct fixture *init_fixture(void)
struct fixture *fix = init_fixture();
struct fixture *fix = malloc(sizeof(struct fixture));
static void teardown_fixture(struct fixture *fix)
struct fixture *fix = init_fixture();
.fixture = &_fixture_global, \
object->fixture = &_##fixture_name##_fixture_object; \
struct __fixture_metadata *fixture;
.fixture = &_##fixture_name##_fixture_object, \
struct __fixture_metadata *fixture;
__LIST_APPEND(t->fixture->tests, t);
FIXTURE(fixture) {
FIXTURE_SETUP(fixture) {
FIXTURE_TEARDOWN(fixture) {
TEST_F(fixture, pass) {
TEST_F(fixture, fail) {
TEST_F_TIMEOUT(fixture, timeout, 1) {