From nobody Tue Feb 14 10:48:53 2023 X-Original-To: dev-commits-src-main@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 4PGHxx4DHyz3rXW6; Tue, 14 Feb 2023 10:48:53 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGHxx3N3Bz3m8T; Tue, 14 Feb 2023 10:48:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676371733; 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=B4zuM5bVKwR0j1nv7LXdmRc4Fl1r+qmtGgmYQyx2xBA=; b=pLHSySifKEm19i4wOnnWH0pgZp4pTv4Asnuej2tcMUgonIK/e35KwuCgrba9/kHYp1wtWX F36Bko5rGQW8t0WJ15c+NouSu/8NBdqWe9jZlXww+q6Gos8k8NSC0TYalC9qy1OjxzIaR/ 2ThiKEwNtslIh1ITKChukVqv+6YFAEo+Bezc89XjVi24Kb0DOGl/2IioxOITd9oimCo+Fp S25J4IltpfwpmoV0nA50rhBVuvp1RBV1mPFcxOOCxRmDWCt6JeTGLlTtx8KciZyYAJqy0h PTXgFXRqEGYMditJqmnHti3exyt35Mz6Vjyvm/jdQlE2VVPzvJ9+Q+WTc381iA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676371733; 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=B4zuM5bVKwR0j1nv7LXdmRc4Fl1r+qmtGgmYQyx2xBA=; b=Vt9COqgoy0wn0NULliGnrZhvIbl8HWGZ6hWMnfMzXZt45+3i85QOi+kHWZlEP1wf3ZmMSk aRZqqtt8v1Wnyot39Qq06TxaeLxNrJtUtsAxxg5dKHsC4BecfiKlh7DfJ85HDJxlhbMdYj wGY8NISj0SlII4tzbs0Fb20GNYvJUk554voIYypn/hkHXk074UHN8QRQlwnoUoSMlEjYSL GoqdPFrw9cUb+18AIIwIVCBDCC5EkK5n00X9ZqhRhpfWtWhXJD675u/aAW92oA9L800gdu ZxR1zHYVZBR1KlTl6jp6+XQR8zTBfVWaj++kUnfbCeNLyZ7roP5MaGye5Wnbsw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676371733; a=rsa-sha256; cv=none; b=IGzzZPTD0mjjCnszbL1WkaBxcuTuuSpGsB8armA+J6JM+pT0mmgoP331Cn8NIOkLGQGJSU V07cj8iqivFBKXuv9vvpXpEaymfym3Npa9RZcQ88fXoXDeutxOrxC41EWB3OoGtoHlAD7u dcpZRBGCnsMOOxqhdnfYCKPe6etuTDDN80A+8lg/xwGHLR5Ts/X7z+Xw4n4qUe+EeBnxrB xpGUhyP0aTlNOEaiVK3RpNtMVA6aA0QAWyLikkLbuKOW1W811vVmAGiJk5xnG4VndxxxrI B8zmBMZ3CZ6/9CzjFW2IUGH45QGpZ1G9l+qgNgXlAoGCtkK2kCK+3NN8N1TfUQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGHxx2G84zwQT; Tue, 14 Feb 2023 10:48:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31EAmr4F028791; Tue, 14 Feb 2023 10:48:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EAmr1L028790; Tue, 14 Feb 2023 10:48:53 GMT (envelope-from git) Date: Tue, 14 Feb 2023 10:48:53 GMT Message-Id: <202302141048.31EAmr1L028790@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: 31a252876889 - main - stress2: Add UFS+SU test scenario List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 31a2528768894c46751974b7efbbfb3db0f01c5e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=31a2528768894c46751974b7efbbfb3db0f01c5e commit 31a2528768894c46751974b7efbbfb3db0f01c5e Author: Peter Holm AuthorDate: 2023-02-14 10:48:18 +0000 Commit: Peter Holm CommitDate: 2023-02-14 10:48:18 +0000 stress2: Add UFS+SU test scenario --- tools/test/stress2/misc/creat.sh | 83 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/tools/test/stress2/misc/creat.sh b/tools/test/stress2/misc/creat.sh new file mode 100755 index 000000000000..45f6b0f87301 --- /dev/null +++ b/tools/test/stress2/misc/creat.sh @@ -0,0 +1,83 @@ +#!/bin/sh + +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2023 Peter Holm +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# + +# Demonstrate incorrect "out of inodes" message with SU enabled. +# No issue seen with SU+J + +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 +. ../default.cfg + +set -eu +prog=$(basename "$0" .sh) +log=/tmp/$prog.log +s=0 +mount | grep -q "on $mntpoint " && umount $mntpoint +mdconfig -l | grep -q md$mdstart && mdconfig -d -u $mdstart + +mdconfig -a -t swap -s 100m -u $mdstart +[ $# -eq 1 ] && flags="$@" || flags="-Un" +echo "newfs $flags /dev/md$mdstart" +newfs $flags /dev/md$mdstart > /dev/null +mount /dev/md$mdstart $mntpoint +set +e + +ifree1=`df -i $mntpoint | tail -1 | awk '{print $7}'` +before=`df -i $mntpoint` +n=$(((ifree1 - 5) / 10)) +jot 10 | xargs -I% mkdir $mntpoint/% +start=`date +%s` +while [ $((`date +%s` - start)) -lt 60 ]; do + for j in `jot 10`; do + ( + jot $n | xargs -P0 -I% touch $mntpoint/$j/% + jot $n | xargs -P0 -I% rm $mntpoint/$j/% + ) & + done + wait +done 2>&1 | tee $log | head -5 +[ -s $log ] && s=3 +jot 10 | xargs -I% rmdir $mntpoint/% +umount $mntpoint; mount /dev/md$mdstart $mntpoint + +ifree2=`df -i $mntpoint | tail -1 | awk '{print $7}'` +after=`df -i $mntpoint | tail -1` +if [ $ifree1 -ne $ifree2 ]; then + echo "$before" + echo "$after" + s=1 + ls -alsrt $mntpoint | head -20 +fi + +umount $mntpoint +fsck -fy /dev/md$mdstart > $log 2>&1 +grep -Eq "WAS MODIFIED" $log && { s=2; cat $log; } + +mdconfig -d -u $mdstart +rm -f $log +exit $s