| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: t_mount.c,v 1.9 2010/08/09 19:34:59 pooka Exp $ */ | | 1 | /* $NetBSD: t_mount.c,v 1.10 2010/08/09 19:36:30 pooka Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Basic tests for mounting | | 4 | * Basic tests for mounting |
5 | */ | | 5 | */ |
6 | | | 6 | |
7 | /* | | 7 | /* |
8 | * 48Kimage: | | 8 | * 48Kimage: |
9 | * Adapted for rump and atf from a testcase supplied | | 9 | * Adapted for rump and atf from a testcase supplied |
10 | * by Hubert Feyrer on netbsd-users@ | | 10 | * by Hubert Feyrer on netbsd-users@ |
11 | */ | | 11 | */ |
12 | | | 12 | |
13 | #include <atf-c.h> | | 13 | #include <atf-c.h> |
14 | | | 14 | |
| @@ -55,26 +55,30 @@ ATF_TC_HEAD(fsbsize2big, tc) | | | @@ -55,26 +55,30 @@ ATF_TC_HEAD(fsbsize2big, tc) |
55 | /* PR kern/43727 */ | | 55 | /* PR kern/43727 */ |
56 | } | | 56 | } |
57 | | | 57 | |
58 | #define MYBLOCKSIZE 131072 | | 58 | #define MYBLOCKSIZE 131072 |
59 | #if MAXPHYS >= MYBLOCKSIZE | | 59 | #if MAXPHYS >= MYBLOCKSIZE |
60 | #error MAXPHYS too large for test to work | | 60 | #error MAXPHYS too large for test to work |
61 | #endif | | 61 | #endif |
62 | ATF_TC_BODY(fsbsize2big, tc) | | 62 | ATF_TC_BODY(fsbsize2big, tc) |
63 | { | | 63 | { |
64 | char cmd[1024]; | | 64 | char cmd[1024]; |
65 | struct ufs_args args; | | 65 | struct ufs_args args; |
66 | struct statvfs svb; | | 66 | struct statvfs svb; |
67 | | | 67 | |
| | | 68 | /* |
| | | 69 | * We cannot pass newfs parameters via the fstest interface, |
| | | 70 | * so do things the oldfashioned manual way. |
| | | 71 | */ |
68 | snprintf(cmd, sizeof(cmd), "newfs -G -b %d -F -s 10000 " | | 72 | snprintf(cmd, sizeof(cmd), "newfs -G -b %d -F -s 10000 " |
69 | "ffs.img > /dev/null", MYBLOCKSIZE); | | 73 | "ffs.img > /dev/null", MYBLOCKSIZE); |
70 | if (system(cmd)) | | 74 | if (system(cmd)) |
71 | atf_tc_fail("cannot create file system"); | | 75 | atf_tc_fail("cannot create file system"); |
72 | | | 76 | |
73 | rump_init(); | | 77 | rump_init(); |
74 | if (rump_pub_etfs_register("/devdisk", "ffs.img", RUMP_ETFS_BLK)) | | 78 | if (rump_pub_etfs_register("/devdisk", "ffs.img", RUMP_ETFS_BLK)) |
75 | atf_tc_fail("cannot register rump fake device"); | | 79 | atf_tc_fail("cannot register rump fake device"); |
76 | | | 80 | |
77 | args.fspec = __UNCONST("/devdisk"); | | 81 | args.fspec = __UNCONST("/devdisk"); |
78 | | | 82 | |
79 | if (rump_sys_mkdir("/mp", 0777) == -1) | | 83 | if (rump_sys_mkdir("/mp", 0777) == -1) |
80 | atf_tc_fail_errno("create mountpoint"); | | 84 | atf_tc_fail_errno("create mountpoint"); |