Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3813762imw; Thu, 7 Jul 2022 08:03:16 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uaezPLmKfB4/w7G+aLhJsU/nkF3JXVEKW7jpLjpz6VTDvTN8jJcXHgJr8zhKAko3s9l6U3 X-Received: by 2002:a05:6402:4396:b0:43a:77b5:41f7 with SMTP id o22-20020a056402439600b0043a77b541f7mr20259908edc.45.1657206196650; Thu, 07 Jul 2022 08:03:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657206196; cv=none; d=google.com; s=arc-20160816; b=W+gfq+ZoTp5hFGyi+CLKAl/c7+xriVHcl6AZfTiQPdw+OqALtZR1mxvA10L7/ebvcd eqkcwAi7VTJxMovcktDtOUUlp+moAxn8ePlH1PKykh45HJ5qaIlhT6Keu4hJrg520Q6m T1PqgDrl7Yf0dWA/CKsuDXkvv6udqf5rrS+b0eNUAAq1JtIAEhcEbR8UcOXFELYRH8ZX yfFAibNj4sw/YbBNo9+hD9R3NlO1ugd0QPc/QkW67lHh1YD+ehBEr9UtoQJ+YyATqTsE 309TIWiR1FZjNqnHPTLBB4Z9C9T1dbYsRtkhksUe9J8oPDlpn0kjs4fhQlrU6N3OYMlp sRUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=rEjwd7d59Vip+XraEkqJOwMdNpzSZr9zewfDBOcV6A4=; b=H5FsfYHpuP9Zson57lSzLDuiqqwoyLYW9BhQVodE5jneaJA38H3SNvp9CEtv5ZMVAH bEylTr5x0kJJLj06i2dXEfnq3E4S6eDjt0AB3h60Lyjmv3YcbKMV3YkrBtRKX4P+K+2h fDY5O9wOLVp46qcG8jsYEwY38xPWyR4PQgcSCrK6n2b96+x6qWKwgvEHAT2KltceqR47 1CEPUROlm2fvdq1D64yd43zQSnzaUFUyXy3KamEuQ8RoiVtzB1985h4NMjLYHYevC0Ss OU+gDoSFuCu6pp0bREUBHp1eGDmxV8uh/2rj7AHfUOMrC9+6UkUEpKRuWX6Yl6EgDNME oK7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JOf4k12W; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h25-20020a0564020e9900b0043a2c76581dsi16172721eda.420.2022.07.07.08.02.21; Thu, 07 Jul 2022 08:03:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JOf4k12W; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235782AbiGGPBf (ORCPT + 99 others); Thu, 7 Jul 2022 11:01:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236338AbiGGPBO (ORCPT ); Thu, 7 Jul 2022 11:01:14 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 56DAF45061 for ; Thu, 7 Jul 2022 08:01:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657206068; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=rEjwd7d59Vip+XraEkqJOwMdNpzSZr9zewfDBOcV6A4=; b=JOf4k12WzxMVGazwj/GYmbjw3DPKSywaAT2nv3r0q6tp6CFXRmyJXjnvALpvqqZhW6xC86 a1avVics+w3VXjqWBzMdzJpVUww34NqRgyfD3K9z1nqpHt7KebLXUdZaqqF+zkO3w4L71v 0w+oicovlfD5aJ/q8qUX2Y/8dkR0gAA= Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-672-QTnPnfghPvWfbyiz6UBhCQ-1; Thu, 07 Jul 2022 11:01:01 -0400 X-MC-Unique: QTnPnfghPvWfbyiz6UBhCQ-1 Received: by mail-qt1-f197.google.com with SMTP id bs7-20020ac86f07000000b0031d3efbb91aso14627505qtb.21 for ; Thu, 07 Jul 2022 08:00:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=rEjwd7d59Vip+XraEkqJOwMdNpzSZr9zewfDBOcV6A4=; b=Yrz0OW7YptgQvhbH9B8463ahrReaYffa7qSrmuWbMEhjC8+Jk1YAabsB2IOR8R1r54 0LkFNcHg9YfNVcE1L/hkJt+R37MWYnxc4Y7KvxsTqsY+rWVgJdiEY4Hur28A5kGmmVWv 1zOa8+uKhRBSkwMCAJdBfA/EdiEhq6Mo+HJrnFecJ6s2F+YHu37KnZXLJ4gHH7G2fjXd bTxVSDxRUP+y+66Mw9oO28SoCcg2kjhKzA1r/qI8RHj8TQIzi2/TADar0mtwZzSvgIWI RwOovKruhInRLGBQlKusxMnnoj7iwACC29pYDOrvC7LhyNJvbdHCLbw8mEDOjJaXFPkP T5cg== X-Gm-Message-State: AJIora+JOpEfTu5vf7fnNcdzhCE8Y5KWAt1LhkHaP39WItAKH5hhzmXV 6aRZXArr6uYkpxgMGoUOLRcGgUWTMYSzE6xiJ590UU03FvjapHc/zx7I9ttbFZ0rKJ9q+TxDgak pOUX7qZhyIvaGmn24kvxyvw== X-Received: by 2002:ad4:5ccd:0:b0:473:10b5:d4d4 with SMTP id iu13-20020ad45ccd000000b0047310b5d4d4mr10103187qvb.19.1657206058766; Thu, 07 Jul 2022 08:00:58 -0700 (PDT) X-Received: by 2002:ad4:5ccd:0:b0:473:10b5:d4d4 with SMTP id iu13-20020ad45ccd000000b0047310b5d4d4mr10103107qvb.19.1657206058143; Thu, 07 Jul 2022 08:00:58 -0700 (PDT) Received: from zlang-mailbox ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id h4-20020a05620a284400b006a787380a5csm33370111qkp.67.2022.07.07.08.00.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jul 2022 08:00:57 -0700 (PDT) Date: Thu, 7 Jul 2022 23:00:52 +0800 From: Zorro Lang To: Sun Ke Cc: fstests@vger.kernel.org, linux-ext4@vger.kernel.org Subject: Re: [PATCH 1/2] ext4/057: resize fs after resize_inode without e2fsck Message-ID: <20220707150052.a624coefjchegzm6@zlang-mailbox> References: <20220707135917.373342-1-sunke32@huawei.com> <20220707135917.373342-2-sunke32@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220707135917.373342-2-sunke32@huawei.com> X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Thu, Jul 07, 2022 at 09:59:16PM +0800, Sun Ke wrote: > Forget to run requested e2fsck after resize_inode, then resize fs, it > will trigger off null pointer. > > Regression test for commit b55c3cd102a6 ext4: add reserved GDT blocks > check > > Signed-off-by: Sun Ke > --- Don't use a fixed case number for a new case. It might not be "057" when I merge it. > tests/ext4/057 | 41 +++++++++++++++++++++++++++++++++++++++++ > tests/ext4/057.out | 2 ++ > 2 files changed, 43 insertions(+) > create mode 100755 tests/ext4/057 > create mode 100644 tests/ext4/057.out > > diff --git a/tests/ext4/057 b/tests/ext4/057 > new file mode 100755 > index 00000000..dacc14be > --- /dev/null > +++ b/tests/ext4/057 > @@ -0,0 +1,41 @@ > +#! /bin/bash > +# SPDX-License-Identifier: GPL-2.0 > +# Copyright (c) 2022 HUAWEI. All Rights Reserved. > +# > +# FS QA Test 057 > +# > +# Forget to run requested e2fsck after resize_inode, then resize fs, > +# it will trigger off null pointer. > +# > +# Regression test for commit > +# b55c3cd102a6 ext4: add reserved GDT blocks check > +# > +. ./common/preamble > +_begin_fstest auto This's a "resize" related test, and I think it'll be "quick" enough if you use smaller fs size to test. > + > +# real QA test starts here > + > +# Modify as appropriate. > +_supported_fs ext4 > +_require_scratch _fixed_by_kernel_commit() is recommended, if this's a known regression test. > +_require_command "$TUNE2FS_PROG" tune2fs > +_require_command "$RESIZE2FS_PROG" resize2 ^^ resize2fs ? > + > + > +# set fs size 3G > +dev_size=$((3 * 1024 * 1024 * 1024)) > +_scratch_mkfs_sized $dev_size >/dev/null 2>&1 > + > +# forget to run requested e2fsck after resize_inode > +$TUNE2FS_PROG -O ^resize_inode $SCRATCH_DEV >/dev/null 2>&1 > + > +_scratch_mount > + > +# resize fs from 3G to 8G This comment is useless. You can describe what's expected, and what kind of bug might be trigger at here. > +$RESIZE2FS_PROG $SCRATCH_DEV 8G >/dev/null 2>&1 Better to print to $seqres.full, to help debug if need. Better use _require_scratch_size at beginning, to make sure you have enough space. BTW, do you really need such big size to trigger this bug? Better to figure out if you can use smaller size (e.g. 512m to 1g) to help this case always can be run, even with small test devices. > + > +echo "Silence is golden" > + > +# success, all done > +status=0 > +exit > diff --git a/tests/ext4/057.out b/tests/ext4/057.out > new file mode 100644 > index 00000000..185023c7 > --- /dev/null > +++ b/tests/ext4/057.out > @@ -0,0 +1,2 @@ > +QA output created by 057 > +Silence is golden > -- > 2.13.6 >