Commit Graph

43 Commits

Author SHA1 Message Date
maya b42dccbff0 Use sysctl -n rather than parse the output.
From Ngie Cooper in PR bin/51870
2018-01-17 00:23:17 +00:00
maya 687000d215 - Add inttypes.h #include for PR* macros.
- close fd when done to prevent leak.
- use correct socket length when calling bind(2).

From Ngie Cooper in PR bin/51870
2018-01-17 00:22:29 +00:00
martin 05ad4681cb Do not assume anything about the pseudo-disklabel of a completely zeroed
disk image. Use the raw partition and newfs -I instead.
2017-03-23 08:18:17 +00:00
christos c54cb81102 Don't play with "../.." in includes for h_macros.h; deal with it centrally.
Minor fixes.
2017-01-13 21:30:39 +00:00
pgoyette 3ff4e5ad94 Update the test - the "official" name of the vnd configuration utility
was changed in NetBSD 7 to vndconfig(8).
2016-07-29 05:23:24 +00:00
jmmv 0818487da7 Simplify test_mount and log errors.
If mount_tmpfs fails, show what the stderr output of the command was instead
of failing without details.

While doing this, remove the stupidity to deal with the optional arguments
to the test_mount routine.
2013-03-17 01:16:45 +00:00
riastradh 4b12d41728 No more xfail for PR kern/36681. 2011-08-18 21:44:55 +00:00
christos 2a18cea9f4 Turn warns on for all tests and fix all the bugs. 2011-06-11 18:03:17 +00:00
haad 3c44b4003a Workaround problem with qemu where jot 100 produce garbage otput like this
93
94
:+
:,
:-
:.
:/
100

