diff options
author | phk <phk@FreeBSD.org> | 2002-03-19 21:05:29 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2002-03-19 21:05:29 +0000 |
commit | ca2e5c188ee68045b54a86bfefcfd4a75e174221 (patch) | |
tree | efe73699db1df391f9b4fcd88000d3a2f42d5ede /sbin/newfs/newfs.c | |
parent | 5a84f9883932fbf90adb9dd3951956e85776adb9 (diff) | |
download | FreeBSD-src-ca2e5c188ee68045b54a86bfefcfd4a75e174221.zip FreeBSD-src-ca2e5c188ee68045b54a86bfefcfd4a75e174221.tar.gz |
Add the undocumented -R option to disable randomness for regression-testing.
Add a couple of simple regression tests accessible with "make test", they
depend on the md(4) driver.
FYI I have also tried running the test against a week old newfs and it
passed.
Diffstat (limited to 'sbin/newfs/newfs.c')
-rw-r--r-- | sbin/newfs/newfs.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c index ba0c31a..995b0ed 100644 --- a/sbin/newfs/newfs.c +++ b/sbin/newfs/newfs.c @@ -148,6 +148,7 @@ static struct disklabel *getdisklabel(char *s, int fd); int Nflag; /* run without writing file system */ int Oflag; /* format as an 4.3BSD file system */ +int Rflag; /* regression test */ int Uflag; /* enable soft updates for file system */ int fssize; /* file system size */ int ntracks = NTRACKS; /* # tracks/cylinder */ @@ -209,7 +210,7 @@ main(int argc, char *argv[]) progname = *argv; while ((ch = getopt(argc, argv, - "NOS:T:Ua:b:c:d:e:f:g:h:i:k:l:m:n:o:p:r:s:t:u:vx:")) != -1) + "NORS:T:Ua:b:c:d:e:f:g:h:i:k:l:m:n:o:p:r:s:t:u:vx:")) != -1) switch (ch) { case 'N': Nflag = 1; @@ -217,6 +218,9 @@ main(int argc, char *argv[]) case 'O': Oflag = 1; break; + case 'R': + Rflag = 1; + break; case 'S': if ((sectorsize = atoi(optarg)) <= 0) fatal("%s: bad sector size", optarg); @@ -596,6 +600,7 @@ usage() fprintf(stderr, "\t-N do not create file system, just print out parameters\n"); fprintf(stderr, "\t-O create a 4.3BSD format filesystem\n"); + fprintf(stderr, "\t-R regression test, supress random factors\n"); fprintf(stderr, "\t-S sector size\n"); #ifdef COMPAT fprintf(stderr, "\t-T disktype\n"); |