Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test clean-out from #13165 #13259

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
05eae1c
tests: standardise on no-arg uname with *) case for illumos
nabijaczleweli Mar 3, 2022
938d340
tests: zfs_unshare_001_pos: print which filesystem failed
nabijaczleweli Mar 3, 2022
945cdf2
tests: don't always skip zfs_unshare tests on FreeBSD
nabijaczleweli Mar 5, 2022
8e63af2
tests: don't use share/unshare exportfs aliases, support FreeBSD NFS
nabijaczleweli Mar 6, 2022
29d947b
zfs: simplify usage_prop_cb values
nabijaczleweli Mar 8, 2022
bd2198e
zfs, zpool: safe_malloc() duplicate argv
nabijaczleweli Mar 8, 2022
97701b9
tests: zfs_unshare_006: log_unsupported iff usershares are actually off
nabijaczleweli Mar 11, 2022
59ef554
tests: zfs_share_concurrent_shares: don't use log_musts in subprocesses
nabijaczleweli Mar 23, 2022
a85030c
tests: nonspecific cleanup
nabijaczleweli Mar 23, 2022
10ba242
tests: don't fail if no fio or python3.sysctl
nabijaczleweli Mar 8, 2022
9077b63
tests: mixed_create_failure: undefined log_err -> log_fail
nabijaczleweli Mar 8, 2022
8e95600
tests: zfs_create_nomount: undefined local -> typeset
nabijaczleweli Mar 8, 2022
2ce5d74
tests: snapshot_00[15]_pos: use cksum instead of sum -r
nabijaczleweli Mar 8, 2022
bdb0ca6
tests: replace sum(1) with cksum(1)
nabijaczleweli Mar 8, 2022
fa07bcb
tests: redacted_send: explicitly assume instant /dev on non-Linux
nabijaczleweli Mar 8, 2022
278f1da
tests: vdev_zaps_007: log_must with > must eval
nabijaczleweli Mar 9, 2022
c052939
tests: don't >-redirect without eval
nabijaczleweli Mar 9, 2022
a2e4662
tests: get rid of which
nabijaczleweli Mar 9, 2022
7ec4171
tests: vdev_zaps_007: actually test the new pool
nabijaczleweli Mar 9, 2022
78b543f
tests: vdev_zaps: cleanup library
nabijaczleweli Mar 9, 2022
e85a827
tests: README: note that -d *must* be 777 for the deleg tests
nabijaczleweli Mar 9, 2022
d8374eb
tests: README: note non-default mountd requirement
nabijaczleweli Mar 10, 2022
44ba8ed
tests: zfs_rollback_commit: talkative failures
nabijaczleweli Mar 11, 2022
43cb8be
tests: review every awk(1) invocation
nabijaczleweli Mar 11, 2022
7c6730e
tests: nawk -> awk
nabijaczleweli Mar 11, 2022
0c205ec
egrep -> grep -E
nabijaczleweli Mar 11, 2022
7f45f8d
fgrep -> grep -F
nabijaczleweli Mar 11, 2022
09f1df1
tests: {read,write}_dos_attributes: despaghettify
nabijaczleweli Mar 12, 2022
6eb2c40
tests: cmd: don't recurse
nabijaczleweli Mar 22, 2022
1873fcd
tests: logapi: don't cat excessively
nabijaczleweli Mar 12, 2022
a867ede
tests: mixed_create_failure: explicitly note the error
nabijaczleweli Mar 22, 2022
50638af
scripts: zfs-tests.sh: cleanup, optimise
nabijaczleweli Mar 14, 2022
4a460dd
zed: lets: all-debug: printenv -> env
nabijaczleweli Mar 20, 2022
f75c7af
zed: functions: zed_log_err: forward to zed_log_msg
nabijaczleweli Mar 20, 2022
6bfce00
tests: clean out unused/single-use/useless commands from the list
nabijaczleweli Mar 14, 2022
e37ca22
tests: include: math: simplify bc conditions, review $?
nabijaczleweli Mar 23, 2022
3ecd385
tests: review every instance of $?
nabijaczleweli Mar 23, 2022
2651e05
tests: review all wc(1) invocations
nabijaczleweli Mar 23, 2022
907eab0
tests: rsend.kshlib: cmp_ds_prop: mask out differences in origin pool
nabijaczleweli Mar 14, 2022
586486f
tests: rsend.kshlib: cmp_ds_prop: allow skipping source
nabijaczleweli Mar 14, 2022
2f3c656
tests: rsend_012_pos: backup/restore in one invocation
nabijaczleweli Mar 23, 2022
76cc1b6
tests: prune cat (ab)uses
nabijaczleweli Mar 14, 2022
91b7181
tests: rsend.kshlib: cmp_ds_prop: anonymise "inherited from" sourcces
nabijaczleweli Mar 15, 2022
bc73a4a
tests: rsend/send-c_props: make it chooch
nabijaczleweli Mar 23, 2022
6f77acf
tests: echo-with-arguments review
nabijaczleweli Mar 15, 2022
cdc4edb
tests: move C test helpers into test cmd
nabijaczleweli Mar 22, 2022
b7f9a1e
tests: zdb_args_pos.ksh: fix indentation
nabijaczleweli Mar 22, 2022
ee3c816
tests: revert back to original coredump patterns on Linux, too
nabijaczleweli Mar 16, 2022
8ca68dd
tests: lua_core: use herewords for single-line programs
nabijaczleweli Mar 23, 2022
905d45b
module: zstd: zfs_zstd: staticify zstd_ksp
nabijaczleweli Mar 16, 2022
e6d6ce4
tests: zfs_share_005: don't fail open
nabijaczleweli Mar 23, 2022
cac7665
tests: zfs_003_neg: handle failures correctly
nabijaczleweli Mar 17, 2022
c9bdd82
linux: libshare: smb: fix more than one smb_is_share_active() call
nabijaczleweli Mar 22, 2022
ab24030
tests: zts-report: only known-SKIP zfs_unshare_002_pos on Linux
nabijaczleweli Mar 20, 2022
7a5be54
tests: zts-report: prune unused reasons
nabijaczleweli Mar 20, 2022
a75b896
tests: zts-report: simplify
nabijaczleweli Mar 20, 2022
8b043ae
tests: pam: use absolute path to module .so
nabijaczleweli Mar 23, 2022
249d2c8
tests: include: use already-set $UNAME instead of shelling out to una…
nabijaczleweli Mar 22, 2022
2fa94d0
tests: remove unused functions
nabijaczleweli Mar 24, 2022
7f6f520
scripts: zfs-tests: fix setup script detection when ran with -t /abso…
nabijaczleweli Mar 24, 2022
c735208
tests: clean out more temporary files
nabijaczleweli Mar 26, 2022
82ee487
tests: zts-report: issue numbers are numbers
nabijaczleweli Mar 26, 2022
27858b0
tests: zts-report: add #13215 to known list for FreeBSD
nabijaczleweli Mar 26, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion cmd/zed/zed.d/all-debug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ zed_exit_if_ignoring_this_event

