Lines Matching refs:test

13 struct test {  struct
18 bool (*next)(struct test *); argument
345 static bool pci_next(struct test *test, unsigned long addr, bool io) in pci_next() argument
351 test->func = NULL; in pci_next()
355 iowriteb(addr + offsetof(struct pci_test_dev_hdr, test), in pci_next()
361 test->func = io ? pci_io_testb : pci_mem_testb; in pci_next()
364 test->func = io ? pci_io_testw : pci_mem_testw; in pci_next()
367 test->func = io ? pci_io_testl : pci_mem_testl; in pci_next()
372 test->func = NULL; in pci_next()
391 static bool pci_mem_next(struct test *test) in pci_mem_next() argument
394 ret = pci_next(test, ((unsigned long)pci_test.memaddr), false); in pci_mem_next()
401 static bool pci_io_next(struct test *test) in pci_io_next() argument
404 ret = pci_next(test, ((unsigned long)pci_test.iobar), true); in pci_io_next()
482 static struct test tests[] = {
532 static bool do_test(struct test *test) in do_test() argument
540 if (test->valid && !test->valid()) { in do_test()
541 printf("%s (skipped)\n", test->name); in do_test()
545 if (test->next && !test->next(test)) { in do_test()
549 func = test->func; in do_test()
551 printf("%s (skipped)\n", test->name); in do_test()
560 if (!test->parallel) { in do_test()
568 printf("%s %d\n", test->name, (int)((t2 - t1) / iterations)); in do_test()
570 printf(" ipi %s %d\n", test->name, (int)(tsc_ipi / iterations)); in do_test()
572 printf(" eoi %s %d\n", test->name, (int)(tsc_eoi / iterations)); in do_test()
574 return test->next; in do_test()
583 static bool test_wanted(struct test *test, char *wanted[], int nwanted) in test_wanted() argument
591 if (strcmp(wanted[i], test->name) == 0) in test_wanted()