Commit Graph

498 Commits

Author SHA1 Message Date
christos
a587044e6f zfs needs rumpkern_sysproxy 2020-03-02 11:09:13 +00:00
christos
0dc8cda9a3 Centralize the base rump libraries into a variable used by all the other
Makefiles so that we can make changes to it centrally as needed and have
less mess. Fixes the sun2 build that needs rumpvfs after librump after
the latest changes.
2020-03-01 18:08:12 +00:00
mrg
de11d87641 introduce some common variables for use in GCC warning disables:
GCC_NO_FORMAT_TRUNCATION    -Wno-format-truncation (GCC 7/8)
GCC_NO_STRINGOP_TRUNCATION  -Wno-stringop-truncation (GCC 8)
GCC_NO_STRINGOP_OVERFLOW    -Wno-stringop-overflow (GCC 8)
GCC_NO_CAST_FUNCTION_TYPE   -Wno-cast-function-type (GCC 8)

use these to turn off warnings for most GCC-8 complaints.  many
of these are false positives, most of the real bugs are already
commited, or are yet to come.


we plan to introduce versions of (some?) of these that use the
"-Wno-error=" form, which still displays the warnings but does
not make it an error, and all of the above will be re-considered
as either being "fix me" (warning still displayed) or "warning
is wrong."
2019-10-13 07:28:04 +00:00
mrg
662908cac2 sprintf->snprintf 2019-10-05 22:06:29 +00:00
christos
38a0431bfa Restore binary compatibility by using the statvfs90 structure internally. 2019-09-23 12:00:57 +00:00
kre
f77bb6aeed Initialise the sometvs array of struct timeval that is to be used to
validate that utimes() cannot update the times of a file on a read only
filesystem.   The values are never actually used, but since
	src/sys/kern/vfs_syscalls.c 1.535
they are validated for sanity, and the syscall returns EINVAL if the
values passed are invalid (tv_usec <0 or >= 1000000).  If that happens
we don't get as far as the test which produces the EROFS that is expected
from this test (these tests - one for each filesystem type).

So, init the timeval structs (just to 0, the values will still not be
used) so that the EINVAL doesn't bite us before we're eaten by the EROFS
which is the way we're supposed to die.

If the syscall API args were labelled as "const" the compiler probably
would have caught the use of uninit'd vars and complained much sooner.
2019-09-21 14:25:42 +00:00
brad
01424baa92 The cleaner is compiled into the ATF test harness for the LFS
filesystem tests.  Use the new -J option to pass the raw device into
the cleaner.  This avoids the not rump safe getdiskrawname call and
makes sure we use an internal rump device name for cleaning.  This
should fix bin/54488.
2019-08-30 23:45:13 +00:00
gson
40aea22397 The udf_renamerace test case no longer fails due to PR kern/49046, but
it does fail due to PR kern/53865 on real hardware.
2019-08-17 09:44:01 +00:00
kamil
5d3c833b7d Avoid symbol clashes in fs/nfs/nfsservice under MKSANITIZER
Remove symbol conflicts for: __getmntinfo13
2019-08-15 08:23:45 +00:00
christos
fbf9c51ff3 fix misplaced paren 2019-07-16 21:13:28 +00:00
martin
653f037ebe PR misc/54382: whenever open(2) is called with O_CREAT, make sure to
pass an open mode argument.
2019-07-16 17:29:17 +00:00
maya
36592171e1 return return atf_no_error() instead of 0 for consistency.
suggested by moritzbuhl in https://github.com/NetBSD/src/pull/11/
2019-07-09 16:24:01 +00:00
hannken
22d3f49885 Need rumpdev_disk for rumpfs_zfs. 2019-06-11 14:00:16 +00:00
bad
48e354a3ed Get rid of all the -lrumpdev and -lrumpvfs that are no longer needed
after moving rump's mainbus from rumpdev to rumpkern.