zed_lock "${ZED_DEBUG_LOG}"
{
printenv | sort
env | sort
echo
} 1>&"${ZED_FLOCK_FD}"
zed_unlock "${ZED_DEBUG_LOG}"
Expand Down
3 changes: 1 addition & 2 deletions cmd/zed/zed.d/zed-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ zed_log_msg()
#
zed_log_err()
{
logger -p "${ZED_SYSLOG_PRIORITY}" -t "${ZED_SYSLOG_TAG}" -- "error:" \
"${0##*/}:""${ZEVENT_EID:+" eid=${ZEVENT_EID}:"}" "$@"
zed_log_msg "error: ${0##*/}:""${ZEVENT_EID:+" eid=${ZEVENT_EID}:"}" "$@"
}


Expand Down
7 changes: 2 additions & 5 deletions cmd/zfs/zfs_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,10 +486,7 @@ usage_prop_cb(int prop, void *cb)
else
(void) fprintf(fp, " NO ");

if (zfs_prop_values(prop) == NULL)
(void) fprintf(fp, "-\n");
else
(void) fprintf(fp, "%s\n", zfs_prop_values(prop));
(void) fprintf(fp, "%s\n", zfs_prop_values(prop) ?: "-");

return (ZPROP_CONT);
}
Expand Down Expand Up @@ -8702,7 +8699,7 @@ main(int argc, char **argv)
* Many commands modify input strings for string parsing reasons.
* We create a copy to protect the original argv.
*/
newargv = malloc((argc + 1) * sizeof (newargv[0]));
newargv = safe_malloc((argc + 1) * sizeof (newargv[0]));
for (i = 0; i < argc; i++)
newargv[i] = strdup(argv[i]);
newargv[argc] = NULL;
Expand Down
2 changes: 1 addition & 1 deletion cmd/zpool/zpool_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -10924,7 +10924,7 @@ main(int argc, char **argv)
* Many commands modify input strings for string parsing reasons.
* We create a copy to protect the original argv.
*/
newargv = malloc((argc + 1) * sizeof (newargv[0]));
newargv = safe_malloc((argc + 1) * sizeof (newargv[0]));
for (i = 0; i < argc; i++)
newargv[i] = strdup(argv[i]);
newargv[argc] = NULL;
Expand Down
2 changes: 1 addition & 1 deletion config/kernel-global_page_state.m4
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ dnl #
AC_DEFUN([ZFS_AC_KERNEL_ENUM_MEMBER], [
AC_MSG_CHECKING([whether enum $2 contains $1])
AS_IF([AC_TRY_COMMAND(
"${srcdir}/scripts/enum-extract.pl" "$2" "$3" | egrep -qx $1)],[
"${srcdir}/scripts/enum-extract.pl" "$2" "$3" | grep -Eqx $1)],[
AC_MSG_RESULT([yes])
AC_DEFINE(m4_join([_], [ZFS_ENUM], m4_toupper($2), $1), 1,
[enum $2 contains $1])
Expand Down
6 changes: 3 additions & 3 deletions config/kernel.m4
Original file line number Diff line number Diff line change
Expand Up @@ -392,11 +392,11 @@ AC_DEFUN([ZFS_AC_KERNEL], [
utsrelease1=$kernelbuild/include/linux/version.h
utsrelease2=$kernelbuild/include/linux/utsrelease.h
utsrelease3=$kernelbuild/include/generated/utsrelease.h
AS_IF([test -r $utsrelease1 && fgrep -q UTS_RELEASE $utsrelease1], [
AS_IF([test -r $utsrelease1 && grep -qF UTS_RELEASE $utsrelease1], [
utsrelease=$utsrelease1
], [test -r $utsrelease2 && fgrep -q UTS_RELEASE $utsrelease2], [
], [test -r $utsrelease2 && grep -qF UTS_RELEASE $utsrelease2], [
utsrelease=$utsrelease2
], [test -r $utsrelease3 && fgrep -q UTS_RELEASE $utsrelease3], [
], [test -r $utsrelease3 && grep -qF UTS_RELEASE $utsrelease3], [
utsrelease=$utsrelease3
])

Expand Down
2 changes: 1 addition & 1 deletion config/zfs-build.m4
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ AC_DEFUN([ZFS_AC_DEBUG_KMEM_TRACKING], [
])

AC_DEFUN([ZFS_AC_DEBUG_INVARIANTS_DETECT_FREEBSD], [
AS_IF([sysctl -n kern.conftxt | fgrep -qx $'options\tINVARIANTS'],
AS_IF([sysctl -n kern.conftxt | grep -Fqx $'options\tINVARIANTS'],
[enable_invariants="yes"],
[enable_invariants="no"])
])
Expand Down
34 changes: 0 additions & 34 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -201,40 +201,6 @@ AC_CONFIG_FILES([
tests/zfs-tests/Makefile
tests/zfs-tests/callbacks/Makefile
tests/zfs-tests/cmd/Makefile
tests/zfs-tests/cmd/badsend/Makefile
tests/zfs-tests/cmd/btree_test/Makefile
tests/zfs-tests/cmd/chg_usr_exec/Makefile
tests/zfs-tests/cmd/devname2devid/Makefile
tests/zfs-tests/cmd/draid/Makefile
tests/zfs-tests/cmd/dir_rd_update/Makefile
tests/zfs-tests/cmd/file_check/Makefile
tests/zfs-tests/cmd/file_trunc/Makefile
tests/zfs-tests/cmd/file_write/Makefile
tests/zfs-tests/cmd/get_diff/Makefile
tests/zfs-tests/cmd/getversion/Makefile
tests/zfs-tests/cmd/largest_file/Makefile
tests/zfs-tests/cmd/libzfs_input_check/Makefile
tests/zfs-tests/cmd/mkbusy/Makefile
tests/zfs-tests/cmd/mkfile/Makefile
tests/zfs-tests/cmd/mkfiles/Makefile
tests/zfs-tests/cmd/mktree/Makefile
tests/zfs-tests/cmd/mmap_exec/Makefile
tests/zfs-tests/cmd/mmap_libaio/Makefile
tests/zfs-tests/cmd/mmap_seek/Makefile
tests/zfs-tests/cmd/mmapwrite/Makefile
tests/zfs-tests/cmd/nvlist_to_lua/Makefile
tests/zfs-tests/cmd/randfree_file/Makefile
tests/zfs-tests/cmd/randwritecomp/Makefile
tests/zfs-tests/cmd/readmmap/Makefile
tests/zfs-tests/cmd/read_dos_attributes/Makefile
tests/zfs-tests/cmd/rename_dir/Makefile
tests/zfs-tests/cmd/rm_lnkcnt_zero_file/Makefile
tests/zfs-tests/cmd/send_doall/Makefile
tests/zfs-tests/cmd/stride_dd/Makefile
tests/zfs-tests/cmd/threadsappend/Makefile
tests/zfs-tests/cmd/user_ns_exec/Makefile
tests/zfs-tests/cmd/write_dos_attributes/Makefile
tests/zfs-tests/cmd/xattrtest/Makefile
tests/zfs-tests/include/Makefile
tests/zfs-tests/tests/Makefile
tests/zfs-tests/tests/functional/Makefile
Expand Down
2 changes: 2 additions & 0 deletions contrib/pyzfs/libzfs_core/test/test_libzfs_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1903,6 +1903,8 @@ def test_send_to_ro_file(self):
with self.assertRaises(lzc_exc.StreamIOError) as ctx:
lzc.lzc_send(snap, None, fd)
os.close(fd)
os.unlink(output.name)

self.assertEqual(ctx.exception.errno, errno.EBADF)

def test_recv_full(self):
Expand Down
20 changes: 5 additions & 15 deletions lib/libshare/os/linux/smb.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,6 @@ smb_disable_share_one(const char *sharename)
static int
smb_disable_share(sa_share_impl_t impl_share)
{
smb_share_t *shares = smb_shares;

if (!smb_available()) {
/*
* The share can't possibly be active, so nothing
Expand All @@ -333,12 +331,9 @@ smb_disable_share(sa_share_impl_t impl_share)
return (SA_OK);
}

while (shares != NULL) {
if (strcmp(impl_share->sa_mountpoint, shares->path) == 0)
return (smb_disable_share_one(shares->name));

shares = shares->next;
}
for (const smb_share_t *i = smb_shares; i != NULL; i = i->next)
if (strcmp(impl_share->sa_mountpoint, i->path) == 0)
return (smb_disable_share_one(i->name));

return (SA_OK);
}
Expand All @@ -362,21 +357,16 @@ smb_validate_shareopts(const char *shareopts)
static boolean_t
smb_is_share_active(sa_share_impl_t impl_share)
{
smb_share_t *iter = smb_shares;

if (!smb_available())
return (B_FALSE);

/* Retrieve the list of (possible) active shares */
smb_retrieve_shares();

while (iter != NULL) {
if (strcmp(impl_share->sa_mountpoint, iter->path) == 0)
for (const smb_share_t *i = smb_shares; i != NULL; i = i->next)
if (strcmp(impl_share->sa_mountpoint, i->path) == 0)
return (B_TRUE);

iter = iter->next;
}

return (B_FALSE);
}

Expand Down
2 changes: 1 addition & 1 deletion module/zstd/zfs_zstd.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
#include "lib/zstd.h"
#include "lib/common/zstd_errors.h"

kstat_t *zstd_ksp = NULL;
static kstat_t *zstd_ksp = NULL;

typedef struct zstd_stats {
kstat_named_t zstd_stat_alloc_fail;
Expand Down
Loading