]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
2 years agocontrib: dracut: parse-zfs: drop initqueue-finished for i/f
наб [Mon, 4 Apr 2022 16:38:07 +0000 (18:38 +0200)]
contrib: dracut: parse-zfs: drop initqueue-finished for i/f

The switch was released in dracut 009 in March 2011,
we can safely get rid of the compatibility hook

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13291

2 years agoCorrected oversight in ZERO_RANGE behavior
Rich Ercolani [Wed, 20 Apr 2022 23:07:03 +0000 (19:07 -0400)]
Corrected oversight in ZERO_RANGE behavior

It turns out, no, in fact, ZERO_RANGE and PUNCH_HOLE do
have differing semantics in some ways - in particular,
one requires KEEP_SIZE, and the other does not.

Also added a zero-range test to catch this, corrected a flaw
that made the punch-hole test succeed vacuously, and a typo
in file_write.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes #13329
Closes #13338

2 years agoFreeBSD: Fix translation from ABD to physical pages
Alexander Motin [Wed, 20 Apr 2022 23:05:38 +0000 (19:05 -0400)]
FreeBSD: Fix translation from ABD to physical pages

In hypothetical case of non-linear ABD with single segment, multiple
to page size but not aligned to it, vdev_geom_fill_unmap_cb() could
fill one page less into bio_ma array.

I am not sure it is exploitable, but better to be safe than sorry.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reported-by: Mark Johnston <markj@FreeBSD.org>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Closes #13345

2 years agoman: ... -> … again
наб [Thu, 24 Mar 2022 19:14:25 +0000 (20:14 +0100)]
man: ... -> … again

zfs-program.8 is left, but that's literal Lua syntax

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13255

2 years agorpm -> deb doesn't fail when optional packages are missing
Damian Szuberski [Wed, 20 Apr 2022 20:43:42 +0000 (22:43 +0200)]
rpm -> deb doesn't fail when optional packages are missing

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: szubersk <szuberskidamian@gmail.com>
Closes #13331
Closes #13336

2 years agoDocument zfs inherit -S's interaction with noninheritable properties
наб [Sat, 16 Apr 2022 14:07:04 +0000 (16:07 +0200)]
Document zfs inherit -S's interaction with noninheritable properties

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #11894
Closes #13335

2 years agozpool_history_unpack: return correct errno on nvlist_unpack failure
Low-power [Wed, 20 Apr 2022 20:35:44 +0000 (04:35 +0800)]
zpool_history_unpack: return correct errno on nvlist_unpack failure

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com>
Signed-off-by: WHR <msl0000023508@gmail.com>
Closes #13321

2 years agolinux: module: uninstall legacy modules on (un)installation
наб [Mon, 4 Apr 2022 11:16:31 +0000 (13:16 +0200)]
linux: module: uninstall legacy modules on (un)installation

This can be reverted once we're sure nobody's using them anymore
(post-3.0 release?)

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13274

2 years agoscripts: zfs.sh: unload zfs with dependencies
наб [Mon, 4 Apr 2022 11:08:59 +0000 (13:08 +0200)]
scripts: zfs.sh: unload zfs with dependencies

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13274

2 years agoscripts: zfs.sh: make usage make sense
наб [Mon, 4 Apr 2022 10:55:41 +0000 (12:55 +0200)]
scripts: zfs.sh: make usage make sense

We don't pass the arguments as arguments

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13274

2 years agoscripts: zfs.sh: remove cat
наб [Mon, 4 Apr 2022 10:48:47 +0000 (12:48 +0200)]
scripts: zfs.sh: remove cat

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13274

2 years agolinux: module: weld all but spl.ko into zfs.ko
наб [Thu, 31 Mar 2022 15:20:50 +0000 (17:20 +0200)]
linux: module: weld all but spl.ko into zfs.ko

Originally it was thought it would be useful to split up the kmods
by functionality.  This would allow external consumers to only load
what was needed.  However, in practice we've never had a case where
this functionality would be needed, and conversely managing multiple
kmods can be awkward.  Therefore, this change merges all but the
spl.ko kmod in to a single zfs.ko kmod.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13274

2 years agoImprove the inline descriptions of the ARC module parameters
Allan Jude [Wed, 20 Apr 2022 20:16:25 +0000 (16:16 -0400)]
Improve the inline descriptions of the ARC module parameters

These are displayed as the descriptions of the sysctl's on FreeBSD

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Allan Jude <allan@klarasystems.com>
Closes #13334

2 years agoFix style checking error introduced by zfs-mount changes
Paul Dagnelie [Tue, 19 Apr 2022 20:55:04 +0000 (13:55 -0700)]
Fix style checking error introduced by zfs-mount changes

Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tony Nguyen <tony.nguyen@delphix.com>
Signed-off-by: Paul Dagnelie <pcd@delphix.com>
Closes #13347

