Lines Matching defs:test

23 # error This test is 64-bit only
37 /* Specified test function bits */
64 /* Pasid test define */
77 int (*test_func)(struct testcases *test);
260 int handle_max_bits(struct testcases *test)
277 * @return 0: Pass test. 1: Get failure during test 2: Get SIGSEGV
279 static int handle_malloc(struct testcases *test)
284 if (test->later == 0 && test->lam != 0)
285 if (set_lam(test->lam) == -1)
297 ret = handle_lam_test(ptr, test->lam);
302 if (test->later != 0 && test->lam != 0)
303 if (set_lam(test->lam) == -1 && ret == 0)
311 static int handle_mmap(struct testcases *test)
317 if (test->later == 0 && test->lam != 0)
318 if (set_lam(test->lam) != 0)
321 ptr = mmap((void *)test->addr, PAGE_SIZE, PROT_READ | PROT_WRITE,
324 if (test->addr == HIGH_ADDR)
330 if (test->later != 0 && test->lam != 0)
331 if (set_lam(test->lam) != 0)
337 ret = handle_lam_test(ptr, test->lam);
347 static int handle_syscall(struct testcases *test)
352 if (test->later == 0 && test->lam != 0)
353 if (set_lam(test->lam) != 0)
358 pu = (struct utsname *)set_metadata((uint64_t)&unme, test->lam);
366 if (test->later != 0 && test->lam != 0)
367 if (set_lam(test->lam) != -1 && ret == 0)
634 int handle_uring(struct testcases *test)
638 if (test->later == 0 && test->lam != 0)
639 if (set_lam(test->lam) != 0)
644 ret = do_uring(test->lam);
652 static int fork_test(struct testcases *test)
662 ret = test->test_func(test);
672 static int handle_execve(struct testcases *test)
675 int lam = test->lam;
708 static int handle_inheritance(struct testcases *test)
711 int lam = test->lam;
745 struct testcases *test = arg;
747 return set_lam(test->lam);
750 static int handle_thread(struct testcases *test)
758 if (!test->later) {
759 lam = test->lam;
777 if (test->later) {
778 if (set_lam(test->lam) != 0)
785 static int handle_thread_enable(struct testcases *test)
789 int lam = test->lam;
793 SIGCHLD | CLONE_FILES | CLONE_FS | CLONE_VM, test);
807 static void run_test(struct testcases *test, int count)
812 struct testcases *t = test + i;
814 /* fork a process to run test case */
951 printf("usage: lam [-h] [-t test list]\n");
952 printf("\t-t test list: run tests specified in the test list, default:0x%x\n", TEST_MASK);
1078 int handle_pasid(struct testcases *test)
1080 uint tmp = test->cmd;
1135 * Pasid test depends on idxd and SVA, kernel should enable iommu and sm.
1208 * When tests is 0, it is not a real test case;
1209 * the option used by test case(execve) to check the lam mode in
1216 /* Run test cases */