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_pkt_decoder_init(&tfix->decoder, config); in tfix_init()
142 static struct ptunit_result sync_set_eos(struct test_fixture *tfix) in sync_set_eos() argument
146 errcode = pt_pkt_sync_set(&tfix->decoder, sizeof(tfix->buffer) + 1); in sync_set_eos()
167 static struct ptunit_result get_offset_init(struct test_fixture *tfix) in get_offset_init() argument
172 errcode = pt_pkt_get_offset(&tfix->decoder, &offset); in get_offset_init()
178 static struct ptunit_result sync_set_get_offset(struct test_fixture *tfix) in sync_set_get_offset() argument
183 errcode = pt_pkt_sync_set(&tfix->decoder, 1ull); in sync_set_get_offset()
186 errcode = pt_pkt_get_offset(&tfix->decoder, &offset); in sync_set_get_offset()
218 static struct ptunit_result get_config(struct test_fixture *tfix) in get_config() argument
222 config = pt_pkt_get_config(&tfix->decoder); in get_config()
245 struct test_fixture tfix; in main() local
248 tfix.init = tfix_init; in main()
249 tfix.fini = NULL; in main()
261 ptu_run_f(suite, sync_set_eos, tfix); in main()
264 ptu_run_f(suite, get_offset_init, tfix); in main()
265 ptu_run_f(suite, sync_set_get_offset, tfix); in main()
269 ptu_run_f(suite, get_config, tfix); in main()