From patchwork Tue May 1 15:39:45 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: 10374103 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6478D601C7 for ; Tue, 1 May 2018 15:39:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 555A728707 for ; Tue, 1 May 2018 15:39:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4A66F2872F; Tue, 1 May 2018 15:39:50 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, 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 CA50428707 for ; Tue, 1 May 2018 15:39:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755132AbeEAPjt (ORCPT ); Tue, 1 May 2018 11:39:49 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:33600 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754749AbeEAPjs (ORCPT ); Tue, 1 May 2018 11:39:48 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w41FZeXm060007; Tue, 1 May 2018 15:39:47 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-2017-10-26; bh=qzwHbTrHDvgM+5+mUBCeNHpNAdjSQfbiMeObT7wwy8M=; b=N3mHAW1qn0q5D/az1PpjnCw4ZxluImv1CUBimgjCNjoQP1BjbtEx2Rn/0dP2Fuxm6AiH sUroAN/ySckZbf03RZNhT5J0YdTLDYt59TkD5RHx6CZYzMb4fYFwkMBnyIaQ2KnwDmL6 tlGORkRTLTKX2aXJHjLwmZgZVIbHtgXXemKxyHQ2zbGAFPL22Y9xDXYNk4LDLmFDoyhq M2SZQssvFYne8z4kaGw/kT1JYYRA5mtdvcKdSfVEArl1wuFyfuYDrgGR5sf1KlDKuf4p NAgQvMQQUMX2QreBXZoGEJ9wMGw48hPv5LIpWiEzy58ul6VJrKt+nILZA/z238P9e3Ki eA== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2120.oracle.com with ESMTP id 2hmhmfg5sx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 01 May 2018 15:39:47 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w41FdkQQ013852 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 1 May 2018 15:39:46 GMT Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w41FdkWp006588; Tue, 1 May 2018 15:39:46 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 01 May 2018 08:39:46 -0700 Subject: [PATCH 4/9] generic/45[34]: check unicode names only if xfs_scrub linked against libicu From: "Darrick J. Wong" To: guaneryu@gmail.com, darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Tue, 01 May 2018 08:39:45 -0700 Message-ID: <152518918522.23023.14015169259875311012.stgit@magnolia> In-Reply-To: <152518916007.23023.4793255395982876953.stgit@magnolia> References: <152518916007.23023.4793255395982876953.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8880 signatures=668698 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-1711220000 definitions=main-1805010154 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 Since we've rewriting the xfs_scrub Unicode name scanner to use libicu to detect potential spoof names, change our check for unicode-enabled name scanning xfs_scrub to look for libicu instead of libunistring, adjust the golden output to reflect the new library's detection capabilities and make sure we get all the scrub output by invoking with -v. Note that this requires xfsprogs 4.16 or newer; since xfs_scrub is (for now) an experimental program, we don't care about breaking backwards compatibility. Signed-off-by: Darrick J. Wong --- tests/generic/453 | 5 ++--- tests/generic/454 | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/tests/generic/453 b/tests/generic/453 index f2cd81fb..6cb2a296 100755 --- a/tests/generic/453 +++ b/tests/generic/453 @@ -158,7 +158,7 @@ check_xfs_scrub() { # We only care if xfs_scrub has unicode string support... if ! type ldd > /dev/null 2>&1 || \ - ! ldd "${XFS_SCRUB_PROG}" | grep -q libunistring; then + ! ldd "${XFS_SCRUB_PROG}" | grep -q libicui18n; then return 1 fi @@ -166,9 +166,8 @@ check_xfs_scrub() { } if check_xfs_scrub; then - output="$(LC_ALL="C.UTF-8" ${XFS_SCRUB_PROG} -n "${SCRATCH_MNT}" 2>&1 | filter_scrub)" + output="$(LC_ALL="C.UTF-8" ${XFS_SCRUB_PROG} -v -n "${SCRATCH_MNT}" 2>&1 | filter_scrub)" echo "${output}" | grep -q "french_" || echo "No complaints about french e accent?" - echo "${output}" | grep -q "chinese_" || echo "No complaints about chinese width-different?" echo "${output}" | grep -q "greek_" || echo "No complaints about greek letter mess?" echo "${output}" | grep -q "arabic_" || echo "No complaints about arabic expanded string?" echo "Actual xfs_scrub output:" >> $seqres.full diff --git a/tests/generic/454 b/tests/generic/454 index c6530290..ec4fb997 100755 --- a/tests/generic/454 +++ b/tests/generic/454 @@ -154,7 +154,7 @@ check_xfs_scrub() { # We only care if xfs_scrub has unicode string support... if ! type ldd > /dev/null 2>&1 || \ - ! ldd "${XFS_SCRUB_PROG}" | grep -q libunistring; then + ! ldd "${XFS_SCRUB_PROG}" | grep -q libicui18n; then return 1 fi @@ -162,9 +162,8 @@ check_xfs_scrub() { } if check_xfs_scrub; then - output="$(LC_ALL="C.UTF-8" ${XFS_SCRUB_PROG} -n "${SCRATCH_MNT}" 2>&1 | filter_scrub)" + output="$(LC_ALL="C.UTF-8" ${XFS_SCRUB_PROG} -v -n "${SCRATCH_MNT}" 2>&1 | filter_scrub)" echo "${output}" | grep -q "french_" || echo "No complaints about french e accent?" - echo "${output}" | grep -q "chinese_" || echo "No complaints about chinese width-different?" echo "${output}" | grep -q "greek_" || echo "No complaints about greek letter mess?" echo "${output}" | grep -q "arabic_" || echo "No complaints about arabic expanded string?" echo "Actual xfs_scrub output:" >> $seqres.full