2 years agoLinux 5.17 compat: GENHD_FL_EXT_DEVT / GENHD_FL_NO_PART_SCAN
Brian Behlendorf [Tue, 19 Apr 2022 17:38:04 +0000 (10:38 -0700)]
Linux 5.17 compat: GENHD_FL_EXT_DEVT / GENHD_FL_NO_PART_SCAN

As of the 5.17 kernel the GENHD_FL_EXT_DEVT flag has been removed
and the GENHD_FL_NO_PART_SCAN flag renamed GENHD_FL_NO_PART. Update
zvol_alloc() to set GENHD_FL_NO_PART for the newer kernels which
is sufficient.  The behavior for prior kernels remains unchanged.

1ebe2e5f ("block: remove GENHD_FL_EXT_DEVT")
46e7eac6 ("block: rename GENHD_FL_NO_PART_SCAN to GENHD_FL_NO_PART")

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #13294
Closes #13297

2 years agoinit.d/zfs-mount: Don't fsck or mount/umount fstab entries
omni [Fri, 15 Apr 2022 21:26:44 +0000 (21:26 +0000)]
init.d/zfs-mount: Don't fsck or mount/umount fstab entries

This is better handled by existing OS toolset.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com>
Signed-off-by: omni <omni+vagant@hack.org>
Issue #7374
Closes #12780

2 years agoFix 'zpool history' sometimes fails without reporting any error
Low-power [Fri, 15 Apr 2022 21:16:07 +0000 (05:16 +0800)]
Fix 'zpool history' sometimes fails without reporting any error

The corresponding function 'zpool_get_history' in libzfs would printing
an error messages only when the ioctl call failed.

Add missing error reporting, specifically memory allocation failures
and error from 'zpool_history_unpack'.

Also avoid possibly reading of uninitialized 'err' variable in case
the requested offset pasts EOF.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com>
Signed-off-by: WHR <msl0000023508@gmail.com>
Issue #13322
Closes #13320

2 years agolibzfs: import: zpool_clear_label: bool for boolean status
наб [Thu, 7 Apr 2022 12:00:38 +0000 (14:00 +0200)]
libzfs: import: zpool_clear_label: bool for boolean status

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13304

2 years agolibzfs: import: zpool_clear_label: don't allocate another time for L2ARC header
наб [Thu, 7 Apr 2022 02:37:16 +0000 (04:37 +0200)]
libzfs: import: zpool_clear_label: don't allocate another time for L2ARC header

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13304

2 years agolibzfs: import: zpool_clear_label: actually fail if clearing l2arc header fails
наб [Thu, 7 Apr 2022 02:32:27 +0000 (04:32 +0200)]
libzfs: import: zpool_clear_label: actually fail if clearing l2arc header fails

Found with -Wunused-but-set-variable on Clang trunk

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13304

2 years agomodule: zfs: vdev_removal: remove unused num_indirect
наб [Thu, 7 Apr 2022 02:26:30 +0000 (04:26 +0200)]
module: zfs: vdev_removal: remove unused num_indirect

Found with -Wunused-but-set-variable on Clang trunk

Fixes: a1d477c24c ("OpenZFS 7614, 9064 - zfs device evacuation/removal")
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13304

2 years agotests: cmd: draid: remove unused and undocumented -v
наб [Thu, 7 Apr 2022 02:25:05 +0000 (04:25 +0200)]
tests: cmd: draid: remove unused and undocumented -v

Found with -Wunused-but-set-variable on Clang trunk

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13304

2 years agozfs(8): remove errors reported by mandoc 1.14.6
szubersk [Mon, 11 Apr 2022 12:49:08 +0000 (14:49 +0200)]
zfs(8): remove errors reported by mandoc 1.14.6

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: szubersk <szuberskidamian@gmail.com>
Closes #13315

2 years agozfs(8): add requirements towards fs names
szubersk [Mon, 11 Apr 2022 13:14:38 +0000 (15:14 +0200)]
zfs(8): add requirements towards fs names

Provide explicit requirements towards file system naming convention
in OpenZFS man pages.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: szubersk <szuberskidamian@gmail.com>
Mitigates #13310
Closes #13315

2 years agoZTS: Retry auto_spare_multiple.ksh
Brian Behlendorf [Tue, 12 Apr 2022 00:26:01 +0000 (17:26 -0700)]
ZTS: Retry auto_spare_multiple.ksh

The auto_spare_multiple.ksh test may incorrectly fail for a similar
reason as the auto_spare_shared.ksh test.  Add it to known list of
exceptions which should be retried to prevent failures in the CI.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #13318

