From nobody Sun Sep 13 03:19:35 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4hjD6H2dFWz6rWvM for ; Sun, 13 Sep 2026 03:19:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hjD6H1hTnz4J2L for ; Sun, 13 Sep 2026 03:19:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789269575; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JpogN2Q3T4PiLauI6DQiNcphISE0UUoW1YLmIF/k3cE=; b=VGgy7w9MY1sdrOFU8JaCYiOy/Bxi0QYHHpi+BVkM3nKDk6xdBoVMprglyKhONVJqyMBbNG myrB9SMRtlkRdahk/77wtZ4VGoU9x/U/xETR7oFj/w1w73fLIYYMErBvXm6y3qyGbe1Nv5 kch7CkllRHuoewx7iSLNcViW45oNL8UBTUO6JnwWyUXyoTPXWAQxQ1xyRSiILvNwVu9Izr 5LatkKSWbl4QQvc39JG0J+iX9mq6sw7iKiuKJEC6Wda/U+dCMIJ/rTBhalWSLJzkPJxdy0 8kyr9kMX4rUznxu+U8wBOMx/8Uzj2kXYT640YWw77PWBiCTcJPvpZEUMCjq1sw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1789269575; b=yDp8YBtlbteSEPbDeuQzztBsHLIrlNM9J2+XlLnfdw8MzkK01NhxePQhNSQkeEIMKa4AJA CyW2CHYxCOs+39AXtHN3prYPDyXsXb8L9bX7xwlsKLummgDSvJIKaPFbR6Evaq0sSZqxYR L+UrCQqi6sPe0xpOF34kXQBYiDnCM0phHTbL7KvBJG1Sfbpxj7qcIu7G0z/KJu4RXPdrbG 1cZzlh3zXjQLJwo+qQs0ebQVp6V3VxYwLQfImRCI/jTfyedj4qyI3XASneH8QJVlFpNH05 zG75hUyySmX+FSePOzNf5ohdTLrymwH407tyu519Vav/cvIHO9v97en/sVrUhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789269575; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JpogN2Q3T4PiLauI6DQiNcphISE0UUoW1YLmIF/k3cE=; b=DuticYCOAWcLKSaiHnvXxCjbNcKENXHH0cvOl/vj1NLyCXQ9ideFWfDes/KkbC288xjuqc NsoZ2Qf8rVXx1eo3Brsyfd/63u6bQKRUojVYxdMXGcAOg32kFuUsLqjUVpwGGoi1QwWogN yHZWFqhbuX+7LpDABvmzr1jbkklXTRM4lfZuj/csqfbwifjVM1O3mMni7A+iP6ueAuUFnB nSBsAfrOH0zvcThCK/rxUm9DDLRZ/rONOh8JJozSSn30t7F5R1ZtnldBmQPhmJk2JoB0pY c38OeXQO1YolOjWKHZkkWC6mrfexFR672nmH80w7Iwb0wQtQRsW2e3xHjEOZiw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hjD6H0d8FzPNK for ; Sun, 13 Sep 2026 03:19:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 327ca by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 13 Sep 2026 03:19:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jason A. Harmening Subject: git: 5fe1964fa056 - main - stress2: add two new unionfs test scenarios List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jah X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5fe1964fa05632cb86459a64debd92f9dca37ed3 Auto-Submitted: auto-generated Date: Sun, 13 Sep 2026 03:19:35 +0000 Message-Id: <6aa61647.327ca.14a01efa@gitrepo.freebsd.org> The branch main has been updated by jah: URL: https://cgit.FreeBSD.org/src/commit/?id=5fe1964fa05632cb86459a64debd92f9dca37ed3 commit 5fe1964fa05632cb86459a64debd92f9dca37ed3 Author: Jason A. Harmening AuthorDate: 2026-09-07 17:52:44 +0000 Commit: Jason A. Harmening CommitDate: 2026-09-13 03:19:19 +0000 stress2: add two new unionfs test scenarios These exercise lookup traversal from tmpfs into unionfs, which is useful because, unlike UFS, tmpfs does not allow recursion on its vnode locks by default. unionfs22.sh exercises these lookups with a normal unionfs mount, while unionfs23.sh uses '-o below' for the unionfs mount and reproduces the panic described in PR 298201. Reviewed by: kib, markj, pho Tested by: pho Differential Revision: https://reviews.freebsd.org/D59494 --- tools/test/stress2/misc/unionfs22.sh | 77 ++++++++++++++++++++++++++++++++++++ tools/test/stress2/misc/unionfs23.sh | 77 ++++++++++++++++++++++++++++++++++++ 2 files changed, 154 insertions(+) diff --git a/tools/test/stress2/misc/unionfs22.sh b/tools/test/stress2/misc/unionfs22.sh new file mode 100755 index 000000000000..219e55e7690c --- /dev/null +++ b/tools/test/stress2/misc/unionfs22.sh @@ -0,0 +1,77 @@ +#!/bin/sh + +# +# Copyright (c) 2024 Peter Holm +# Copyright (c) 2026 Jason Harmening +# +# SPDX-License-Identifier: BSD-2-Clause +# + +# unionfs(4) test +# Variation of unionfs7.sh, but with unionfs lookup +# traversing a tmpfs mount. +# No issues seen with this test. + +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 +. ../default.cfg + +mp1=/mnt$mdstart +mp2=/mnt$((mdstart + 1)) +mp3=$mp2/unionfs + +mkdir -p $mp1 $mp2 +set -e +for i in $mp1 $mp2; do + mount | grep -q "on $i " && umount -f $i +done + +mount -o size=4g -t tmpfs dummy $mp1 +mount -o size=4g -t tmpfs dummy $mp2 +mkdir -p $mp3 + +mount -t unionfs -o noatime $mp1 $mp3 +set +e +export 'INODES=100000' + +export CTRLDIR=$mp3/stressX.control +export INCARNATIONS=10 +export LOAD=80 +export RUNDIR=$mp3/stressX +export runRUNTIME=5m +export rwLOAD=80 +export symlinkLOAD=80 + +export TESTPROGS=" +unionfs/stress2/testcases/lockf2/lockf2 +unionfs/stress2/testcases/symlink/symlink +unionfs/stress2/testcases/openat/openat +unionfs/stress2/testcases/rw/rw +unionfs/stress2/testcases/fts/fts +unionfs/stress2/testcases/link/link +unionfs/stress2/testcases/lockf/lockf +unionfs/stress2/testcases/creat/creat +unionfs/stress2/testcases/mkdir/mkdir +unionfs/stress2/testcases/rename/rename +unionfs/stress2/testcases/mkfifo/mkfifo +unionfs/stress2/testcases/dirnprename/dirnprename +unionfs/stress2/testcases/dirrename/dirrename +unionfs/stress2/testcases/swap/swap +" + +cp -r ../../stress2 $mp3 +export TESTPROGS=`echo $TESTPROGS | sed 's/\n/ /g'` + +set +e +chmod 777 $mp3 +su $testuser -c \ + "(cd $mp2; ./unionfs/stress2/testcases/run/run $TESTPROGS)" + +while mount | grep -Eq "on $mp3 .*unionfs"; do + umount $mp3 && break + sleep 5 +done +umount $mp2 +n=`find $mp1/stressX | wc -l` +[ $n -eq 1 ] && s=0 || { find $mp1/stressX -ls | head -12; s=1; } +umount $mp1 +exit $s diff --git a/tools/test/stress2/misc/unionfs23.sh b/tools/test/stress2/misc/unionfs23.sh new file mode 100755 index 000000000000..1f8b3e8090c0 --- /dev/null +++ b/tools/test/stress2/misc/unionfs23.sh @@ -0,0 +1,77 @@ +#!/bin/sh + +# +# Copyright (c) 2024 Peter Holm +# Copyright (c) 2026 Jason Harmening +# +# SPDX-License-Identifier: BSD-2-Clause +# + +# unionfs(4) test +# Variation of unionfs22.sh, but with '-o below' +# Reproduces "lockmgr_xlock_hard: recursing on non recursive lockmgr" +# panic (PR 298201) + +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 +. ../default.cfg + +mp1=/mnt$mdstart +mp2=/mnt$((mdstart + 1)) +mp3=$mp2/unionfs + +mkdir -p $mp1 $mp2 +set -e +for i in $mp1 $mp2; do + mount | grep -q "on $i " && umount -f $i +done + +mount -o size=4g -t tmpfs dummy $mp1 +mount -o size=4g -t tmpfs dummy $mp2 +mkdir -p $mp3 + +mount -t unionfs -o noatime -o below $mp1 $mp3 +set +e +export 'INODES=100000' + +export CTRLDIR=$mp3/stressX.control +export INCARNATIONS=10 +export LOAD=80 +export RUNDIR=$mp3/stressX +export runRUNTIME=5m +export rwLOAD=80 +export symlinkLOAD=80 + +export TESTPROGS=" +unionfs/stress2/testcases/lockf2/lockf2 +unionfs/stress2/testcases/symlink/symlink +unionfs/stress2/testcases/openat/openat +unionfs/stress2/testcases/rw/rw +unionfs/stress2/testcases/fts/fts +unionfs/stress2/testcases/link/link +unionfs/stress2/testcases/lockf/lockf +unionfs/stress2/testcases/creat/creat +unionfs/stress2/testcases/mkdir/mkdir +unionfs/stress2/testcases/rename/rename +unionfs/stress2/testcases/mkfifo/mkfifo +unionfs/stress2/testcases/dirnprename/dirnprename +unionfs/stress2/testcases/dirrename/dirrename +unionfs/stress2/testcases/swap/swap +" + +cp -r ../../stress2 $mp3 +export TESTPROGS=`echo $TESTPROGS | sed 's/\n/ /g'` + +set +e +chmod 777 $mp3 +su $testuser -c \ + "(cd $mp2; ./unionfs/stress2/testcases/run/run $TESTPROGS)" + +while mount | grep -Eq "on $mp3 .*unionfs"; do + umount $mp3 && break + sleep 5 +done +n=`find $mp3/stressX | wc -l` +[ $n -eq 1 ] && s=0 || { find $mp3/stressX -ls | head -12; s=1; } +umount $mp2 +umount $mp1 +exit $s