FS/XFS testing framework
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Yang Xu <xuyang2018.jy@fujitsu.com>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH] xfs/549: test mkfs.xfs whether terminate getsubopt arrays properly
Date: Wed, 20 Jul 2022 10:21:19 -0700	[thread overview]
Message-ID: <Ytg5j+So+WP0PXNP@magnolia> (raw)
In-Reply-To: <1658295937-2169-1-git-send-email-xuyang2018.jy@fujitsu.com>

On Wed, Jul 20, 2022 at 01:45:37PM +0800, Yang Xu wrote:
> When I run xfs/144 manually, the step as below:
> mkfs.xfs -f -d agcount=3200,size=6366g -d file,n
> 
> I accidentally pressed the Enter key, it triggers Segmentation fault.
> Then I found Darrick has fixed this one weeks ago. So add this test.
> 
> Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
> ---
>  tests/xfs/549     | 33 +++++++++++++++++++++++++++++++++
>  tests/xfs/549.out |  2 ++
>  2 files changed, 35 insertions(+)
>  create mode 100755 tests/xfs/549
>  create mode 100644 tests/xfs/549.out
> 
> diff --git a/tests/xfs/549 b/tests/xfs/549
> new file mode 100755
> index 00000000..31ead3c7
> --- /dev/null
> +++ b/tests/xfs/549
> @@ -0,0 +1,33 @@
> +#! /bin/bash
> +# SPDX-License-Identifier: GPL-2.0
> +# Copyright (c) 2022 FUJITSU LIMITED. All rights reserved.
> +#
> +# FS QA Test 549
> +#
> +# Regression test for xfsprogs commit
> +# 50dba8189b1f ("mkfs: terminate getsubopt arrays properly")
> +#
> +# This case test mkfs.xfs whether can terminate getsubopt arrays properly.
> +# If not, it will trigger segmentation fault.
> +#
> +
> +. ./common/preamble
> +_begin_fstest auto quick mkfs
> +
> +# real QA test starts here
> +_supported_fs xfs
> +_fixed_by_git_commit xfsprogs 50dba8189b1f \
> +	"mkfs: terminate getsubopt arrays properly"
> +_require_test
> +
> +testfile=$TEST_DIR/a
> +rm -rf $testfile
> +
> +$MKFS_XFS_PROG -f -d agcount=4 -d file,name=$testfile,nrext64=0 \
> +	>> $seqres.full  2>&1

Heh, you don't even need $testfile --

"$MKFS_XFS_PROG -d agcount=3 -d garbagegarbagegarbage=0"

is enough to cause the crash.  But this works just as well, so

Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> +
> +echo "Silence is golden"
> +
> +# success, all done
> +status=0
> +exit
> diff --git a/tests/xfs/549.out b/tests/xfs/549.out
> new file mode 100644
> index 00000000..4e3acd3f
> --- /dev/null
> +++ b/tests/xfs/549.out
> @@ -0,0 +1,2 @@
> +QA output created by 549
> +Silence is golden
> -- 
> 2.23.0
> 

  reply	other threads:[~2022-07-20 17:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-20  5:45 [PATCH] xfs/549: test mkfs.xfs whether terminate getsubopt arrays properly Yang Xu
2022-07-20 17:21 ` Darrick J. Wong [this message]
2022-07-21 16:43   ` Zorro Lang
2022-07-22  1:52     ` xuyang2018.jy
2022-07-22  3:43     ` [PATCH v2] xfs: " Yang Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Ytg5j+So+WP0PXNP@magnolia \
    --to=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=xuyang2018.jy@fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox