Commit Graph

460 Commits

Author SHA1 Message Date
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
riastradh
03d306e2dd Apparently I fixed t_unpriv:zfs_owner and didn't notice. 2015-04-09 19:51:13 +00:00
riastradh
3d61be1880 Advisory locking for zfs. 2015-04-09 19:47:05 +00:00
riastradh
bc95daf1f6 Fix vattr_init_mask: mode is mode_t, not u_short.
Fixes fs/vfs/t_vnops:zfs_attrs test.
2015-04-09 05:32:53 +00:00
riastradh
d0319a8396 Tests claim rename(..., "x/.") yields EISDIR, so do that. Fixes zfs. 2015-04-09 05:03:58 +00:00
riastradh
8aa34a7d8b Fix return code of rmdir(nonempty) in zfs: ENOTEMPTY, not EEXIST. 2015-04-09 05:02:28 +00:00
riastradh
a26f29c67f Fix remaining read(fd, NULL, 1) cases. 2015-04-04 12:34:44 +00:00
riastradh
a9b674d150 Let I/O errors override inode update errors in UFS.
Fixes tests/fs/vfs/t_io:read_fault for UFS.
2015-03-28 17:45:47 +00:00
riastradh
7fc64193c5 This doesn't affect p2k_ffs after all, no idea why yet. 2015-03-28 16:39:31 +00:00
riastradh
9707ebf68d Test that read fails with EFAULT even if O_SYNC|O_RSYNC are set. 2015-03-28 16:17:25 +00:00
riastradh
8c0065db93 Make this run in NetBSD 6 by using st_mtimespec instead of st_mtim.
st_mtimespec is our traditional nonstandard name for what POSIX
called st_mtim in 2008, but these aren't going to run in non-NetBSD
anyway so using the nonstandard name shouldn't be an issue.
2015-03-24 23:24:55 +00:00
riastradh
1674867715 zfs tests don't actually need privileges. 2015-03-24 23:22:47 +00:00
pooka
c5d51f5087 one more MKZFS fix (how many subdirs does this place have?) 2015-01-08 04:00:31 +00:00
pooka
e8f299cad3 fix MKZFS=yes ports 2015-01-08 03:50:56 +00:00
pooka
f454f435c3 edit one more particularly well-hidden site needing -lrumpkern_sysproxy 2015-01-07 23:12:31 +00:00
pooka
0397f3a735 Move sysproxy support into a separate component, rumpkern_sysproxy,
instead of it being always provided by the rump kernel base.  This
move accomplishes two things:

1) it is no longer necessary to provide sysproxy hypercall stubs for
   platforms which do not want to use sysproxy
2) it is easier to reason about the security aspects, since configurations
   not linking the sysproxy component simply do not support remote
   system calls

discussed on rumpkernel-users
2015-01-07 22:24:03 +00:00
hannken
08aa9f9f06 Test v7fs_lstat_symlink is no longer expected to fail. 2014-12-29 15:31:44 +00:00
gson
76c3358a67 Mark v7fs_lstat_symlink as an expected failure, referencing PR kern/48864. 2014-09-09 06:51:00 +00:00
gson
dec58dec7c Add a test of symlinks with long targets. 2014-09-07 09:10:09 +00:00
gson
1beb02a6c3 Don't pass an uninitialized variable as the times[] argument of
rump_sys_utimes().  Instead, pass combinations of values representing
edge cases: the farthest possible past, the epoch, and the farthest
possible future.  Now the excessive runtime reported in PR bin/49144
occurs reliably, on multiple architectures, and not only with udf, but
also with msdosfs.
2014-08-29 17:39:18 +00:00
gson
9f88f3f33c Mark udf_lookup_complex as an expected failure, referencing PR kern/49033.
Since it does not fail reliably, force it to fail to avoid spurious failure
reports due to unexpected success.
2014-08-12 12:13:09 +00:00