Merge branch 'master' of git.lfbs.rwth-aachen.de:metalsvm_private
This commit is contained in:
commit
cbcaf8517d
2 changed files with 60 additions and 17 deletions
67
apps/tests.c
67
apps/tests.c
|
@ -546,35 +546,44 @@ struct testcase_t {
|
|||
#define KERNELSPACE_TC(execpointer, name) {0, 0, {NULL}, execpointer, name}
|
||||
|
||||
struct testcase_t testcases[] = {
|
||||
USERSPACE_TC("/bin/jacobi", "Jacobi serial user space app"),
|
||||
// USERSPACE_TC("/bin/jacobi", "Jacobi serial user space app"),
|
||||
USERSPACE_TC("/bin/tests", "Tests user space app"),
|
||||
USERSPACE_TC("/bin/hello", "Hello userspace app"),
|
||||
//USERSPACE_TC("/bin/hello", "Hello userspace app"),
|
||||
KERNELSPACE_TC(producer_consumer, "Producer consumer kernel space test"),
|
||||
KERNELSPACE_TC(join_test, "Join kernel space test"),
|
||||
#ifdef CONFIG_ROCKCREEK
|
||||
KERNELSPACE_TC(svm_test, "SVM Test kernel space test"),
|
||||
KERNELSPACE_TC(testcase_svm_bench, "SVM Bench kernel space test"),
|
||||
//KERNELSPACE_TC(svm_test, "SVM Test kernel space test"),
|
||||
// KERNELSPACE_TC(testcase_svm_bench, "SVM Bench kernel space test"),
|
||||
KERNELSPACE_TC(mail_ping, "Mail Ping kernel space test"),
|
||||
// KERNELSPACE_TC(jacobi, "Jacobi kernel space test"),
|
||||
KERNELSPACE_TC(netio_init, "NetIO kernel space test")
|
||||
// KERNELSPACE_TC(netio_init, "NetIO kernel space test")
|
||||
#endif
|
||||
};
|
||||
|
||||
static int chiefmastertest(void)
|
||||
{
|
||||
int tests = sizeof(testcases) / sizeof(struct testcase_t);
|
||||
int i;
|
||||
int i, j;
|
||||
int result;
|
||||
tid_t id, ret;
|
||||
tid_t ret;
|
||||
struct testcase_t* current;
|
||||
|
||||
int retval[tests];
|
||||
int tmpval;
|
||||
#ifdef CONFIG_ROCKCREEK
|
||||
int *global_retval = NULL;
|
||||
|
||||
kprintf("Starting chief master test: %d test cases on %d cores.\n", tests, RCCE_NP);
|
||||
#else
|
||||
kprintf("Starting chief master test: %d test cases.\n", tests);
|
||||
#endif
|
||||
|
||||
for (i = 0; i < tests; i++) {
|
||||
current = &testcases[i];
|
||||
|
||||
#ifdef CONFIG_ROCKCREEK
|
||||
RCCE_barrier(&RCCE_COMM_WORLD);
|
||||
/* TODO: This blocks forever. Why? */
|
||||
//RCCE_barrier(&RCCE_COMM_WORLD);
|
||||
#endif
|
||||
kprintf("Starting testcase: %s\n", current->testcase_name);
|
||||
|
||||
|
@ -597,29 +606,63 @@ static int chiefmastertest(void)
|
|||
|
||||
kprintf("Testcase %s returned %d %s\n", current->testcase_name, result, result ? ":(" : ":)");
|
||||
|
||||
current->retval = result;
|
||||
retval[i] = result;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ROCKCREEK
|
||||
if (RCCE_IAM == 0) { // Master
|
||||
global_retval = kmalloc(tests * RCCE_NP);
|
||||
memcpy(global_retval, retval, sizeof(retval));
|
||||
|
||||
for (i=1; i < RCCE_NP; i++)
|
||||
iRCCE_recv((void*)&global_retval[tests * i], sizeof(*global_retval) * tests, i);
|
||||
}
|
||||
else { // worker cores
|
||||
iRCCE_send((void*)retval, tests * sizeof(retval[0]), 0);
|
||||
}
|
||||
#endif
|
||||
kprintf("======================================================\n");
|
||||
kprintf("Master Chief test case results:\n");
|
||||
for (i = 0; i < tests; i++) {
|
||||
current = &testcases[i];
|
||||
#ifdef CONFIG_ROCKCREEK
|
||||
tmpval = 0;
|
||||
for (j=0; j < RCCE_NP; j++)
|
||||
tmpval |= global_retval[i + j*tests];
|
||||
#else
|
||||
tmpval = retval[i];
|
||||
#endif
|
||||
|
||||
kprintf("%s: ", current->testcase_name);
|
||||
if (current->retval) {
|
||||
if (tmpval) {
|
||||
pushfg(COL_RED);
|
||||
kprintf("Bad :(");
|
||||
#ifdef CONFIG_ROCKCREEK
|
||||
if (RCCE_IAM == 0) {
|
||||
kprintf("Bad :( [on cores: ");
|
||||
for (j=0; j < RCCE_NP; j++)
|
||||
if (global_retval[i + j*tests])
|
||||
kprintf("%d ", j);
|
||||
kprintf("]");
|
||||
}
|
||||
else
|
||||
#endif
|
||||
kprintf("Bad :(");
|
||||
} else {
|
||||
pushfg(COL_GREEN);
|
||||
kprintf("Pass :)");
|
||||
#ifdef CONFIG_ROCKCREEK
|
||||
if (RCCE_IAM == 0) kprintf(" on all cores");
|
||||
#endif
|
||||
}
|
||||
popfg();
|
||||
popbg();
|
||||
kprintf("\n");
|
||||
}
|
||||
kprintf("======================================================\n");
|
||||
|
||||
#ifdef CONFIG_ROCKCREEK
|
||||
kfree(global_retval, tests * RCCE_NP);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
10
apps/tests.h
10
apps/tests.h
|
@ -30,24 +30,24 @@
|
|||
//#define START_MAIL_NOISE
|
||||
//#define START_KERNEL_LAPLACE
|
||||
//#define START_KERNEL_JACOBI
|
||||
#define START_MMNIF_TEST
|
||||
//#define START_MMNIF_TEST
|
||||
#endif
|
||||
#ifdef CONFIG_LWIP
|
||||
#define START_ECHO
|
||||
//#define START_ECHO
|
||||
#ifndef CONFIG_TICKLESS
|
||||
//#define START_NETIO
|
||||
#endif
|
||||
#endif
|
||||
//#define START_CONSUMER_PRODUCER
|
||||
#define START_FOO
|
||||
//#define START_FOO
|
||||
//#define START_JOIN_TEST
|
||||
//#define START_PI
|
||||
//#define START_MEASURE_CTX_SWITCH
|
||||
//#define START_HELLO
|
||||
#define START_TESTS
|
||||
//#define START_TESTS
|
||||
//#define START_JACOBI
|
||||
|
||||
//#define START_CHIEFTEST
|
||||
#define START_CHIEFTEST
|
||||
|
||||
// does our demos require GFX support?
|
||||
//#define CONFIG_GFX
|
||||
|
|
Loading…
Add table
Reference in a new issue