This can't be used as name of file, change jot cmd to work in all cases.
2011-04-21 22:26:46 +00:00
jmmv 27486724f4 Prevent failures from cleanup routines. Do so by only attempting to do the
cleanup if the test case did not succeed (as, when it succeeds, the cleanup
has already happened).
2011-03-24 21:52:51 +00:00
pooka 4adfadb23c chown the workdir to unpriv user instead of chmod 711. Otherwise,
if your (root's) login shell is {t,}csh, su -m gets outoutsmarted.
2011-03-05 07:41:11 +00:00
pooka 91971b5261 Skip instead of fail test if tmpfs cannot be mounted and the
error is "Operation not supported".

makes the tmpfs tests produce a sensible result on platforms where
tmpfs is not available (such as the hpc* test runs)
2011-02-21 10:14:29 +00:00
martin 2f62f26a09 Fix off by one that made most of these tests die with a bus error in the
sparc64 runs.
2011-01-15 20:16:57 +00:00
pooka dfdd51ae19 win wunused 2011-01-04 18:46:21 +00:00
pooka 620f20e9e9 Remove arch check now that rump smp is available on all host archs. 2011-01-04 16:25:20 +00:00
pooka 5c3365ce93 + rump_lwproc_newproc -> rump_lwproc_rfork()
+ add a tess for rump_lwproc_rfork()
2011-01-02 12:58:17 +00:00
jmmv 97a78f11fc Remove ugly workaround to skip this if unprivileged-user=_atf and just use
'su -m' as pooka@ did in t_mkdir.sh.  As he says this may still fail if
root's shell is csh; we need a better solution.
2010-11-09 13:01:33 +00:00
pooka 617f136424 Use su -m since _atf has nologin as its shell.
XXX: this will still fail if root's shell is csh
2010-11-08 15:25:50 +00:00
jmmv decf2b5e0f Adjusts tests after import of atf-0.12:
- The use.fs property is gone.
- Mark the tests/fs/t_create:attrs test as broken when using the default
  unprivileged-user:_atf setting.  This probably deserves a fix somehow
  but I'm not sure at this point.
2010-11-07 17:51:16 +00:00
pooka 2a47331e63 update to new rump lwp/proc interfaces 2010-09-01 19:41:27 +00:00
pooka 3b5bc723d2 Convert "The Original" rename race test from to vfs and retire the
ffs/tmpfs versions.  The only difference is that the origamical
one mounted ffs with MNT_LOG (and therein actually lay the bug).
2010-07-14 21:39:31 +00:00
jmmv 9d0b4b5bb8 Get rid of static Atffiles and let bsd.test.mk generate them on the fly. 2010-07-13 21:13:21 +00:00
jmmv e834f57d5e Properly mark some test cases as having a cleanup routine. Stupidity of
the API?  Most likely; will revise it.

Fixes atf-run breaking when running t_psshfs.  This does not resolve the
underlying issue though, which is atf-run getting confused trying to
unmount the temporary mount point by itself (I think).  (I'm now wondering
if atf should be bothering about unmounting stuff at all.  Maybe not. It is
a tricky and uncommon thing.)
2010-07-05 16:27:08 +00:00
pooka d2c2528c3b Add a test case for PR kern/36681 demonstrating how easy it is to
get tmpfs rename to "tstile".

Note1: triggering this on any non-SMP system is not as easy (because
one system call tends to run from start to finish in one go) and
therefore I've limited it to i386 and amd64.  Incidentally, I'm
still waiting for the eternally elusive MI CPU_INFO_FOREACH (or at
least something else than a stupid macro) ...

Note2: this is a "race condition" test.  I tested it on my development
host and in qemu and it triggers pretty instantly.  But YMMV.
2010-07-04 12:43:23 +00:00
riz b8ec406166 Remove a test (that a created directory had a predictable inode number)
that no longer makes sense since the vmlocking2 branch was merged.
2010-06-07 03:43:50 +00:00
riz 94a47d543f Use atf_check to su in a couple cases, to make the test failure
easier to understand when the unprivileged user has /sbin/nologin
for a shell.
2010-06-07 03:39:41 +00:00
jmmv 6b84fb92ac atf-0.9 introduces an use.fs test-case property to allow tests to write to
their work directory.  The purpose is to be able to know which tests intend
to touch the file system and to allow a minor optimization in atf-run.

Define use.fs=true for all those tests requiring it.  (This highlights that
some tests currently require modifying the file system but conceptually
they shouldn't be... which leaves room for further improvements/cleanups
later :-)
2010-06-04 08:39:40 +00:00
pooka 067a8b527b Use rump_sys_mount() instead of ukfs_mount(). Just a few more
steps and we can have a switch for if we want to run tests against
a rump kernel or a real kernel.
2009-04-26 15:15:38 +00:00
pooka 95ab63fa91 WARNS=4 2009-04-14 10:20:22 +00:00
pooka 3df59b06ac Add atf_tc_fail_errno(), which appends strerror(errno) to the
message string.  Adding it to h_macros suggested by jmmv
2009-04-14 10:19:38 +00:00
pooka f698904d75 * convert to KNF
* pass WARNS
2009-04-08 09:11:34 +00:00
pooka d08d606875 atf_tc_fail() instead of err() 2009-04-08 09:05:16 +00:00
pooka f7bf33df40 make test duration bound by time instead of by number of rounds 2009-04-08 08:57:24 +00:00
pooka 163d880b1a add regression test for kern/41128 2009-04-07 20:51:46 +00:00
jmmv 454557d79e Adjust tests to work with the new API in ATF 0.6. 2009-01-19 07:15:46 +00:00
martin 11a6dbe728 Convert TNF licenses to new 2 clause variant 2008-04-30 13:10:46 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
jmmv d5094734ca Add tests for rillig@'s recent fix to mount_tmpfs: ensure that error messages
do not mention the source path, which is unused.
2008-02-13 14:58:42 +00:00
jmmv 5166760e85 Re-add the NetBSD CVS Id tag to the header. It just had to be quoted to
be accepted by the parser; i.e. no bug in the code :-)

Note to self: do not try to "fix" stuff the last minute before going to
sleep.
2007-12-30 09:13:32 +00:00
jmmv 24b05c38e9 Back out the change to introduce the X-NetBSD-Id header entry. For some
reason the parser does not accept its contents...  You know, one should
always test even trivial changes!

Will review this in more depth tomorrow to find the real root cause of the
problem and rule out a fix for ATF.
2007-12-29 23:02:51 +00:00
jmmv 4178bab5b6 Add the NetBSD Id tag to the Atffiles. Issue raised by pooka@ a while ago. 2007-12-26 21:04:47 +00:00
jmmv 80c834ed18 Explicitly define TESTSDIR, because the automatic deduction of its value
breaks the build if some component of NETBSDSRCDIR is a symlink.  Reported
by drochner@.
2007-11-21 15:39:33 +00:00
jmmv 9b7401e7cb Convert the regress/sys/fs/tmpfs tests to the atf
This change converts all the existing regression tests in
regress/sys/fs/tmpfs to the new framework provided by atf.  As a side
effect, this also moves all the tests programs in regress/sys/fs/tmpfs to
tests/fs/tmpfs.
2007-11-12 15:18:07 +00:00