Module Name:    src
Committed By:   njoly
Date:           Sun Jul 28 09:03:43 UTC 2013

Modified Files:
        src/tests/fs/vfs: t_vnops.c

Log Message:
Check that rename(2) with NULL arguments fail with EFAULT.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/tests/fs/vfs/t_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/fs/vfs/t_vnops.c
diff -u src/tests/fs/vfs/t_vnops.c:1.36 src/tests/fs/vfs/t_vnops.c:1.37
--- src/tests/fs/vfs/t_vnops.c:1.36	Wed Jul 10 18:55:00 2013
+++ src/tests/fs/vfs/t_vnops.c	Sun Jul 28 09:03:43 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_vnops.c,v 1.36 2013/07/10 18:55:00 reinoud Exp $	*/
+/*	$NetBSD: t_vnops.c,v 1.37 2013/07/28 09:03:43 njoly Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -400,6 +400,9 @@ rename_reg_nodir(const atf_tc_t *tc, con
 		ATF_REQUIRE_EQ(sb.st_nlink, 1);
 	}
 
+	ATF_CHECK_ERRNO(EFAULT, rump_sys_rename("file2", NULL) == -1);
+	ATF_CHECK_ERRNO(EFAULT, rump_sys_rename(NULL, "file2") == -1);
+
 	rump_sys_chdir("/");
 }
 

Reply via email to