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

16 lines
310 B
C
Raw Permalink Normal View History

/* 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");
}