Module Name:    src
Committed By:   jakllsch
Date:           Tue Nov 27 15:59:16 UTC 2012

Modified Files:
        src/tests/fs/ffs: t_mount.c

Log Message:
Rename fsbsize2big to fsbsizeovermaxphys to accurately match what it tests.
Additionally, compute failing size dynamically by doubling MAXPHYS instead
of assuming 128K will be too big enough.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/tests/fs/ffs/t_mount.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/ffs/t_mount.c
diff -u src/tests/fs/ffs/t_mount.c:1.11 src/tests/fs/ffs/t_mount.c:1.12
--- src/tests/fs/ffs/t_mount.c:1.11	Sun Nov  7 17:51:17 2010
+++ src/tests/fs/ffs/t_mount.c	Tue Nov 27 15:59:15 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_mount.c,v 1.11 2010/11/07 17:51:17 jmmv Exp $	*/
+/*	$NetBSD: t_mount.c,v 1.12 2012/11/27 15:59:15 jakllsch Exp $	*/
 
 /*
  * Basic tests for mounting
@@ -44,8 +44,8 @@ ATF_TC_BODY(48Kimage, tc)
 	FSTEST_DESTRUCTOR(tc, ffs, tmp);
 }
 
-ATF_TC(fsbsize2big);
-ATF_TC_HEAD(fsbsize2big, tc)
+ATF_TC(fsbsizeovermaxphys);
+ATF_TC_HEAD(fsbsizeovermaxphys, tc)
 {
 
 	atf_tc_set_md_var(tc, "descr", "mounts file system with "
@@ -53,11 +53,7 @@ ATF_TC_HEAD(fsbsize2big, tc)
 	/* PR kern/43727 */
 }
 
-#define MYBLOCKSIZE 131072
-#if MAXPHYS >= MYBLOCKSIZE
-#error MAXPHYS too large for test to work
-#endif
-ATF_TC_BODY(fsbsize2big, tc)
+ATF_TC_BODY(fsbsizeovermaxphys, tc)
 {
 	char cmd[1024];
 	struct ufs_args args;
@@ -68,7 +64,7 @@ ATF_TC_BODY(fsbsize2big, tc)
 	 * so do things the oldfashioned manual way.
 	 */
 	snprintf(cmd, sizeof(cmd), "newfs -G -b %d -F -s 10000 "
-	    "ffs.img > /dev/null", MYBLOCKSIZE);
+	    "ffs.img > /dev/null", MAXPHYS * 2);
 	if (system(cmd))
 		atf_tc_fail("cannot create file system");
 
@@ -94,7 +90,7 @@ ATF_TP_ADD_TCS(tp)
 {
 
 	ATF_TP_ADD_TC(tp, 48Kimage);
-	ATF_TP_ADD_TC(tp, fsbsize2big);
+	ATF_TP_ADD_TC(tp, fsbsizeovermaxphys);
 
 	return atf_no_error();
 }

Reply via email to