X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ftests%2Fuserprog%2Fchild-close.c;h=866e159a87b4293150fc2ee6c9a647f664ef5aa1;hb=520ff4dd2a106a4d4a21468a72ba820c8ea7d242;hp=83e3d06966cc8efabed1696a8ed5fc33f9511036;hpb=615bf3b3d2a8573ed6fb9ddc0055745e163ac999;p=pintos-anon diff --git a/src/tests/userprog/child-close.c b/src/tests/userprog/child-close.c index 83e3d06..866e159 100644 --- a/src/tests/userprog/child-close.c +++ b/src/tests/userprog/child-close.c @@ -1,14 +1,23 @@ +/* Child process run by multi-child-fd test. + + Attempts to close the file descriptor passed as the first + command-line argument. This is invalid, because file + descriptors are not inherited in Pintos. Two results are + allowed: either the system call should return without taking + any action, or the kernel should terminate the process with a + -1 exit code. */ + #include #include #include #include #include "tests/lib.h" -const char *test_name = "child-close"; - int main (int argc UNUSED, char *argv[]) { + test_name = "child-close"; + msg ("begin"); if (!isdigit (*argv[1])) fail ("bad command-line arguments");