This repository has been archived on 2021-05-26. You can view files and clone it, but cannot push or open issues or pull requests.
OS/pintos-env/pintos/tests/vm/mmap-bad-fd.c

15 lines
310 B
C
Executable file

/* Tries to mmap an invalid fd,
which must either fail silently or terminate the process with
exit code -1. */
#include <syscall.h>
#include "tests/lib.h"
#include "tests/main.h"
void
test_main (void)
{
CHECK (mmap (0x5678, (void *) 0x10000000) == MAP_FAILED,
"try to mmap invalid fd");
}