Lines Matching refs:tfix
48 struct ptunit_result (*init)(struct test_fixture *tfix);
49 struct ptunit_result (*fini)(struct test_fixture *tfix);
52 static struct ptunit_result tfix_init(struct test_fixture *tfix) in tfix_init() argument
58 config = &tfix->config; in tfix_init()
59 buffer = tfix->buffer; in tfix_init()
61 memset(buffer, 0, sizeof(tfix->buffer)); in tfix_init()
65 config->end = buffer + sizeof(tfix->buffer); in tfix_init()
67 errcode = pt_encoder_init(&tfix->encoder, config); in tfix_init()
122 static struct ptunit_result sync_set_eos(struct test_fixture *tfix) in sync_set_eos() argument
126 errcode = pt_enc_sync_set(&tfix->encoder, sizeof(tfix->buffer) + 1); in sync_set_eos()
147 static struct ptunit_result get_offset_init(struct test_fixture *tfix) in get_offset_init() argument
152 errcode = pt_enc_get_offset(&tfix->encoder, &offset); in get_offset_init()
159 static struct ptunit_result sync_set_get_offset(struct test_fixture *tfix) in sync_set_get_offset() argument
164 errcode = pt_enc_sync_set(&tfix->encoder, 1ull); in sync_set_get_offset()
167 errcode = pt_enc_get_offset(&tfix->encoder, &offset); in sync_set_get_offset()
184 static struct ptunit_result get_config(struct test_fixture *tfix) in get_config() argument
188 config = pt_enc_get_config(&tfix->encoder); in get_config()
211 struct test_fixture tfix; in main() local
214 tfix.init = tfix_init; in main()
215 tfix.fini = NULL; in main()
225 ptu_run_f(suite, sync_set_eos, tfix); in main()
228 ptu_run_f(suite, get_offset_init, tfix); in main()
229 ptu_run_f(suite, sync_set_get_offset, tfix); in main()
232 ptu_run_f(suite, get_config, tfix); in main()