Commit Graph

33 Commits

Author SHA1 Message Date
jruoho a74ccce819 Test that sysctl(8) does not segfault, as reported by pgoyette@ on current
users.
2012-04-10 02:39:33 +00:00
jruoho 543143cf18 Move more PR references from comments to ATF's "descr". 2012-03-18 09:46:50 +00:00
jruoho 4fac6e71e4 Add missing copyright and remove white space. 2012-03-18 09:31:50 +00:00
jruoho d2d68b21f3 Add '-e ignore" to atf-check(1) and remove xfail. Pointed by njoly@. 2012-03-17 17:39:44 +00:00
jruoho a43eb6ed04 PR bin/42179 was fixed; remove xfail. 2012-03-17 08:34:55 +00:00
jruoho 6c201d9091 Remove xfail, as PR kern/44946 was fixed. 2012-03-12 08:14:02 +00:00
njoly 59bc3aabda Add require root user to test_case_xfail. Avoids reporting expected
failure for the wrong reason with unprivileged runs (puffs access
denied).
2011-05-17 22:01:41 +00:00
njoly de774efe6e Remove shebang lines from test-script sources; avoids duplicate with
the build process which adds one too.
2011-05-11 22:08:12 +00:00
jruoho 3005f452fe Do also a small functional verification that user did not succeed in writing
garbage values, even if sysctl(8) reported a failure.
2011-05-11 07:07:41 +00:00
jruoho 949a3d9b76 Add one missing cleanup routine declaration. 2011-05-09 17:55:37 +00:00
jruoho f33b8e3d59 Add a test case for PR kern/44946. This tests that common first level sysctl
nodes (ddb, hw, machdep, etc.) are not writable by a normal user.
2011-05-09 17:53:54 +00:00
jruoho 765b090a54 A test for non-critical/low PR bin/42179. 2011-05-03 07:56:42 +00:00
jruoho b76e0d98ce Add a test for non-critical/low PR bin/43141. 2011-05-03 06:13:06 +00:00
bouyer 063f96f3c2 merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
2011-03-06 17:08:10 +00:00
riz c9ff785918 Back out previous; it's causing intermittent problems which I don't
fully understand yet.
2011-03-04 17:56:53 +00:00
riz 1242e4fa63 Switch from using "rump_ffs" to mount the file system image to
using a rump_server to mount it in a rump kernel, and librumphijack.so
to enable accessing it from the test program.  Among other things,
this allows the tests to run as an unprivileged user.
2011-03-03 16:25:15 +00:00
riz 99384b2def Copy a little less data in the ufs2, 4096-byte block test cases.
The file system was filling up instead of *almost* filling up, which
threw off the tests.
2011-01-11 00:50:02 +00:00
riz 468e2d30f8 Replace uses of 'jot' with 'seq'. This is primarily to work around
a qemu-running-on-netbsd problem with FP which causes 'jot' to output
incorrect sequences, which were causing failures on one of the auto-testing
platforms.  While 'seq' also uses FP, it does not seem to be affected in
this particular usage

As a bonus, however, 'seq' is actually a better fit (the commandline is
more intuitive) for the way it is used in these tests.
2011-01-05 18:13:54 +00:00
riz 64fbc2ff54 Restore data integrity verification in the grow case which was
inadvertantly removed when refactoring occurred in a prior
revision.
2011-01-05 18:05:32 +00:00
riz a44c3b6512 All of the generated tests require root, for rump_ffs. Spotted by
njoly@.
2011-01-05 03:04:13 +00:00
riz 89e455be4b Update resize_ffs tests for byteswapped file system support, and
for UFS2 growth support.  Also, reduce the number of tests run by default
while still maintaining decent coverage of features and block sizes.
Anyone working on resize_Ffs should run the tests with RESIZE_FFS_ALL_TESTS
set in the environment, which adds a lot more testing.
2011-01-05 02:25:27 +00:00
riz 2b22938736 Reduce the number of tests run automatically, as they apparently go
quite slowly when run under qemu.

Also, change the switch variable from "RESIZE_FFS_BIG_TESTS" to
"RESIZE_FFS_ALL_TESTS", and only check if it's set or not.
2010-12-16 17:50:13 +00:00
riz b83a35485a Factor out more common code. No functional changes intended. 2010-12-16 17:16:07 +00:00
riz b7560d46dc PR bin/44209 is now fixed, expect failure -> expect success. 2010-12-12 22:50:42 +00:00
pooka c876d9d94e Reset error from umount. This squelches atf "cleanup should not
fail" warning if a test fails when the fs is not mounted.
2010-12-11 11:36:48 +00:00
pooka 772299258e Can't use dynamic data in cleanup (it's run in a different process),
so get rid of $MNTPT and use the constant value the variable was
set to.
2010-12-11 11:31:27 +00:00
riz ee56abbce8 Wrap the bigger tests in RESIZE_FFS_BIG_TESTS, as the automated test
run seems to choke over a certain size.  (This will speed up the runs
as well)
2010-12-09 17:28:05 +00:00
riz 351455dcdb Remove accidentally-committed debug-assist code. 2010-12-09 16:59:35 +00:00
riz 06253fa750 Re-work the resize_ffs(8) tests:
Put real data into file systems before resizing:  the test data
was randomly generated and is in pairs of files each a power-of-two and
power-of-two plus one bytes to hopefully catch block and frag issues.

Each test fills (nearly) the file system with test data.  If shrinking,
it removes enough data so that the shrunken file system will be large enough
to accomodate the data.  (It's done this way to hopefully ensure some or
most of the data will need to be moved when shrinking).  The files are
then checked with MD5 against the known list.  This particular method
was chosen to reduce the amount of data checked in while still retaining
reproducibility.

There are more tests to come;  since resize_ffs(8) currently does not
support ffsv2 or byteswapped file systems, only a couple token expected-fail
test cases for those were added.  Also, only 8:1 blocksize:fragsize
combinations are currently tested.
2010-12-09 05:19:02 +00:00
riz 12c055f488 Cause the tests to use plain files instead of vnd; for the kinds of
tests being done, vnd isn't needed and adds a potential resource
conflict issue on the system running the test.  As a bonus, the
tests run faster because less data is being shuffled around.
2010-12-03 05:23:46 +00:00
riz 539a0898bc Correct two function names:
grow_ffsv1_64k() -> grow_ffsv1_64k_head()
   shrink_ffsv1_64k() -> shrink_ffsv1_64k_head()
2010-12-03 04:10:36 +00:00
riz 07bc982d01 Update existing test cases and add a couple more:
- PR bin/44177 is fixed
- test grow/shrink on a ffsv1 with 64k blocksize, which was broken until
  recently
- make sure the partial cylinder left over is big enough so it doesn't
  get thrown away now that resize_ffs properly uses the last cyl.

XXX TODO:  add tests which ensure data integrity.
2010-12-02 22:03:23 +00:00
riz 3c3ed948f1 Add some basic tests of resize_ffs(8). The 'grow' test does nothing
more than create an empty file system, grow it, and makes sure fsck
finds the result clean.  The 'shrink' test does likewise for shrinking,
but is an expected failure at the moment due to PR bin/44177.
2010-11-30 23:17:27 +00:00