Lines Matching refs:test
25 /* Unit test for disassembly of instructions.
27 * The goal is to take instructions we've seen the blob produce, and test that
50 static const struct test {
240 /* Custom test */
352 /* Custom test since we've never seen the blob emit these. */
389 const struct test *test = &tests[i];
390 printf("Testing a%d %s: \"%s\"...\n", test->gpu_id, test->instr,
391 test->expected);
397 * Test disassembly:
401 strtoll(&test->instr[9], NULL, 16),
402 strtoll(&test->instr[0], NULL, 16),
406 .gpu_id = test->gpu_id,
413 if (strcmp(disasm_output, test->expected) != 0) {
415 printf(" Expected: \"%s\"\n", test->expected);
423 * Test assembly, which should result in the identical binary:
426 unsigned gen = test->gpu_id / 100;
428 dev_ids[gen].gpu_id = test->gpu_id;
433 fmemopen((void *)test->expected, strlen(test->expected), "r");
440 test->parse_fail ? "" : "un");
445 if (!test->parse_fail)
448 } else if (test->parse_fail) {
450 * it as a fail so we don't forget to update the test vector: