Graceful handling of Undefined instruction

This commit is contained in:
Prem Mallappa
2009-11-20 00:36:09 +05:30
parent 1d7c2fa451
commit 173ddeb617

View File

@@ -0,0 +1,29 @@
/*
* undeftest.c:
* Tests to see if kernel gracefully handles the undef exception
*/
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
#include <tests.h>
#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");
return 0;
}