From patchwork Mon Oct 29 18:12:42 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: 10659979 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 F23E117DF for ; Mon, 29 Oct 2018 18:12:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D84E929DD0 for ; Mon, 29 Oct 2018 18:12:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CCAE629C93; Mon, 29 Oct 2018 18:12:47 +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 5B8EC29C93 for ; Mon, 29 Oct 2018 18:12:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728333AbeJ3DCb (ORCPT ); Mon, 29 Oct 2018 23:02:31 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:55840 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726532AbeJ3DCb (ORCPT ); Mon, 29 Oct 2018 23:02:31 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w9TI4P9B136944; Mon, 29 Oct 2018 18:12:44 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : mime-version : content-type; s=corp-2018-07-02; bh=Pc5Zc/oWBMGKXFG697RsjF0txdcfWvnFh1OaYREWQFY=; b=2DwurW1ALSG4N+eNYgcxGo7vMWuGUzvO/CIVdyGDSGqrWAXiwjz64KVwZanMCfK4EN3o dpaOTrqxWhtutYKvzaFxuPxqYf89V3sQf8ZFnuaHf6IOcq8C51r3B7XsA3TYdeBDMQu4 MxaB2/0Iv5wTX26IdxhGlekNlDTkIhlqad2a3sUt/7M7sIuQzeqcSbWKbSNWDR4rcvfO fgWr3kGGlt4Ba9pDJhbTHPDJQjuLVjyerVmh23jDArePrcM9I6L9a++N1nOCq0tSNfhv Zp1zbnkvZsvw960GQ2NmejQ5Xa7kauuZjKrvSueMz4/8L2Jwo/qS4poJeRiywPZuWd39 8g== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp2120.oracle.com with ESMTP id 2ncfypqexm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 29 Oct 2018 18:12:44 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w9TIChM8018568 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 29 Oct 2018 18:12:43 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 w9TIChTT022013; Mon, 29 Oct 2018 18:12:43 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 29 Oct 2018 11:12:43 -0700 Date: Mon, 29 Oct 2018 11:12:42 -0700 From: "Darrick J. Wong" To: Eryu Guan Cc: fstests , xfs Subject: [PATCH] xfs: test packaged crc32c code Message-ID: <20181029181242.GA4131@magnolia> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9061 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810290164 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Darrick J. Wong Use the new crc32selftest command in xfs_io to check the correct operation of the packaged xfsprogs, on the off chance that the packages were cross compiled on a different machine type (which means the build time test doesn't hold much water). Signed-off-by: Darrick J. Wong --- tests/xfs/734 | 44 ++++++++++++++++++++++++++++++++++++++++++++ tests/xfs/734.out | 3 +++ tests/xfs/group | 1 + 3 files changed, 48 insertions(+) create mode 100755 tests/xfs/734 create mode 100644 tests/xfs/734.out diff --git a/tests/xfs/734 b/tests/xfs/734 new file mode 100755 index 00000000..847c5bfd --- /dev/null +++ b/tests/xfs/734 @@ -0,0 +1,44 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2018, Oracle and/or its affiliates. All Rights Reserved. +# +# FS QA Test No. 734 +# +# Ensure that xfsprogs crc32 works correctly via xfs_io crc32selftest command. +# +seq=`basename "$0"` +seqres="$RESULT_DIR/$seq" +echo "QA output created by $seq" + +here=`pwd` +tmp=/tmp/$$ +status=1 # failure is the default! +trap "_cleanup; exit \$status" 0 1 2 3 15 + +_cleanup() +{ + cd / + rm -rf "$tmp".* +} + +# get standard environment, filters and checks +. ./common/rc +. ./common/filter + +# real QA test starts here +_supported_os Linux +_supported_fs xfs +_require_xfs_io_command "crc32selftest" + +rm -f "$seqres.full" + +filter_selftest() { + sed -e 's/bytes in [0-9]* usec/bytes in XXX usec/g' +} + +$XFS_IO_PROG -c 'crc32selftest' | filter_selftest + +echo "Silence is golden." +# success, all done +status=0 +exit diff --git a/tests/xfs/734.out b/tests/xfs/734.out new file mode 100644 index 00000000..f2a3fdc1 --- /dev/null +++ b/tests/xfs/734.out @@ -0,0 +1,3 @@ +QA output created by 734 +crc32c: tests passed, 225944 bytes in XXX usec +Silence is golden. diff --git a/tests/xfs/group b/tests/xfs/group index 2cec0585..de66378f 100644 --- a/tests/xfs/group +++ b/tests/xfs/group @@ -491,3 +491,4 @@ 491 auto quick fuzz 492 auto quick fuzz 493 auto quick fuzz +734 auto quick