Produces the same atf-run results as before.
2019-05-13 17:55:07 +00:00
msaitoh
659e7a3c69 s/ are are / are /
s/ a a / a /
2019-03-08 08:35:58 +00:00
mrg
8dec05958d don't check the return value of execvp() for failure to call err().
assume if it returns at all something has failed.
2019-02-01 09:06:07 +00:00
gson
0bd23f10c8 Call rump_pub_lwproc_newlwp() in the lfs cleaner thread to make its
rump system calls all use the same lwp.  Hopefully this will fix
PR kern/53884.  Also call rump_pub_lwproc_releaselwp() at the end.
2019-01-20 14:50:58 +00:00
gson
5a561c0cd0 Mark the fs/vfs/t_renamerace:udf_renamerace_dirs test case as an
expected failure referencing PR kern/53865, and force failure to avoid
reports of unexpected success as it does not realiably fail under
qemu.  This makes the treatment of udf_renamerace_dirs the same as
that of udf_renamerace, only with a different PR.  Also, make
whitespace consistent between the two.
2019-01-13 14:35:00 +00:00
hannken
61e6e59852 Have to hijack sysctl() and modctl() for zfs commands.
Should fix PR kern/53422
2018-12-16 14:04:14 +00:00
hannken
1c0c955e08 Skip zfs, it does not GOP_ALLOC.
PR kern/47656 test zfs_fillfs.
2018-11-30 09:52:39 +00:00
hannken
6ac427e315 Redo the access check for setting va_flags in zfs_netbsd_setattr().
Use user flag UF_NODUMP instead of UF_IMMUTABLE for the test as it
is the only user flag supported by all tested file systems.

PR kern/47656 test zfs_flags.
2018-11-28 10:01:28 +00:00
hannken
e4ec60fc8e Add missing access check for REMOVE into zfs_netbsd_lookup().
PR kern/47656 test zfs_dirperms.
2018-11-28 09:58:58 +00:00
hannken
5cbc5ce853 Add missing access check for setting va_Xtime into zfs_netbsd_setattr().
PR kern/47656 test zfs_times.
2018-11-28 09:57:59 +00:00
gson
036399b6f4 No semicolon after macro do ... while (0) wrapper. 2018-06-19 09:20:46 +00:00
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
c567f1919d ATF test program for PR kern/52738: check for mtime updates after rewriting
a file.
2017-11-19 21:05:26 +00:00
christos
f54caa8bd5 give it more time. 2017-05-24 15:29:51 +00:00
christos
268abfe922 there is no more UsePrivilegeSeparation 2017-05-22 21:22:30 +00:00
riastradh
460f0e63ea Gotta mark crashes on signal separately from failures... 2017-04-14 01:30:38 +00:00
riastradh
de4f8ca0e4 Mark expected failures as such.
Not exactly sure how the PRs correspond -- please fix if this is wrong!
2017-04-12 15:12:55 +00:00
maya
daa855846a Add failing test cases for PRs kern/2423, kern/3645, kern/4597 2017-03-26 18:26:05 +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
jdolecek
1e4f0c4e55 add tests for the mount update from rw to rw+log, which used to case the panic
reported in PR kern/52056
2017-03-22 21:33:06 +00:00
martin
06d5dce161 PR kern/51762: add a test program 2017-02-02 22:07:05 +00:00
hannken
a9f23b81d0 Add test for read/write to readonly update mount. 2017-01-27 10:45:11 +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
christos
25f1087ae3 more tests needing <sys/stat.h> 2017-01-10 22:36:29 +00:00
hannken
f3e32599e8 - Change vcache_reclaim() to always call VOP_INACTIVE() before VOP_RECLAIM().
When called from vrecycle() or vgone() there is a window where the refcount
  is greater than zero and another thread could get and release a reference
  that would miss VOP_INACTIVE() as the refcount doesn't drop to zero.

  Adjust test fs/puffs/t_basic:  test VOP_INACTIVE count being greater zero.