2 years agoZTS: Retry redundancy_draid_spare[1,3].ksh
Brian Behlendorf [Mon, 11 Apr 2022 23:18:51 +0000 (16:18 -0700)]
ZTS: Retry redundancy_draid_spare[1,3].ksh

The redundancy_draid_spare1.ksh and redundancy_draid_spare3.ksh test
cases are a little to strict for the sequential resilver case.  While
unlikely it is possible that a handful of correctable checksum errors
will be reported resulting in a test failure.  Update the zts-report.py
script to allow this the test case to be retried if requested.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #13318

2 years agoFreeBSD: Return Mach error codes from VOP_(GET|PUT)PAGES
Mark Johnston [Thu, 7 Apr 2022 21:13:18 +0000 (17:13 -0400)]
FreeBSD: Return Mach error codes from VOP_(GET|PUT)PAGES

FreeBSD's memory management system uses its own error numbers and gets
confused when these VOPs return EIO.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reported-by: Peter Holm <pho@FreeBSD.org>
Signed-off-by: Mark Johnston <markj@FreeBSD.org>
Closes #13311

2 years agoFreeBSD: Parameterize ZFS_ENTER/ZFS_VERIFY_VP with an error code
Mark Johnston [Thu, 7 Apr 2022 21:11:00 +0000 (17:11 -0400)]
FreeBSD: Parameterize ZFS_ENTER/ZFS_VERIFY_VP with an error code

For legacy reasons, a couple of VOPs have to return error numbers that
don't come from the usual errno namespace.  To handle the cases where
ZFS_ENTER or ZFS_VERIFY_ZP fail, we need to be able to override the
default error return value of EIO.  Extend the macros to permit this.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Mark Johnston <markj@FreeBSD.org>
Closes #13311

2 years agoinitramfs: use `mount.zfs` instead of `mount`
Damian Szuberski [Mon, 11 Apr 2022 22:51:23 +0000 (00:51 +0200)]
initramfs: use `mount.zfs` instead of `mount`

A followup to d7a67402a85252e163aa8a9b69e7eda499db8c61

For `mount -t zfs -o opts ds mp` command line
some implementations of `mount(8)`, e. g. Busybox in Debian
work as follows:

```
newfstatat(AT_FDCWD, "ds", 0x7fff826f4ab0, 0) = -1
mount("ds", "mp", "zfs", MS_SILENT, NULL) = 0
```

The logic above skips completely `mount.zfs` and prevents us
from reading filesystem properties and applying mount options.

For comparison, the coreutils `mount(8)` implementation does:

```
openat(AT_FDCWD, "/proc/filesystems", O_RDONLY|O_CLOEXEC) = 3
// figure out that zfs is a `nodev` filesystem and look for a helper
newfstatat(AT_FDCWD, "/sbin/mount.zfs" ...) = 0
execve("/sbin/mount.zfs" ...) = 0
```

Using `mount.zfs` in initramfs would help circumvent deficiencies
of some of `mount(8)` implementations. `mount -t zfs` translates
to `mount.zfs` invocation, except for cases when explicitly disabled
by `-i`.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: szubersk <szuberskidamian@gmail.com>
Closes #13305

2 years agocmd: zed: rc: drop "should be owned by root and 0600"
наб [Tue, 5 Apr 2022 20:50:55 +0000 (22:50 +0200)]
cmd: zed: rc: drop "should be owned by root and 0600"

