From patchwork Fri Oct 5 00:19:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 10627057 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EF3D513BB for ; Fri, 5 Oct 2018 00:19:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DDECA292FD for ; Fri, 5 Oct 2018 00:19:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D234929308; Fri, 5 Oct 2018 00:19:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 725DC292FD for ; Fri, 5 Oct 2018 00:19:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727506AbeJEHPT (ORCPT ); Fri, 5 Oct 2018 03:15:19 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:53020 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726038AbeJEHPT (ORCPT ); Fri, 5 Oct 2018 03:15:19 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w950IZYF011833; Fri, 5 Oct 2018 00:19:17 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=2m3cPwsFSXWbvi/8myUCmEGc1b5ZrdcRspVAYU9p3D4=; b=EHF+ep1ADoSI3uTxIfhdd83/rYHZv1SOJgy2MT9fof1hyQq0YRzsQF3M8ZQzvhL7jWNr PkYJdUZ1eA9h8pDPSv+kIeb8JCYMPqwSraezt7C63YAAMbsoAqRKdmI4/fjpTYw2EpqB 1qytHFqRf0hWY+KZvv2aGEp8YI0I54waQ6WhO5b/Ps9SwyBuifnZ6WzzJOaPfuQ2xZh+ XRvUNXizUycTnI7NzY3gQ5S/UH4fO92DeFtkGuJxgT+65PFD3cOQRDAwqfzy1mbNDbPu UYpY2TKd0eyNHH3U42yrkCcbaEapTT5D1tbKs/O8g2Aw1t6jOOLMbc0UWFJvvknnMoLK 6Q== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2130.oracle.com with ESMTP id 2mt0tu7key-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 05 Oct 2018 00:19:17 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w950JFAI028389 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 5 Oct 2018 00:19:16 GMT Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w950JF9e008257; Fri, 5 Oct 2018 00:19:15 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 05 Oct 2018 00:19:15 +0000 Subject: [PATCH 1/6] generic: add bfoster's alternate reproducer From: "Darrick J. Wong" To: guaneryu@gmail.com, darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, fstests@vger.kernel.org Date: Thu, 04 Oct 2018 17:19:14 -0700 Message-ID: <153869875404.26648.4736407885559502992.stgit@magnolia> In-Reply-To: <153869874763.26648.516233620615833277.stgit@magnolia> References: <153869874763.26648.516233620615833277.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9036 signatures=668706 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=873 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810050002 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Darrick J. Wong Add Brian Foster's alternate reproducer code for the mread-after-eof problem so that we increase the chances that either this or generic/499 will catch the problem. Signed-off-by: Darrick J. Wong --- tests/generic/707 | 55 +++++++++++++++++++++++++++++++++++++++++++++++++ tests/generic/707.out | 2 ++ tests/generic/group | 1 + 3 files changed, 58 insertions(+) create mode 100755 tests/generic/707 create mode 100644 tests/generic/707.out diff --git a/tests/generic/707 b/tests/generic/707 new file mode 100755 index 00000000..74193c55 --- /dev/null +++ b/tests/generic/707 @@ -0,0 +1,55 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2018 Oracle, Inc. All Rights Reserved. +# +# FS QA Test No. 707 +# +# Test a specific sequence of fsx operations that causes an mmap read past +# eof to return nonzero contents. +# +seq=`basename $0` +seqres=$RESULT_DIR/$seq +echo "QA output created by $seq" +tmp=/tmp/$$ +status=1 # failure is the default! +trap "_cleanup; exit \$status" 0 1 2 3 15 + +_cleanup() +{ + cd / + rm -f $tmp.* +} + +# get standard environment, filters and checks +. ./common/rc +. ./common/punch + +# real QA test starts here +_supported_fs generic +_supported_os Linux +_require_scratch +_require_xfs_io_command "fcollapse" +_require_xfs_io_command "fzero" + +rm -f $seqres.full + +_scratch_mkfs_sized $((1024 * 1024 * 100)) >>$seqres.full 2>&1 +_scratch_mount + +$XFS_IO_PROG -fc "pwrite 0 100m" -c fsync $SCRATCH_MNT/file >>$seqres.full 2>&1 +rm -f $SCRATCH_MNT/file + +cat >> $tmp.fsxops << ENDL +truncate 0x0 0x1f0d6 0x380e1 +write 0x1ad87 0x6c99 0x180d6 +zero_range 0x14426 0xd3aa 0x21a20 keep_size +mapread 0x1f69a 0x2386 0x21a20 +ENDL + +victim=$SCRATCH_MNT/a +touch $victim +$here/ltp/fsx --replay-ops $tmp.fsxops $victim > $tmp.output 2>&1 || cat $tmp.output + +echo "Silence is golden" +status=0 +exit diff --git a/tests/generic/707.out b/tests/generic/707.out new file mode 100644 index 00000000..8e57a1d8 --- /dev/null +++ b/tests/generic/707.out @@ -0,0 +1,2 @@ +QA output created by 707 +Silence is golden diff --git a/tests/generic/group b/tests/generic/group index 4da0e188..06b062e1 100644 --- a/tests/generic/group +++ b/tests/generic/group @@ -508,3 +508,4 @@ 503 auto quick dax punch collapse zero 504 auto quick locks 505 shutdown auto quick metadata +707 auto quick rw collapse zero