Commit Graph

480 Commits

Author SHA1 Message Date
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
martin c25f345cfe The test for PR 50608 works now, remove the expected failure. 2016-01-28 10:10:09 +00:00
christos ffeb8dbf4e Define _KERNTYPES for things that need it. 2016-01-23 21:22:45 +00:00
gson 79350377d6 Don't use a filename with an embedded newline in the create_many test
case.  Instead, add a separate test case "create_nonalphanum" for
filenames containing non-alphanumeric characters.  The bug of
PR kern/50608 now causes a failure in create_nonalphanum rather than
create_many.
2016-01-14 08:58:02 +00:00
pooka 8b742e7a22 create_many: remove PR kern/50607 xfail
Seems to have been fixed by ext2fs_lookup.c 1.79
(thanks, riastradh)
2016-01-13 12:05:49 +00:00
pooka 419929ef27 create_many:
* add xfails for ext2 and udf
  * don't try to create a subdirectory for sysvbfs
2016-01-02 12:11:30 +00:00
pooka 10c4a4e077 use a shorter filename template in previous (for v7fs) 2016-01-01 15:18:39 +00:00
pooka 596d7c2283 Add a test which creates many directory entries. 2016-01-01 15:13:57 +00:00
christos 63d557bad4 Use the original nfsd. 2015-12-23 18:42:23 +00:00
christos b9bb57fc06 ggr, make debug static. I hate that the copy of this and the original
source has diverged so much!
2015-12-23 18:10:39 +00:00
christos f0a61ce65f add get_net.c 2015-12-23 18:10:10 +00:00
christos d0b55fb388 Use the regular mountd, and include the rpcbind stuff here. 2015-11-08 21:05:39 +00:00
christos 8ca6a9a5c9 Use the regular rpcbind source now. 2015-11-08 16:38:56 +00:00
christos 72e6585119 Don't use POLL again. 2015-11-08 16:38:25 +00:00
christos 4172446a74 Remove dup copy of rpcbind sources that had grown stale. 2015-11-08 16:37:57 +00:00
christos eda86e9458 make this work with the new fdset stuff. 2015-11-08 02:45:16 +00:00
dholland 796a8727a3 Remove rubbish. 2015-08-30 18:27:26 +00:00
dholland aeaad94cd5 Fix glaringly wrong indent. 2015-08-29 19:19:43 +00:00
christos fddcbf3df7 don't abuse %m in printf
fix error messages
2015-08-21 14:19:10 +00:00