Unbreak crashy user process test.

This commit is contained in:
Andreas Kling 2018-10-24 00:35:07 +02:00
parent 3253a23b91
commit b40c851fce

View file

@ -30,7 +30,7 @@
#define TEST_VFS
//#define STRESS_TEST_SPAWNING
//#define TEST_ELF_LOADER
//#define TEST_CRASHY_USER_PROCESSES
#define TEST_CRASHY_USER_PROCESSES
system_t system;
@ -49,6 +49,22 @@ void banner()
kprintf("\n");
}
#ifdef TEST_CRASHY_USER_PROCESSES
static void user_main() NORETURN;
static void user_main()
{
DO_SYSCALL_A3(0x3000, 2, 3, 4);
// Crash ourselves!
char* x = reinterpret_cast<char*>(0xbeefbabe);
*x = 1;
HANG;
for (;;) {
// nothing?
Userspace::sleep(1 * TICKS_PER_SECOND);
}
}
#endif
static void undertaker_main() NORETURN;
static void undertaker_main()
{