From patchwork Mon Nov 12 08:01:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiao Yang X-Patchwork-Id: 10678289 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 DCD43109C for ; Mon, 12 Nov 2018 07:59:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CEC5429E62 for ; Mon, 12 Nov 2018 07:59:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C2A3029E78; Mon, 12 Nov 2018 07:59:31 +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.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 45DD929E62 for ; Mon, 12 Nov 2018 07:59:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727000AbeKLRvd (ORCPT ); Mon, 12 Nov 2018 12:51:33 -0500 Received: from mail.cn.fujitsu.com ([183.91.158.132]:24156 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727953AbeKLRvc (ORCPT ); Mon, 12 Nov 2018 12:51:32 -0500 X-IronPort-AV: E=Sophos;i="5.43,368,1503331200"; d="scan'208";a="47936517" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 12 Nov 2018 15:59:28 +0800 Received: from G08CNEXCHPEKD01.g08.fujitsu.local (unknown [10.167.33.80]) by cn.fujitsu.com (Postfix) with ESMTP id 1CF0F4B7117B; Mon, 12 Nov 2018 15:59:28 +0800 (CST) Received: from localhost.localdomain (10.167.220.128) by G08CNEXCHPEKD01.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 12 Nov 2018 15:59:32 +0800 From: Xiao Yang To: CC: , Xiao Yang Subject: [PATCH] xfs/205: Fix that b2 variable is treated as octal vaule Date: Mon, 12 Nov 2018 16:01:03 +0800 Message-ID: <1542009663-26173-1-git-send-email-yangx.jy@cn.fujitsu.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [10.167.220.128] X-yoursite-MailScanner-ID: 1CF0F4B7117B.A94A8 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: yangx.jy@cn.fujitsu.com Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Running xfs/205 triggers the following error: ---------------------------------------------- QA output created by 205 +./tests/xfs/205: line 61: 098: value too great for base (error token is "098") ... ---------------------------------------------- If b2 variable is a 2-digit number beginning with 0(e.g. 098), it will be treated as octal vaule instaed of decimal value. We try to declare it as decimal value forcely. Signed-off-by: Xiao Yang --- tests/xfs/205 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/xfs/205 b/tests/xfs/205 index 9cc9b59..9035870 100755 --- a/tests/xfs/205 +++ b/tests/xfs/205 @@ -54,7 +54,7 @@ _scratch_resvblks 1024 >> $seqres.full 2>&1 blks=$(( ($(_get_available_space $SCRATCH_MNT) / $fsblksz) - 15 )) test $blks -gt 1100 || _notrun "not enough space" b1=$(echo $blks | sed -e 's/[0-9][0-9][0-9]$/000/g') -b2=$(echo $blks | sed -e 's/^[0-9][0-9]//g') +b2=$((10#$(echo $blks | sed -e 's/^[0-9][0-9]//g'))) echo "blks: $blks b1: $b1 b2: $b2" >> $seqres.full dd if=/dev/zero of=$SCRATCH_MNT/fred bs=$fsblksz count=$((b1 - 1000)) 2>&1 | _filter_dd dd if=/dev/zero of=$SCRATCH_MNT/fred2 bs=$fsblksz count=$b2 2>&1 | _filter_dd