aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib/openzfs/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/openzfs/scripts')
-rwxr-xr-xsys/contrib/openzfs/scripts/mancheck.sh17
-rwxr-xr-xsys/contrib/openzfs/scripts/spdxcheck.pl5
-rwxr-xr-xsys/contrib/openzfs/scripts/zfs-helpers.sh7
-rwxr-xr-xsys/contrib/openzfs/scripts/zfs-tests.sh9
4 files changed, 30 insertions, 8 deletions
diff --git a/sys/contrib/openzfs/scripts/mancheck.sh b/sys/contrib/openzfs/scripts/mancheck.sh
index 364ad1b76286..33d7d3c7155f 100755
--- a/sys/contrib/openzfs/scripts/mancheck.sh
+++ b/sys/contrib/openzfs/scripts/mancheck.sh
@@ -11,12 +11,12 @@
# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
-# shellcheck disable=SC2086
+# shellcheck disable=SC2068,SC2086
trap 'rm -f "$stdout_file" "$stderr_file" "$result_file"' EXIT
if [ "$#" -eq 0 ]; then
- echo "Usage: $0 manpage-directory..."
+ echo "Usage: $0 <manpage-directory|manpage-file>..."
exit 1
fi
@@ -27,7 +27,16 @@ fi
IFS="
"
-files="$(find "$@" -type f -name '*[1-9]*' -not -name '.*')" || exit 1
+files="$(
+ for path in $@ ; do
+ find -L $path -type f -name '*[1-9]*' -not -name '.*'
+ done | sort | uniq
+)"
+
+if [ "$files" = "" ] ; then
+ echo no files to process! 1>&2
+ exit 1
+fi
add_excl="$(awk '
/^.\\" lint-ok:/ {
@@ -48,6 +57,4 @@ grep -vhE -e 'mandoc: outdated mandoc.db' -e 'STYLE: referenced manual not found
if [ -s "$result_file" ]; then
cat "$result_file"
exit 1
-else
- echo "no errors found"
fi
diff --git a/sys/contrib/openzfs/scripts/spdxcheck.pl b/sys/contrib/openzfs/scripts/spdxcheck.pl
index 88f5a235d70c..4d4e14368beb 100755
--- a/sys/contrib/openzfs/scripts/spdxcheck.pl
+++ b/sys/contrib/openzfs/scripts/spdxcheck.pl
@@ -83,8 +83,8 @@ my $tagged_patterns = q(
man/man?/*.?.in
# Unsuffixed programs (or generated of same)
- cmd/arcstat.in
- cmd/arc_summary
+ cmd/zarcstat.in
+ cmd/zarcsummary
cmd/dbufstat.in
cmd/zilstat.in
cmd/zpool/zpool.d/*
@@ -190,6 +190,7 @@ my @path_license_tags = (
['BSD-2-Clause OR GPL-2.0-only', 'CDDL-1.0'],
'module/icp' => ['Apache-2.0', 'CDDL-1.0'],
+ 'contrib/icp' => ['Apache-2.0', 'CDDL-1.0'],
# Python bindings are always Apache-2.0
'contrib/pyzfs' => ['Apache-2.0'],
diff --git a/sys/contrib/openzfs/scripts/zfs-helpers.sh b/sys/contrib/openzfs/scripts/zfs-helpers.sh
index b45384a9aa52..2e97d40db1c1 100755
--- a/sys/contrib/openzfs/scripts/zfs-helpers.sh
+++ b/sys/contrib/openzfs/scripts/zfs-helpers.sh
@@ -122,6 +122,13 @@ install() {
src=$1
dst=$2
+ # We may have an old symlink pointing to different ZFS workspace.
+ # Remove the old symlink if it doesn't point to our workspace.
+ if [ -h "$dst" ] && [ "$(readlink -f """$dst""")" != "$src" ] ; then
+ echo "Removing old symlink: $dst -> $(readlink """$dst""")"
+ rm "$dst"
+ fi
+
if [ -h "$dst" ]; then
echo "Symlink exists: $dst"
elif [ -e "$dst" ]; then
diff --git a/sys/contrib/openzfs/scripts/zfs-tests.sh b/sys/contrib/openzfs/scripts/zfs-tests.sh
index 04f3b6f32cb8..5a0a1a609448 100755
--- a/sys/contrib/openzfs/scripts/zfs-tests.sh
+++ b/sys/contrib/openzfs/scripts/zfs-tests.sh
@@ -38,6 +38,7 @@ DEBUG=""
CLEANUP="yes"
CLEANUPALL="no"
KMSG=""
+TIMEOUT_DEBUG=""
LOOPBACK="yes"
STACK_TRACER="no"
FILESIZE="4G"
@@ -364,6 +365,7 @@ OPTIONS:
-k Disable cleanup after test failure
-K Log test names to /dev/kmsg
-f Use files only, disables block device tests
+ -O Dump debugging info to /dev/kmsg on test timeout
-S Enable stack tracer (negative performance impact)
-c Only create and populate constrained path
-R Automatically rerun failing tests
@@ -402,7 +404,7 @@ $0 -x
EOF
}
-while getopts 'hvqxkKfScRmn:d:Ds:r:?t:T:u:I:' OPTION; do
+while getopts 'hvqxkKfScRmOn:d:Ds:r:?t:T:u:I:' OPTION; do
case $OPTION in
h)
usage
@@ -445,6 +447,9 @@ while getopts 'hvqxkKfScRmn:d:Ds:r:?t:T:u:I:' OPTION; do
export NFS=1
. "$nfsfile"
;;
+ O)
+ TIMEOUT_DEBUG="yes"
+ ;;
d)
FILEDIR="$OPTARG"
;;
@@ -773,6 +778,7 @@ msg "${TEST_RUNNER}" \
"${DEBUG:+-D}" \
"${KMEMLEAK:+-m}" \
"${KMSG:+-K}" \
+ "${TIMEOUT_DEBUG:+-O}" \
"-c \"${RUNFILES}\"" \
"-T \"${TAGS}\"" \
"-i \"${STF_SUITE}\"" \
@@ -783,6 +789,7 @@ msg "${TEST_RUNNER}" \
${DEBUG:+-D} \
${KMEMLEAK:+-m} \
${KMSG:+-K} \
+ ${TIMEOUT_DEBUG:+-O} \
-c "${RUNFILES}" \
-T "${TAGS}" \
-i "${STF_SUITE}" \