From patchwork Thu Dec 22 01:24:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Sandeen X-Patchwork-Id: 9483981 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 7A6E3601D6 for ; Thu, 22 Dec 2016 01:24:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6CEFD280FC for ; Thu, 22 Dec 2016 01:24:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6072F28481; Thu, 22 Dec 2016 01:24:20 +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 EA70B28422 for ; Thu, 22 Dec 2016 01:24:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965113AbcLVBYP (ORCPT ); Wed, 21 Dec 2016 20:24:15 -0500 Received: from sandeen.net ([63.231.237.45]:35898 "EHLO sandeen.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965112AbcLVBYL (ORCPT ); Wed, 21 Dec 2016 20:24:11 -0500 Received: from [10.0.0.4] (erlite [10.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTPSA id F12D89D; Wed, 21 Dec 2016 19:23:57 -0600 (CST) Subject: [PATCH 2/2] common: add _require_getnextquota helper To: Eric Sandeen , fstests References: <8c91051e-8a78-cb20-d926-ea86e5b4645a@sandeen.net> From: Eric Sandeen Message-ID: Date: Wed, 21 Dec 2016 19:24:10 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <8c91051e-8a78-cb20-d926-ea86e5b4645a@sandeen.net> Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add a helper to determine if the kernel supports the GETNEXTQUOTA quotactl. Signed-off-by: Eric Sandeen --- -- 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/common/quota b/common/quota index d9bb8d9..d4ae861 100644 --- a/common/quota +++ b/common/quota @@ -109,6 +109,16 @@ _require_prjquota() } # +# Do we have GETNEXTQUOTA? Querying ID 0 should work. +# +_require_getnextquota() +{ + _require_test_program "test-nextquota" + $here/src/test-nextquota -i 0 -u -d $SCRATCH_DEV &> $seqres.full || \ + _notrun "No GETNEXTQUOTA support" +} + +# # ext4 (for now) is unique in that we must enable the project quota feature # prior to mount. This is a relatively new feature ... _scratch_enable_pquota() diff --git a/tests/generic/244 b/tests/generic/244 index 36c632e..0c64330 100755 --- a/tests/generic/244 +++ b/tests/generic/244 @@ -59,10 +59,7 @@ _scratch_mkfs >> $seqres.full 2>&1 TYPES="u g" MOUNT_OPTIONS="-o usrquota,grpquota" _qmount - -# Ok, do we even have GETNEXTQUOTA? Querying ID 0 should work. -$here/src/test-nextquota -i 0 -u -d $SCRATCH_DEV &> $seqres.full || \ - _notrun "No GETNEXTQUOTA support" +_require_getnextquota echo "Launch all quotas" diff --git a/tests/generic/395 b/tests/generic/395 index cc4a93e..151229d 100755 --- a/tests/generic/395 +++ b/tests/generic/395 @@ -57,12 +57,8 @@ _require_scratch _scratch_mkfs >> $seqres.full 2>&1 MOUNT_OPTIONS="-o usrquota,grpquota" - _qmount - -# Ok, do we even have GETNEXTQUOTA? Querying ID 0 should work. -$here/src/test-nextquota -i 0 -u -d $SCRATCH_DEV &> $seqres.full || \ - _notrun "No GETNEXTQUOTA support" +_require_getnextquota echo "Launch all quotas"