From nobody Mon Nov 14 11:04:36 2022 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 4N9mfX2tRQz4dKZj; Mon, 14 Nov 2022 11:04:36 +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 4N9mfX2Bcpz3Pry; Mon, 14 Nov 2022 11:04:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668423876; 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=MnMhxxU17y3Pxi+YNEcTr1i1OXdL6La70xj6tHPo71o=; b=izRrffFWZRnk+39FGVZizWgp1D55P9eOh0CGdkCduXFs6vgC+gbPc457yYXOAeYU3LVims EMuN/Q+7zakQ4EQi98WQqQBdxf84PmttY+zrfoqv8OQckb5vVs/fyZxkffNaUjREaFtcXk fdVtLLZr68lJygUsG/U/yoGVGINqOOhqsvKVqqL71p7gbirAJmXAvpxWEmo385OUv12NlW WyPEBzYjT+6uLo1sDbbbjJGCM/FkXAV/1oQkNVPtUANTi0vketj4zYsMS9zUBQiHsQIWMb zPVURH4brVbCbL9fv+iSQTV1W2Hc8Oq1OahnhAUjpqLxGlCBeo0c4Cn72Tpb9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668423876; 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=MnMhxxU17y3Pxi+YNEcTr1i1OXdL6La70xj6tHPo71o=; b=SU2R0i8Vt0WcZ/I6tjOU9mjPXbPlQU5n/Ypndued6QkFgSj5kTY5L5q7zZeHq/vbH83+jE asADXQaK0Mq6GHLNBKiDhH4wEnQZYxNUhvhkce+pPcLaprvy5C9PvfilSUSJT65TXyqkap jSc9+F0MsIXyP+4K4yG6C6dI65FDuqJZLf0zdhoYWG/UXlK1mpjv+6tyCKsU3q4QWsqwuX BzKgKBab1Q2OZ+LkObHI29ywhc8CgP6a9Rq3jLtxY2/Htid6N48/zXZdjf1NNu4Wf0lLtX 5T1vN3PGFKpt/rh3Wpv0CdCf+lQ8vhsx+r3NGxF/jVd2vM70jPV/1e3CzHLA6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1668423876; a=rsa-sha256; cv=none; b=NdNv9AAYDj7myVV74tPH/+vvJ99/kr369a51gpE6SOaOOqypk8MO9L50jGcwciRHcpB2eG QjWYbV+iy/iZ4hfWa5x2CaBBoVz1idAc8mlu0OlijOE1DxHuESsIwq73S+60VO/welWW41 dkdu6h5UTE1CRqanZHvcpHGii3cRAWsU16CtIdxJk4bCqiz89xAwDJJMhwYOvx5nj+ztJv yfBa44DktsoTQbS0yQxiCKQhYm85hO6ZfuRgRCscC5/CB/eBvyml6RDGxKRXxpAwEMQ+mu BGY2ptqOAZO6pa2DIV3qWAslP600r5zGF6FQghIBbOiaieW2YpeO/CrdMNS5kw== 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 4N9mfX1H8HzfpF; Mon, 14 Nov 2022 11:04:36 +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 2AEB4ats012832; Mon, 14 Nov 2022 11:04:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2AEB4aEt012831; Mon, 14 Nov 2022 11:04:36 GMT (envelope-from git) Date: Mon, 14 Nov 2022 11:04:36 GMT Message-Id: <202211141104.2AEB4aEt012831@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: 9e16087e361f - main - stress2: Added a new SU+J + snapshot 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: 9e16087e361f82071258ea16bd8a62a2ad525f4d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=9e16087e361f82071258ea16bd8a62a2ad525f4d commit 9e16087e361f82071258ea16bd8a62a2ad525f4d Author: Peter Holm AuthorDate: 2022-11-14 11:03:57 +0000 Commit: Peter Holm CommitDate: 2022-11-14 11:03:57 +0000 stress2: Added a new SU+J + snapshot test scenario --- tools/test/stress2/misc/suj36.sh | 84 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) diff --git a/tools/test/stress2/misc/suj36.sh b/tools/test/stress2/misc/suj36.sh new file mode 100755 index 000000000000..8eda43bbdd87 --- /dev/null +++ b/tools/test/stress2/misc/suj36.sh @@ -0,0 +1,84 @@ +#!/bin/sh + +# +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright (c) 2022 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. +# + +# SU+J and snapshots + +# "panic: handle_disk_io_initiation: Unexpected type jnewblk" seen +# https://people.freebsd.org/~pho/stress/log/log0392.txt + +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 + +. ../default.cfg + +set -eu +prog=$(basename "$0" .sh) +log=/tmp/$prog.log + +mount | grep "on $mntpoint " | grep -q /dev/md && umount -f $mntpoint +[ -c /dev/md$mdstart ] && mdconfig -d -u $mdstart +mdconfig -a -t swap -s 5g -u $mdstart +[ "$newfs_flags" = "-U" ] && newfs_flags="-j" +newfs $newfs_flags md$mdstart > /dev/null +mount /dev/md$mdstart $mntpoint +chmod 777 $mntpoint + +export LOAD=80 +export rwLOAD=80 +export runRUNTIME=10m +export RUNDIR=$mntpoint/stressX +export CTRLDIR=$mntpoint/stressX.control +export MAXSWAPPCT=80 +export TESTPROGS=`cd ..; find testcases/ -perm -1 -type f | \ + egrep -Ev "/run/|/badcode/|/pty/|/shm/|/socket/|sysctl|tcp|thr|udp"` + +su $testuser -c 'cd ..; ./testcases/run/run $TESTPROGS' > /dev/null & + +sleep 5 +for i in `jot 10`; do + for j in `jot 5`; do + rm -f $mntpoint/.snap/snap.$j + mksnap_ffs $mntpoint $mntpoint/.snap/snap.$j + sleep 10 + done + sleep 10 +done +wait + +../tools/killall.sh +for i in `jot 6`; do + mount | grep -q "on $mntpoint " || break + umount $mntpoint && break || sleep 10 + [ $i -eq 6 ] && + { echo FATAL; fstat -mf $mntpoint; exit 1; } +done +fsck_ffs -fy /dev/md$mdstart > $log 2>&1; s=$? +grep -q "WAS MODIFIED" $log && { tail -12 $log; s=100; } +mdconfig -d -u $mdstart +rm -f $log +exit $s