void manager_jenkins() { #ifdef CONFIG_KERNEL_TESTING printk("<-- BEGIN_KERNEL_TESTS -->\n"); run_registered_ktest_suites(); printk("<-- END_KERNEL_TESTS -->\n"); #endif // Run userspace tests (from config specified path). #ifdef CONFIG_USERSPACE_TESTING if (strlen(CONFIG_USERSPACE_TESTING_SCRIPT) != 0) { char exec[] = "/bin/ash"; char *p_argv[] = {exec, CONFIG_USERSPACE_TESTING_SCRIPT, 0}; struct file *program = do_file_open(exec, 0, 0); struct proc *p = proc_create(program, p_argv, NULL); proc_wakeup(p); proc_decref(p); /* let go of the reference created in proc_create() */ kref_put(&program->f_kref); run_scheduler(); // Need a way to wait for p to finish } else { printk("No user-space launcher file specified.\n"); } #endif smp_idle(); assert(0); }
static long regresswrite(struct chan *c, void *a, long n, int64_t unused) { ERRSTACK(1); uintptr_t pc; struct cmdbuf *cb; cb = parsecmd(a, n); if (waserror()) { kfree(cb); nexterror(); } switch((int)(c->qid.path)){ case Monitorctlqid: if(strncmp(a, "ktest", 5) == 0){ run_registered_ktest_suites(); } else { error(EFAIL, "regresswrite: only commands are %s", ctlcommands); } break; case Monitordataqid: if (onecmd(cb->nf, cb->f, NULL) < 0) n = -1; break; default: error(EBADFD, ERROR_FIXME); } kfree(cb); poperror(); return n; }