Undefined instruction handling/ipc revised, tests added, cleaned up.

This commit is contained in:
Bahadir Balban
2009-12-04 15:22:56 +02:00
parent 93dc1ed49e
commit 2908c40816
7 changed files with 43 additions and 32 deletions

View File

@@ -16,6 +16,8 @@
#include <shpage.h>
#include <libposix.h>
#if 0
/*
* Shared page initialisation of posix-like tasks.
*
@@ -95,3 +97,4 @@ int shared_page_init(void)
return 0;
}
#endif

View File

@@ -79,6 +79,11 @@ void handle_requests(void)
/* This has no receive phase */
return;
case L4_IPC_TAG_UNDEF_FAULT:
/* Undefined instruction fault. Ignore. */
// printf("Undefined instruction fault caught.\n");
ret = 0;
break;
case L4_IPC_TAG_PFAULT: {
struct page *p;

View File

@@ -40,8 +40,7 @@ int main(int argc, char *argv[])
wait_pager(pagerid);
printf("\n%s: Running POSIX API tests.\n", __TASKNAME__);
undeftest();
small_io_test();
@@ -57,6 +56,8 @@ int main(int argc, char *argv[])
clonetest();
undeftest();
if (parent_of_all == getpid()) {
ipc_full_test();
ipc_extended_test();

View File

@@ -1,4 +1,4 @@
/*
/*
* undeftest.c:
* Tests to see if kernel gracefully handles the undef exception
*/
@@ -13,17 +13,16 @@
#include <errno.h>
#include INC_GLUE(memory.h)
int undeftest(void)
{
test_printf("UNDEF: Start\n");
/* need a way to report FAIL case */
__asm__ __volatile__(".word 0xf1f0feed\n\t"); /* Some pattern for easy recongition */
/* If code reaches here its passed */
printf("UNDEF TEST -- PASSED --\n");
test_printf("UNDEF: Passed\n");
if (getpid() == parent_of_all)
printf("UNDEF TEST -- PASSED --\n");
return 0;
}
}