From patchwork Thu Sep 21 21:34:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khazhy Kumykov X-Patchwork-Id: 817175 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-ext4-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="ekYaZGRn"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3xyqdm0Xs0z9s7v for ; Fri, 22 Sep 2017 07:35:08 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751803AbdIUVeu (ORCPT ); Thu, 21 Sep 2017 17:34:50 -0400 Received: from mail-pg0-f44.google.com ([74.125.83.44]:52294 "EHLO mail-pg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751728AbdIUVes (ORCPT ); Thu, 21 Sep 2017 17:34:48 -0400 Received: by mail-pg0-f44.google.com with SMTP id i195so4203400pgd.9 for ; Thu, 21 Sep 2017 14:34:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=W31OtfZUbKtDDnJ4ILi6keIuJ+mY2h7DEBILegTYvBA=; b=ekYaZGRnDaLGaGg5l+VV5/IQtj6oo7N8SdSIEsoRbsxmHWiD3J88hf8w/+iw8lodrJ WH4ATd90O7iahy2sxR9q+rCpD+H6p5alDdWQF2zofnxmy17YEDGLbW0Gmgr3CSoSVcH0 or42g5L5lLOWO2IWZuDvSTmUpImVwwyHxByA58vbmyngACccM0oW5zK+yq/HfegQQSaN Zy66Jg/rUb+Wxb1W2mGWTsX2O4yXsnvBKBPWJ0w5ZNOcLFHNeRb//LqgbAP7ST8fdP5T 4tusadhWQOjwg/01JRbtVrRG7fGjiOl8M1wikOXjOJBFBdUr5FwIt1RKXUW/SvmazH5y cbUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=W31OtfZUbKtDDnJ4ILi6keIuJ+mY2h7DEBILegTYvBA=; b=GfV4Dob5fKWc3aRBYV+HWoB6cadcpIxJgHQ8q/LTAW5C9G4P8Bkq2QAEjpIJ/+2DjE 8bONjwB9jWF3cE+0UG5XDGex0Jads5wS+A/e9OFv463qdQk6GgrPez+z4rtVVj1NFmwE 2vvovCs68yZK01DOgKhx0gvO7aOQ6jn7lbgGTJZWpwrfF/4lzn+JVuTSexLmAxbEZEwI mkTr0q03e61I9LxFS6vWNkcW0tO3zV+5iwyGhgI7wXbnM1TCEcRywA9nAi1BFuUIddkK +Cn0QOTce8T90z0Ljb3Zrfkb1tx3wAaQn7qbFkGZp+LAVOkDfJeq7uy8mdC2n2sO0J2R sDsA== X-Gm-Message-State: AHPjjUh15fiw4JXb9ImLjCNHYXD8TkGj+5DKBVkPzLbsbI9Z+2fKhEhb VhSryTQmH3wz8DbF1G2ZQmo6Fg== X-Google-Smtp-Source: AOwi7QBHzuk+/OgYTv/mO0reSGYGD1Fr+0INYqVYDaPAv6WtNXNLlBYO79BNPiK9I003f8MdSztqpg== X-Received: by 10.98.65.27 with SMTP id o27mr7039563pfa.205.1506029687010; Thu, 21 Sep 2017 14:34:47 -0700 (PDT) Received: from khazhy.svl.corp.google.com ([100.123.230.100]) by smtp.gmail.com with ESMTPSA id l66sm3411127pfl.156.2017.09.21.14.34.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 21 Sep 2017 14:34:45 -0700 (PDT) From: Khazhismel Kumykov To: fstests@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-ext4@vger.kernel.org, tytso@mit.edu, Khazhismel Kumykov Subject: [PATCH] generic: Add nocheck shutdown stress test Date: Thu, 21 Sep 2017 14:34:43 -0700 Message-Id: <20170921213443.41654-1-khazhy@google.com> X-Mailer: git-send-email 2.14.1.821.g8fa685d3b7-goog Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Most shutdown tests only run on filesystems with metadata journaling, so we lose coverage. Add a shutdown stress test that doesn't check for consistency, so does not require journaling. Signed-off-by: Khazhismel Kumykov --- tests/generic/999 | 84 +++++++++++++++++++++++++++++++++++++++++++++++++++ tests/generic/999.out | 2 ++ tests/generic/group | 1 + 3 files changed, 87 insertions(+) create mode 100755 tests/generic/999 create mode 100644 tests/generic/999.out diff --git a/tests/generic/999 b/tests/generic/999 new file mode 100755 index 00000000..71b9aa4c --- /dev/null +++ b/tests/generic/999 @@ -0,0 +1,84 @@ +#!/bin/bash +# FS QA Test No. 999 +# +# Shutdown stress test - exercise shutdown codepath with fsstress, +# make sure we don't BUG/WARN. Coverage for all fs with shutdown. +# +#----------------------------------------------------------------------- +# Copyright (c) 2013 Red Hat, Inc. All Rights Reserved. +# Copyright (c) 2017 Google, Inc. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it would be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +#----------------------------------------------------------------------- +# + +seq=`basename $0` +seqres=$RESULT_DIR/$seq +echo "QA output created by $seq" + +here=`pwd` +tmp=/tmp/$$ +status=1 # failure is the default! + +# get standard environment, filters and checks +. ./common/rc +. ./common/filter + +_cleanup() +{ + cd / + _scratch_unmount 2>/dev/null + rm -f $tmp.* +} +trap "_cleanup; exit \$status" 0 1 2 3 15 + +# real QA test starts here +_supported_fs generic +_supported_os Linux + +_require_scratch_nocheck +_require_scratch_shutdown +_require_command "$KILLALL_PROG" killall + +rm -f $seqres.full + +_scratch_mkfs > $seqres.full 2>&1 +_scratch_mount + +SLEEP_TIME=$((10 * $TIME_FACTOR)) +PROCS=$((4 * LOAD_FACTOR)) + +load_dir=$SCRATCH_MNT/test + +$XFS_FSR_PROG -v $load_dir >> $seqres.full 2>&1 +$FSSTRESS_PROG $FSSTRESS_AVOID -n10000000 -p $PROCS -d $load_dir >> $seqres.full 2>&1 & +sleep $SLEEP_TIME +sync + +# now shutdown and unmount +sleep 5 +$here/src/godown $load_dir +$KILLALL_PROG -q $FSSTRESS_PROG +wait + +# for some reason fsstress processes manage to live on beyond the wait? +sleep 5 + +_scratch_unmount + +echo "No output is good. Failures are loud." + +status=0 +exit diff --git a/tests/generic/999.out b/tests/generic/999.out new file mode 100644 index 00000000..68a51fe7 --- /dev/null +++ b/tests/generic/999.out @@ -0,0 +1,2 @@ +QA output created by 999 +No output is good. Failures are loud. diff --git a/tests/generic/group b/tests/generic/group index f922b496..891386ac 100644 --- a/tests/generic/group +++ b/tests/generic/group @@ -463,3 +463,4 @@ 458 auto quick clone 459 auto dangerous 460 auto quick rw +999 auto shutdown stress