From patchwork Mon Jul 18 12:00:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kara X-Patchwork-Id: 9234457 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 CD8206075D for ; Mon, 18 Jul 2016 12:00:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BFCB6205A9 for ; Mon, 18 Jul 2016 12:00:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B49D3269A3; Mon, 18 Jul 2016 12:00:35 +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=-6.9 required=2.0 tests=BAYES_00,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 29487205A9 for ; Mon, 18 Jul 2016 12:00:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751423AbcGRMAe (ORCPT ); Mon, 18 Jul 2016 08:00:34 -0400 Received: from mx2.suse.de ([195.135.220.15]:48123 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751370AbcGRMAe (ORCPT ); Mon, 18 Jul 2016 08:00:34 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 20AB8AD59 for ; Mon, 18 Jul 2016 12:00:32 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 7C3DB1E0F0C; Mon, 18 Jul 2016 14:00:30 +0200 (CEST) From: Jan Kara To: fstests@vger.kernel.org Cc: Jan Kara Subject: [PATCH] generic/235: Use CSV format for repquota output Date: Mon, 18 Jul 2016 14:00:24 +0200 Message-Id: <1468843224-8940-1-git-send-email-jack@suse.cz> X-Mailer: git-send-email 2.6.6 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Different quota format may print additional information in repquota(8) output after standard quota information is printed and this information is separated by two empty lines. For quota formats that don't support printing any additional information these lines are not present in the output which causes false failures of the test. Switch the test to use repquota(8) CSV output format which does not have these formatting issues and in general should be more stable. Signed-off-by: Jan Kara --- tests/generic/235 | 4 ++-- tests/generic/235.out | 40 ++++++++-------------------------------- 2 files changed, 10 insertions(+), 34 deletions(-) diff --git a/tests/generic/235 b/tests/generic/235 index 59456b67c092..e2a66fd312f6 100755 --- a/tests/generic/235 +++ b/tests/generic/235 @@ -57,7 +57,7 @@ quotaon $SCRATCH_MNT 2>/dev/null touch $SCRATCH_MNT/testfile chown $qa_user:$qa_user $SCRATCH_MNT/testfile -repquota -u -g $SCRATCH_MNT | grep -v "^root" | _filter_scratch +repquota -O csv -u -g $SCRATCH_MNT | grep -v "^root" | _filter_scratch # If remount fails with this problem: # @@ -70,7 +70,7 @@ _scratch_mount "-o remount,rw" 2>&1 | tee -a $seqres.full | _filter_scratch $XFS_IO_PROG -c 'pwrite 0 8k' -c 'fsync' \ $SCRATCH_MNT/testfile >>$seqres.full 2>&1 -repquota -u -g $SCRATCH_MNT | grep -v "^root" | _filter_scratch +repquota -O csv -u -g $SCRATCH_MNT | grep -v "^root" | _filter_scratch _scratch_unmount 2>/dev/null diff --git a/tests/generic/235.out b/tests/generic/235.out index 95c10058d1cb..3053c48ce535 100644 --- a/tests/generic/235.out +++ b/tests/generic/235.out @@ -1,34 +1,10 @@ QA output created by 235 -*** Report for user quotas on device SCRATCH_DEV -Block grace time: 7days; Inode grace time: 7days - Block limits File limits -User used soft hard grace used soft hard grace ----------------------------------------------------------------------- -fsgqa -- 0 0 0 1 0 0 - - -*** Report for group quotas on device SCRATCH_DEV -Block grace time: 7days; Inode grace time: 7days - Block limits File limits -Group used soft hard grace used soft hard grace ----------------------------------------------------------------------- -fsgqa -- 0 0 0 1 0 0 - - +User,BlockStatus,FileStatus,BlockUsed,BlockSoftLimit,BlockHardLimit,BlockGrace,FileUsed,FileSoftLimit,FileHardLimit,FileGrace +fsgqa,ok,ok,0,0,0,,1,0,0, +Group,BlockStatus,FileStatus,BlockUsed,BlockSoftLimit,BlockHardLimit,BlockGrace,FileUsed,FileSoftLimit,FileHardLimit,FileGrace +fsgqa,ok,ok,0,0,0,,1,0,0, touch: cannot touch 'SCRATCH_MNT/failed': Read-only file system -*** Report for user quotas on device SCRATCH_DEV -Block grace time: 7days; Inode grace time: 7days - Block limits File limits -User used soft hard grace used soft hard grace ----------------------------------------------------------------------- -fsgqa -- 8 0 0 1 0 0 - - -*** Report for group quotas on device SCRATCH_DEV -Block grace time: 7days; Inode grace time: 7days - Block limits File limits -Group used soft hard grace used soft hard grace ----------------------------------------------------------------------- -fsgqa -- 8 0 0 1 0 0 - - +User,BlockStatus,FileStatus,BlockUsed,BlockSoftLimit,BlockHardLimit,BlockGrace,FileUsed,FileSoftLimit,FileHardLimit,FileGrace +fsgqa,ok,ok,8,0,0,,1,0,0, +Group,BlockStatus,FileStatus,BlockUsed,BlockSoftLimit,BlockHardLimit,BlockGrace,FileUsed,FileSoftLimit,FileHardLimit,FileGrace +fsgqa,ok,ok,8,0,0,,1,0,0,