From patchwork Sun May 11 04:32:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Theodore Ts'o X-Patchwork-Id: 347750 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 18B5F140099 for ; Sun, 11 May 2014 14:33:10 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754146AbaEKEdJ (ORCPT ); Sun, 11 May 2014 00:33:09 -0400 Received: from imap.thunk.org ([74.207.234.97]:60784 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753109AbaEKEdG (ORCPT ); Sun, 11 May 2014 00:33:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=thunk.org; s=ef5046eb; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=BmNiufSOP6iadnqnNtz3dbo7cGOhFHzlexHcWj/U++E=; b=gFqVndQ7r+izp9x8xM3jtSsBgY9Aqt4JK06D7DFZfjcFLwn/h3OX+2ss+rDof1uLLQ1Y/ocyY1+HXqSlVS+TDRf0KO5CVx09Th2SkKZHzUGHzyqQ0JkP85Gt2SDAkIBal6GTQ8oc9r7SEP2u/X7RCOkpWhFRoGXFLrl+jshIcJg=; Received: from root (helo=closure.thunk.org) by imap.thunk.org with local-esmtp (Exim 4.80) (envelope-from ) id 1WjLRg-0001ad-LL; Sun, 11 May 2014 04:33:04 +0000 Received: by closure.thunk.org (Postfix, from userid 15806) id 545C4580A48; Sun, 11 May 2014 00:33:03 -0400 (EDT) From: Theodore Ts'o To: Ext4 Developers List Cc: adityakali@google.com, Theodore Ts'o Subject: [PATCH 8/9] tests: add basic e2fsck regression test for fixing the quota inode Date: Sun, 11 May 2014 00:32:52 -0400 Message-Id: <1399782773-20029-9-git-send-email-tytso@mit.edu> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1399782773-20029-1-git-send-email-tytso@mit.edu> References: <1399782773-20029-1-git-send-email-tytso@mit.edu> X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on imap.thunk.org); SAEximRunCond expanded to false Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Signed-off-by: "Theodore Ts'o" Cc: adityakali@google.com Reviewed-by: Aditya Kali --- tests/f_quota/debugfs-cmds | 7 +++++++ tests/f_quota/expect.0 | 21 +++++++++++++++++++++ tests/f_quota/expect.1 | 13 +++++++++++++ tests/f_quota/expect.2 | 7 +++++++ tests/f_quota/image.gz | Bin 0 -> 1046 bytes tests/f_quota/name | 1 + tests/f_quota/script | 4 ++++ 7 files changed, 53 insertions(+) create mode 100644 tests/f_quota/debugfs-cmds create mode 100644 tests/f_quota/expect.0 create mode 100644 tests/f_quota/expect.1 create mode 100644 tests/f_quota/expect.2 create mode 100644 tests/f_quota/image.gz create mode 100644 tests/f_quota/name create mode 100644 tests/f_quota/script diff --git a/tests/f_quota/debugfs-cmds b/tests/f_quota/debugfs-cmds new file mode 100644 index 0000000..112a3ff --- /dev/null +++ b/tests/f_quota/debugfs-cmds @@ -0,0 +1,7 @@ +list_quota user +list_quota group +get_quota user 0 +get_quota user 100 +get_quota user 34 +get_quota group 0 + diff --git a/tests/f_quota/expect.0 b/tests/f_quota/expect.0 new file mode 100644 index 0000000..c0ad63d --- /dev/null +++ b/tests/f_quota/expect.0 @@ -0,0 +1,21 @@ +debugfs: list_quota user + user id blocks quota limit inodes quota limit + 0 13312 0 0 2 0 0 + 34 1024 0 0 1 0 0 + 100 2048 32 50 2 20 30 +debugfs: list_quota group +group id blocks quota limit inodes quota limit + 0 16384 0 0 5 0 0 +debugfs: get_quota user 0 + user id blocks quota limit inodes quota limit + 0 13312 0 0 2 0 0 +debugfs: get_quota user 100 + user id blocks quota limit inodes quota limit + 100 2048 32 50 2 20 30 +debugfs: get_quota user 34 + user id blocks quota limit inodes quota limit + 34 1024 0 0 1 0 0 +debugfs: get_quota group 0 +group id blocks quota limit inodes quota limit + 0 16384 0 0 5 0 0 +debugfs: diff --git a/tests/f_quota/expect.1 b/tests/f_quota/expect.1 new file mode 100644 index 0000000..0b3b4cf --- /dev/null +++ b/tests/f_quota/expect.1 @@ -0,0 +1,13 @@ +Pass 1: Checking inodes, blocks, and sizes +Pass 2: Checking directory structure +Pass 3: Checking directory connectivity +Pass 4: Checking reference counts +Pass 5: Checking group summary information +[QUOTA WARNING] Usage inconsistent for ID 0:actual (13312, 2) != expected (14336, 3) +[QUOTA WARNING] Usage inconsistent for ID 100:actual (2048, 2) != expected (1024, 1) +Update quota info for quota type 0? yes + + +test_filesys: ***** FILE SYSTEM WAS MODIFIED ***** +test_filesys: 14/16 files (14.3% non-contiguous), 36/100 blocks +Exit status is 1 diff --git a/tests/f_quota/expect.2 b/tests/f_quota/expect.2 new file mode 100644 index 0000000..bfc558d --- /dev/null +++ b/tests/f_quota/expect.2 @@ -0,0 +1,7 @@ +Pass 1: Checking inodes, blocks, and sizes +Pass 2: Checking directory structure +Pass 3: Checking directory connectivity +Pass 4: Checking reference counts +Pass 5: Checking group summary information +test_filesys: 14/16 files (14.3% non-contiguous), 36/100 blocks +Exit status is 0 diff --git a/tests/f_quota/image.gz b/tests/f_quota/image.gz new file mode 100644 index 0000000000000000000000000000000000000000..9cea6556e941fb0e3fb2bf09a29895ca246cad50 GIT binary patch literal 1046 zc-o!F{WF^f0KoBdZspF1-D*lrSk+5+=nz^>MD?0oJL0vO3C%`l6v@;wr3l-3tD%~? zzGRWMMx?1^&PXhr%sb7Cmj-$B49Sp)h}T6l&vyG0_PzW3@`csfKw9?*32#~HRWX@3 zk}G7(Gj~kbmczDY#KKO6Eue#tb%hIIj*ow|o40q~c;Lm+%?A5U)Z)IZ(z}mu`9vY_ z%(UEzKYq`?uXD&73?b1R3|1Veohm+-H_0EfE zk4X=7q^nJ%ZDXq3U5nmZCb-u@b<@u8#JO^xX zaTWlG==RYiCMkYIf+uTgPMPB#vD(0c{1WpN)zA;BhBeR`nlTiAv!UC}@8l8=nskyC z!sLE0k%#opz6m;OkuW#qJn_?NJ?&6Z!O?Lt{CAG#(Kd5zEUO#LF|49+0{010eR)@} zaj_E|jq(o-Uqn{IMC$ye~9 zQb-PeVD@Rz#V(jGNqnW8-fTLB4|S`?IaW zS*LQ-`#GVY2eQS$-$mu)J=9%qUD@%?B(Z})An%kKKtUerTxMTt0JEn{L%DUK@U(AeZBwQfb69VGr6Qx{My9ZGzv6aB;=<=X(!ZRv6HM8+2s(bc zKR(wV@pAS}%@34MpfGxoajRx+e0oh