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/userprog/open-empty.c

14 lines
260 B
C
Raw Permalink Normal View History

/* Tries to open a file with the empty string as its name. */
#include <syscall.h>
#include "tests/lib.h"
#include "tests/main.h"
void
test_main (void)
{
int handle = open ("");
if (handle != -1)
fail ("open() returned %d instead of -1", handle);
}