mirror of
https://github.com/drasko/codezero.git
synced 2026-02-26 16:53:14 +01:00
Merge branch 'undeftest' of git://git.l4dev.org/~prem/codezero into prem
This commit is contained in:
@@ -25,5 +25,6 @@ int clonetest(void);
|
||||
int exectest(pid_t);
|
||||
int user_mutex_test(void);
|
||||
int small_io_test(void);
|
||||
int undeftest(void);
|
||||
|
||||
#endif /* __TEST0_TESTS_H__ */
|
||||
|
||||
@@ -40,6 +40,8 @@ int main(int argc, char *argv[])
|
||||
wait_pager(pagerid);
|
||||
|
||||
printf("\n%s: Running POSIX API tests.\n", __TASKNAME__);
|
||||
|
||||
undeftest();
|
||||
|
||||
small_io_test();
|
||||
|
||||
|
||||
29
conts/posix/test0/src/undeftest.c
Normal file
29
conts/posix/test0/src/undeftest.c
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user