- Make vrecycle() more robust by checking v_usecount first and preventing
  further references across vn_lock().  Fixes a deadlock where one thread
  starts unmount, second thread locks a directory and allocates a vnode
  and first thread tries to vrecycle() the directory.
  First thread holds vfs_busy and wants vnode, second thread holds vnode
  and wants vfs_busy.

- With these fixes in place change cleanvnode() to use vget()/vrecycle()
  to reclaim the vnode.
2016-12-01 14:49:03 +00:00
gson
2493fe037e Incrase timeout for the benefit of the walk_list_user test case which
sometimes times out under qemu under Linux, where the timing is more
accurate than under qemu under NetBSD where the the 60 second timeout
typically takes more than 60 seconds to trigger.
2016-10-08 13:23:53 +00:00
christos
781b35a2d5 PR/51461: Mateusz Poszwa: Processes hang when attempting to read from an empty file on psshfs mount, add unit test:
When a process attempts to read from an empty file originating from
psshfs mount, it waits indefinitely. Until the hanged process is
interrupted, the mounted filesystem appears to work as expected,
except for the directory containing the empty file. Processes trying
to list that directory also hang, and cause misbehaviour of the
containing directory.  It is possible to create a chain of hanged
processes trying to read directories up to the mount point. At the
same time, psshfs generates some network traffic (around 5KB/s, in
my case). Interrupting the first hanged process causes emission of
an error message by all other hanged processes, and psshfs ceases
to generate network traffic. Subsequent trials to list any affected
directory or if one of the affected directories is the mount point
to unmount the filesystem, fail with the same error.
2016-09-05 08:53:57 +00:00
kre
7760e6f963 PR kern/49033
POSIX allows for the atime (or technically, any of the times) to be
updated as a side effect of searching a directory (allows, not requires).
The NetBSD UDF implementation apparently works that way, treating a
directory search as a read of the directory, and hence updating the
access time.   Compensate for that in the test (rather than just
expecting failure) by verifying that the atime after the directory
search is within a small margin of the atime before the search
(currently, "small" is 1 second).   We could fetch the time before
the mkdir and both stat() calls, do all of that, fetch the time after,
subtract, and require the after stat() atime to be bounded by the atime
set by the original mkdir and returned in the first stat() and that time
+ the difference in elapsed time - that would be more accurate, but is
a lot more work for little real benefit.

Should anyone be interested in doing that extra work, remember to use
monotonic time (clock_gettime(CLOCK_MOMNOTONIC, ...)) not the time of day
clock for measuring the elapsed time.

Along with this, remove the "if (udf) failure expected" and the
if (udf && we haven't failed yet) fail("random failure failed to happen")
stuff...  (the "random" would have been that sometimes the mkdir and
two lookups (stat() calls) would all occur within the same clock tick,
meaning that the atimes would all be the same.  Other times the clock
would tick somewhere between the mkdir() and the 2nd stat().)
2016-08-29 02:31:46 +00:00
christos
a530c482ac Fix static linking. 2016-08-27 08:38:58 +00:00
christos
03f6cc7066 fix wrong variable. 2016-08-21 13:23:36 +00:00
christos
0ca6f6b287 - use snprintf
- print the argument that caused the error
2016-08-20 15:48:18 +00:00
christos
02d61e3495 order network libraries properly. 2016-08-13 11:21:06 +00:00
christos
c8a27b7a24 The required initialization order for net rump net services is:
rumpnet rumpnet_net [rumpnet_netinet6] rumpnet_netinet.
We need rumpnent_net first because of if_init1() and to initialize loopback.
2016-08-13 11:20:00 +00:00
kre
976d7ab300 + -lrumpdev 2016-08-10 23:25: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
dholland
a0feec40ce Cite a relevant PR for msdos_renamerace instead of one that was fixed
several years ago.
2016-05-04 08:30:22 +00:00