It doesn't matter, 0600 are Weird Permissions, and it's even weirder to
spec them for no reason ‒ it's perfectly fine if it's the usual 0:0 644,
or literally anything else, so long as unprivileged users can't edit it
(which (a) 644 accomplishes and (b) is at the administrator's
 discretion, it's not unheard of to have adm users and having it
 be 664 in that case is just as good; it's not our place to say)

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12544
Closes #13276

2 years agoPrefer ATTR_ in shared codebase over AT_
Jorgen Lundman [Tue, 5 Apr 2022 20:02:17 +0000 (05:02 +0900)]
Prefer ATTR_ in shared codebase over AT_

An earlier commit introduces AT_MODE into the shared kernel sources,
instead of the preferred existing ATTR_MODE use.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Igor Kozhukhov <igor@dilos.org>
Signed-off-by: Jorgen lundman <lundman@lundman.net>
Closes #13293

2 years agolibzfs: sendrecv: use common progress thread killer
наб [Mon, 4 Apr 2022 13:19:12 +0000 (15:19 +0200)]
libzfs: sendrecv: use common progress thread killer

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13284

2 years agolibzfs: sendrecv: always cancel progress thread in zfs_send_one()
наб [Mon, 4 Apr 2022 12:25:01 +0000 (14:25 +0200)]
libzfs: sendrecv: always cancel progress thread in zfs_send_one()

This is in line with all the other uses of the progress thread

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #11560
Closes #13284

2 years agoForbid asctime{,_r}(), gmtime(), localtime()
наб [Mon, 4 Apr 2022 12:07:36 +0000 (14:07 +0200)]
Forbid asctime{,_r}(), gmtime(), localtime()

ctime() is only used in binary main threads, which is fine

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13284

2 years agolibspl: zed: event: use localtime_r()
наб [Mon, 4 Apr 2022 12:07:26 +0000 (14:07 +0200)]
libspl: zed: event: use localtime_r()

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13284

2 years agolibspl: print_timestamp: use localtime_r()
наб [Mon, 4 Apr 2022 11:59:48 +0000 (13:59 +0200)]
libspl: print_timestamp: use localtime_r()

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13284

2 years agolibzfs: sendrecv: send_progress_thread: use localtime_r()
наб [Mon, 4 Apr 2022 11:56:16 +0000 (13:56 +0200)]
libzfs: sendrecv: send_progress_thread: use localtime_r()

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13284

2 years agozdb: standardise on ctime()
наб [Mon, 4 Apr 2022 11:55:49 +0000 (13:55 +0200)]
zdb: standardise on ctime()

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13284

2 years agoscripts: cstyle: remove unused -h
наб [Mon, 4 Apr 2022 14:12:34 +0000 (16:12 +0200)]
scripts: cstyle: remove unused -h

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13285

2 years agocstyle.1: note -g, $CI being equivalent to -g
наб [Mon, 4 Apr 2022 14:10:52 +0000 (16:10 +0200)]
cstyle.1: note -g, $CI being equivalent to -g

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13285

2 years agoscripts: cstyle: remove unused -C
наб [Mon, 4 Apr 2022 14:07:53 +0000 (16:07 +0200)]
scripts: cstyle: remove unused -C

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13285

2 years agoFix string/index variables being unflexed by default
наб [Tue, 5 Apr 2022 16:34:46 +0000 (18:34 +0200)]
Fix string/index variables being unflexed by default

I got the status backward (B_FALSE for fixed, rather than B_TRUE for
flex); before:

  $ zfs get mountpoint tarta-zoot -r
  NAME                                 PROPERTY    VALUE       SOURCE
  tarta-zoot                           mountpoint  /           local
  tarta-zoot/PAGEFILE.SYS              mountpoint  -           -
  tarta-zoot/etc                       mountpoint  /etc        inherited from tarta-zoot
  tarta-zoot/home                      mountpoint  /home       inherited from tarta-zoot
  tarta-zoot/home/xspon                mountpoint  /home/xspon  inherited from tarta-zoot
  tarta-zoot/home/nabijaczleweli       mountpoint  /home/nabijaczleweli  inherited from tarta-zoot
  tarta-zoot/home/nabijaczleweli/tftp  mountpoint  /home/nabijaczleweli/tftp  inherited from tarta-zoot
  tarta-zoot/home/root                 mountpoint  /root       local

after:

  $ zfs get mountpoint tarta-zoot -r
  NAME                                 PROPERTY    VALUE                      SOURCE
  tarta-zoot                           mountpoint  /                          local
  tarta-zoot/PAGEFILE.SYS              mountpoint  -                          -
  tarta-zoot/etc                       mountpoint  /etc                       inherited from tarta-zoot
  tarta-zoot/home                      mountpoint  /home                      inherited from tarta-zoot
  tarta-zoot/home/xspon                mountpoint  /home/xspon                inherited from tarta-zoot
  tarta-zoot/home/nabijaczleweli       mountpoint  /home/nabijaczleweli       inherited from tarta-zoot
  tarta-zoot/home/nabijaczleweli/tftp  mountpoint  /home/nabijaczleweli/tftp  inherited from tarta-zoot
  tarta-zoot/home/root                 mountpoint  /root                      local

Fixes: be8e1d81bf2b85f6f76851b7013ac54e9bf488f0 ("Flex
 non-pretty-printed properties and raw-/pretty-print remaining ones")
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13286

2 years agoLinux 5.18 compat: use address_space_operations->readahead
Riccardo Schirone [Fri, 1 Apr 2022 23:15:25 +0000 (01:15 +0200)]
Linux 5.18 compat: use address_space_operations->readahead

->readpages was removed and replaced by ->readahead. Define
zpl_readahead for kernels that don't have ->readpages.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Riccardo Schirone <rschirone91@gmail.com>
Closes #13278

2 years agoLinux 5.18 compat: blkg_tryget is moved to private headers
Riccardo Schirone [Fri, 1 Apr 2022 21:47:36 +0000 (23:47 +0200)]
Linux 5.18 compat: blkg_tryget is moved to private headers

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Riccardo Schirone <rschirone91@gmail.com>
Closes #13278

2 years agoFreeBSD: Use NDFREE_PNBUF if available
Ryan Moeller [Sat, 2 Apr 2022 19:10:55 +0000 (15:10 -0400)]
FreeBSD: Use NDFREE_PNBUF if available

NDF_ONLY_PNBUF has been removed from FreeBSD in favor of NDFREE_PNBUF.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <freqlabs@FreeBSD.org>
Closes #13277

2 years agotests: zts-report: add #13215 to known list for FreeBSD
наб [Sat, 26 Mar 2022 10:25:05 +0000 (11:25 +0100)]
tests: zts-report: add #13215 to known list for FreeBSD

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agotests: zts-report: issue numbers are numbers
наб [Sat, 26 Mar 2022 10:24:40 +0000 (11:24 +0100)]
tests: zts-report: issue numbers are numbers

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agotests: clean out more temporary files
наб [Sat, 26 Mar 2022 10:19:17 +0000 (11:19 +0100)]
tests: clean out more temporary files

What remains is a bunch of anonymous untraceable /tmp/tmp.XXXXXXXXXX
files and bak.root.receive.staff1.3835 from an error branch, testdir.1,
testdir.3, and testroot454470 (with children) in testroot

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agoscripts: zfs-tests: fix setup script detection when ran with -t /absolute
наб [Thu, 24 Mar 2022 13:47:22 +0000 (14:47 +0100)]
scripts: zfs-tests: fix setup script detection when ran with -t /absolute

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agotests: remove unused functions
наб [Thu, 24 Mar 2022 12:15:00 +0000 (13:15 +0100)]
tests: remove unused functions

As found by
  git -C tests/ grep ^function | grep -vFe '.lua:' -e '.zcp:' | while IFS=":$IFS" read -r _ _ fn _; do [ $(git -C tests/ grep -wF $fn | head -2 | wc -l) -eq 1 ] && echo $fn; done
after all rounds this comes out to, sorted:
  check_slog_state
  chgusr_exec
  cksum_files
  cleanup_pools
  compare_modes
  count_ACE
  dataset_set_defaultproperties
  ds_is_snapshot
  get_ACE
  get_group
  get_min
  get_mode
  get_owner
  get_rand_checksum
  get_rand_checksum_any
  get_rand_large_recsize
  get_rand_recsize
  get_user_group
  getitem
  indirect_vdev_mapping_size
  is_dilos
  log_noresult
  log_notinuse
  log_other
  log_timed_out
  log_uninitiated
  log_warning
  num_jobs_by_cpu
  plus_sign_check_l
  plus_sign_check_v
  record_cksum
  rwx_node
  seconds_mmp_waits_for_activity
  set_cur_usr
  setup_mirrors
  setup_raidzs
  showshares_smb
  zfs_zones_setup

This, of course, doesn't catch recursive ones, or ones that log with
their own function name as a prefix, but

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agotests: include: use already-set $UNAME instead of shelling out to uname each time
наб [Tue, 22 Mar 2022 21:18:48 +0000 (22:18 +0100)]
tests: include: use already-set $UNAME instead of shelling out to uname each time

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agotests: pam: use absolute path to module .so
наб [Wed, 23 Mar 2022 01:21:56 +0000 (02:21 +0100)]
tests: pam: use absolute path to module .so

This is a valid configuration and both (a) skips the tests if it's
unbuilt/not installed and (b) makes it work even if installed outside
the system directory (like in /u/l/l/s instead of /l/s)

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agotests: zts-report: simplify
наб [Sun, 20 Mar 2022 23:56:58 +0000 (00:56 +0100)]
tests: zts-report: simplify

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agotests: zts-report: prune unused reasons
наб [Sun, 20 Mar 2022 22:42:54 +0000 (23:42 +0100)]
tests: zts-report: prune unused reasons

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agotests: zts-report: only known-SKIP zfs_unshare_002_pos on Linux
наб [Sun, 20 Mar 2022 22:42:40 +0000 (23:42 +0100)]
tests: zts-report: only known-SKIP zfs_unshare_002_pos on Linux

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agolinux: libshare: smb: fix more than one smb_is_share_active() call
наб [Tue, 22 Mar 2022 14:50:46 +0000 (15:50 +0100)]
linux: libshare: smb: fix more than one smb_is_share_active() call

This also fixes zfs_unshare_006_pos, which exposed this

Fixes: 2f71caf2d926249920d1b9162550c56715cc6461 ("Allow zfs unshare
 <protocol> -a")

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agotests: zfs_003_neg: handle failures correctly
наб [Thu, 17 Mar 2022 20:27:11 +0000 (21:27 +0100)]
tests: zfs_003_neg: handle failures correctly

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agotests: zfs_share_005: don't fail open
наб [Wed, 23 Mar 2022 19:28:57 +0000 (20:28 +0100)]
tests: zfs_share_005: don't fail open

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agomodule: zstd: zfs_zstd: staticify zstd_ksp
наб [Wed, 16 Mar 2022 19:37:38 +0000 (20:37 +0100)]
module: zstd: zfs_zstd: staticify zstd_ksp

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agotests: lua_core: use herewords for single-line programs
наб [Wed, 23 Mar 2022 19:45:25 +0000 (20:45 +0100)]
tests: lua_core: use herewords for single-line programs

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agotests: revert back to original coredump patterns on Linux, too
наб [Wed, 16 Mar 2022 13:27:04 +0000 (14:27 +0100)]
tests: revert back to original coredump patterns on Linux, too

Otherwise, they leak past the tests and contaminate the running system,
breaking coredumps entirely

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Co-authored-by: Yannick Le Pennec <yannick.lepennec@live.fr>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agotests: zdb_args_pos.ksh: fix indentation
наб [Tue, 22 Mar 2022 14:56:45 +0000 (15:56 +0100)]
tests: zdb_args_pos.ksh: fix indentation

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agotests: move C test helpers into test cmd
наб [Tue, 22 Mar 2022 19:09:35 +0000 (20:09 +0100)]
tests: move C test helpers into test cmd

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agotests: echo-with-arguments review
наб [Tue, 15 Mar 2022 00:54:10 +0000 (01:54 +0100)]
tests: echo-with-arguments review

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agotests: rsend/send-c_props: make it chooch
наб [Wed, 23 Mar 2022 20:07:33 +0000 (21:07 +0100)]
tests: rsend/send-c_props: make it chooch

Original error:
23:47:40.59 SUCCESS: eval zfs receive -dFv testpool2 < /mnt/testroot/backdir-rsend/pool-final-p
23:47:40.61 1,23d0
23:47:40.61 < type      filesystem      -
23:47:40.61 < origin    POOL@psnap      -
23:47:40.61 < volblocksize      -       -
23:47:40.61 < acltype   nfsv4   inherited from POOL
23:47:40.61 < dnodesize legacy  inherited from POOL
23:47:40.61 < atime     off     local
23:47:40.61 < canmount  off     local
23:47:40.61 < checksum  off     local
23:47:40.61 < compression       off     local
23:47:40.61 < copies    3       local
23:47:40.61 < devices   off     local
23:47:40.61 < exec      off     local
23:47:40.61 < quota     none    default
23:47:40.61 < readonly  on      local
23:47:40.61 < recordsize        128K    local
23:47:40.61 < reservation       none    default
23:47:40.61 < setuid    off     local
23:47:40.61 < snapdir   hidden  local
23:47:40.61 < version   5       -
23:47:40.61 < volsize   -       -
23:47:40.61 < xattr     off     local
23:47:40.61 < mountpoint        /PREFIX inherited from POOL
23:47:40.61 < jailed    on      local
23:47:40.62 cannot open 'testpool2/pclone': dataset does not exist
23:47:40.62 ERROR: cmp_ds_prop testpool/pclone testpool2/pclone exited 1

So: (a) actually send all the datasets in -p mode and
    (b) drop origin for clones sent with -p:

00:38:05.46 SUCCESS: eval zfs receive -dFv testpool2 < /mnt/testroot/backdir-rsend/pool-final-p
00:38:05.48 2c2
00:38:05.48 < origin    POOL@psnap
00:38:05.48 ---
00:38:05.48 > origin    POOL
00:38:05.49 ERROR: cmp_ds_prop testpool/pclone testpool2/pclone nosource exited 1

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13250
Closes #13259

2 years agotests: rsend.kshlib: cmp_ds_prop: anonymise "inherited from" sourcces
наб [Tue, 15 Mar 2022 00:00:03 +0000 (01:00 +0100)]
tests: rsend.kshlib: cmp_ds_prop: anonymise "inherited from" sourcces

Fixes rsend_012_pos:
00:04:59.68 SUCCESS: cmp_ds_prop testpool/testfs/vol testpool2/testfs/vol nosource
00:04:59.70 4c4
00:04:59.70 < acltype   posix   inherited from testpool
00:04:59.70 ---
00:04:59.70 > acltype   posix   inherited from testpool2
00:04:59.70 11,12c11,12
00:04:59.70 < devices   off     inherited from testpool
00:04:59.70 < exec      on      inherited from testpool
00:04:59.70 ---
00:04:59.70 > devices   off     inherited from testpool2
00:04:59.70 > exec      on      inherited from testpool2
00:04:59.70 17c17
00:04:59.70 < setuid    off     inherited from testpool
00:04:59.70 ---
00:04:59.70 > setuid    off     inherited from testpool2
00:04:59.70 ERROR: cmp_ds_prop testpool@final testpool2@final exited 1

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13250
Closes #13259

2 years agotests: prune cat (ab)uses
наб [Mon, 14 Mar 2022 22:47:38 +0000 (23:47 +0100)]
tests: prune cat (ab)uses

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agotests: rsend_012_pos: backup/restore in one invocation
наб [Wed, 23 Mar 2022 20:08:55 +0000 (21:08 +0100)]
tests: rsend_012_pos: backup/restore in one invocation

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agotests: rsend.kshlib: cmp_ds_prop: allow skipping source
наб [Mon, 14 Mar 2022 22:01:57 +0000 (23:01 +0100)]
tests: rsend.kshlib: cmp_ds_prop: allow skipping source

This fixes rsend_012_pos:
20:28:50.50 SUCCESS: eval zfs receive -d -F testpool2 < /mnt/testroot/backdir-rsend/pool-final-R
20:28:50.53 4,6c4,6
20:28:50.53 < acltype   off     local
20:28:50.53 < dnodesize 4k      local
20:28:50.53 < atime     off     local
20:28:50.53 ---
20:28:50.53 > acltype   off     received
20:28:50.53 > dnodesize 4k      received
20:28:50.53 > atime     off     received
20:28:50.53 8,13c8,13
20:28:50.53 < checksum  sha256  local
20:28:50.53 < compression       off     local
20:28:50.53 < copies    2       local
20:28:50.53 < devices   on      local
20:28:50.53 < exec      on      local
20:28:50.53 < quota     1G      local
20:28:50.53 ---
20:28:50.53 > checksum  sha256  received
20:28:50.53 > compression       off     received
20:28:50.53 > copies    2       received
20:28:50.53 > devices   on      received
20:28:50.53 > exec      on      received
20:28:50.53 > quota     1G      received
20:28:50.53 15c15
20:28:50.53 < recordsize        128K    local
20:28:50.53 ---
20:28:50.53 > recordsize        128K    received
20:28:50.53 17,18c17,18
20:28:50.53 < setuid    off     local
20:28:50.53 < snapdir   visible local
20:28:50.53 ---
20:28:50.53 > setuid    off     received
20:28:50.53 > snapdir   visible received
20:28:50.53 ERROR: cmp_ds_prop testpool testpool2 exited 1

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13250
Closes #13259

2 years agotests: rsend.kshlib: cmp_ds_prop: mask out differences in origin pool
наб [Mon, 14 Mar 2022 21:50:56 +0000 (22:50 +0100)]
tests: rsend.kshlib: cmp_ds_prop: mask out differences in origin pool

This fixes rsend_011_pos:
20:28:26.94 SUCCESS: cmp_ds_prop testpool/testfs/fs1/fs2 testpool2/testfs/fs1/fs2
20:28:26.96 2c2
20:28:26.96 < origin    testpool@psnap  -
20:28:26.96 ---
20:28:26.96 > origin    testpool2@psnap -
20:28:26.97 ERROR: cmp_ds_prop testpool/pclone testpool2/pclone exited 1

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13250
Closes #13259

2 years agotests: review all wc(1) invocations
наб [Wed, 23 Mar 2022 21:01:06 +0000 (22:01 +0100)]
tests: review all wc(1) invocations

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agotests: review every instance of $?
наб [Wed, 23 Mar 2022 00:52:39 +0000 (01:52 +0100)]
tests: review every instance of $?

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agotests: include: math: simplify bc conditions, review $?
наб [Wed, 23 Mar 2022 16:54:07 +0000 (17:54 +0100)]
tests: include: math: simplify bc conditions, review $?

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agotests: clean out unused/single-use/useless commands from the list
наб [Mon, 14 Mar 2022 00:41:03 +0000 (01:41 +0100)]
tests: clean out unused/single-use/useless commands from the list

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agozed: functions: zed_log_err: forward to zed_log_msg
наб [Sun, 20 Mar 2022 01:22:43 +0000 (02:22 +0100)]
zed: functions: zed_log_err: forward to zed_log_msg

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agozed: lets: all-debug: printenv -> env
наб [Sun, 20 Mar 2022 01:22:00 +0000 (02:22 +0100)]
zed: lets: all-debug: printenv -> env

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agoscripts: zfs-tests.sh: cleanup, optimise
наб [Mon, 14 Mar 2022 00:39:03 +0000 (01:39 +0100)]
scripts: zfs-tests.sh: cleanup, optimise

The single-stage losetup doesn't work on busybox,
but then most of the testsuite doesn't

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agotests: mixed_create_failure: explicitly note the error
наб [Tue, 22 Mar 2022 21:26:00 +0000 (22:26 +0100)]
tests: mixed_create_failure: explicitly note the error

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Issue: #13215
Closes #13259

2 years agotests: logapi: don't cat excessively
наб [Sat, 12 Mar 2022 16:52:38 +0000 (17:52 +0100)]
tests: logapi: don't cat excessively

This also fixes line welding in test error output

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agotests: cmd: don't recurse
наб [Tue, 22 Mar 2022 19:09:47 +0000 (20:09 +0100)]
tests: cmd: don't recurse

This confers an >10x speedup on t/z-t/cmd builds (12s -> 1.1s),
gets rid of 23 redundant identical automake specs and gitignores,
and groups the binaries with their common headers

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agotests: {read,write}_dos_attributes: despaghettify
наб [Sat, 12 Mar 2022 03:30:22 +0000 (04:30 +0100)]
tests: {read,write}_dos_attributes: despaghettify

Also: actually accept all the flags in write_d_a

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agofgrep -> grep -F
наб [Fri, 11 Mar 2022 23:26:46 +0000 (00:26 +0100)]
fgrep -> grep -F

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agoegrep -> grep -E
наб [Fri, 11 Mar 2022 23:25:47 +0000 (00:25 +0100)]
egrep -> grep -E

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agotests: nawk -> awk
наб [Fri, 11 Mar 2022 23:13:19 +0000 (00:13 +0100)]
tests: nawk -> awk

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agotests: review every awk(1) invocation
наб [Fri, 11 Mar 2022 22:54:08 +0000 (23:54 +0100)]
tests: review every awk(1) invocation

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agotests: zfs_rollback_commit: talkative failures
наб [Fri, 11 Mar 2022 23:32:13 +0000 (00:32 +0100)]
tests: zfs_rollback_commit: talkative failures

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agotests: README: note non-default mountd requirement
наб [Thu, 10 Mar 2022 18:40:35 +0000 (19:40 +0100)]
tests: README: note non-default mountd requirement

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agotests: README: note that -d *must* be 777 for the deleg tests
наб [Wed, 9 Mar 2022 13:17:11 +0000 (14:17 +0100)]
tests: README: note that -d *must* be 777 for the deleg tests

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agotests: vdev_zaps: cleanup library
наб [Wed, 9 Mar 2022 22:54:26 +0000 (23:54 +0100)]
tests: vdev_zaps: cleanup library

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agotests: vdev_zaps_007: actually test the new pool
наб [Wed, 9 Mar 2022 22:54:07 +0000 (23:54 +0100)]
tests: vdev_zaps_007: actually test the new pool

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agotests: get rid of which
наб [Wed, 9 Mar 2022 12:52:14 +0000 (13:52 +0100)]
tests: get rid of which

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agotests: don't >-redirect without eval
наб [Wed, 9 Mar 2022 12:39:34 +0000 (13:39 +0100)]
tests: don't >-redirect without eval

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agotests: vdev_zaps_007: log_must with > must eval
наб [Wed, 9 Mar 2022 11:48:23 +0000 (12:48 +0100)]
tests: vdev_zaps_007: log_must with > must eval

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agotests: redacted_send: explicitly assume instant /dev on non-Linux
наб [Tue, 8 Mar 2022 23:56:32 +0000 (00:56 +0100)]
tests: redacted_send: explicitly assume instant /dev on non-Linux

The users spew udevadm ENOENTs on FreeBSD

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agotests: replace sum(1) with cksum(1)
наб [Tue, 8 Mar 2022 23:51:07 +0000 (00:51 +0100)]
tests: replace sum(1) with cksum(1)

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agotests: snapshot_00[15]_pos: use cksum instead of sum -r
наб [Tue, 8 Mar 2022 23:30:52 +0000 (00:30 +0100)]
tests: snapshot_00[15]_pos: use cksum instead of sum -r

This only worked by accident on FreeBSD, where sum doesn't take flags

POSIX guarantees us cksum (Ethernet CRC) ‒ use that instead

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agotests: zfs_create_nomount: undefined local -> typeset
наб [Tue, 8 Mar 2022 23:18:26 +0000 (00:18 +0100)]
tests: zfs_create_nomount: undefined local -> typeset

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agotests: mixed_create_failure: undefined log_err -> log_fail
наб [Tue, 8 Mar 2022 23:16:55 +0000 (00:16 +0100)]
tests: mixed_create_failure: undefined log_err -> log_fail

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Issue #13215
Closes #13259

2 years agotests: don't fail if no fio or python3.sysctl
наб [Tue, 8 Mar 2022 12:36:03 +0000 (13:36 +0100)]
tests: don't fail if no fio or python3.sysctl

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259

2 years agotests: nonspecific cleanup
наб [Wed, 23 Mar 2022 13:23:51 +0000 (14:23 +0100)]
tests: nonspecific cleanup

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259