public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: "zhangyi (F)" <yi.zhang@huawei.com>
To: Amir Goldstein <amir73il@gmail.com>, Eryu Guan <guaneryu@gmail.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
	linux-unionfs@vger.kernel.org, fstests@vger.kernel.org
Subject: Re: [PATCH v3 1/4] fstests: define constants for fsck exit codes
Date: Wed, 29 May 2019 23:57:00 +0800	[thread overview]
Message-ID: <8070e26a-b46e-e161-0376-76c88177199a@huawei.com> (raw)
In-Reply-To: <20190528151723.12525-2-amir73il@gmail.com>

On 2019/5/28 23:17, Amir Goldstein Wrote:
> Define the constants for hard coded values used in _repair_scratch_fs()
> to check fsck exit code.
> 
> Suggested-by: zhangyi (F) <yi.zhang@huawei.com>
> Signed-off-by: Amir Goldstein <amir73il@gmail.com>

Looks good to me.
Reviewed-by: zhangyi (F) <yi.zhang@huawei.com>

Thanks,
Yi.

> ---
>  common/config | 11 +++++++++++
>  common/rc     |  2 +-
>  2 files changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/common/config b/common/config
> index 364432bb..bd64be62 100644
> --- a/common/config
> +++ b/common/config
> @@ -69,6 +69,17 @@ export OVL_WORK="ovl-work"
>  # overlay mount point parent must be the base fs root
>  export OVL_MNT="ovl-mnt"
>  
> +# From e2fsprogs/e2fsck/e2fsck.h:
> +# Exit code used by fsck-type programs
> +export FSCK_OK=0
> +export FSCK_NONDESTRUCT=1
> +export FSCK_REBOOT=2
> +export FSCK_UNCORRECTED=4
> +export FSCK_ERROR=8
> +export FSCK_USAGE=16
> +export FSCK_CANCELED=32
> +export FSCK_LIBRARY=128
> +
>  export PWD=`pwd`
>  #export DEBUG=${DEBUG:=...} # arbitrary CFLAGS really.
>  export MALLOCLIB=${MALLOCLIB:=/usr/lib/libefence.a}
> diff --git a/common/rc b/common/rc
> index e78e0920..cedc1cfa 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -1116,7 +1116,7 @@ _repair_scratch_fs()
>          fsck -t $FSTYP -y $SCRATCH_DEV 2>&1
>  	local res=$?
>  	case $res in
> -	0|1|2)
> +	$FSCK_OK|$FSCK_NONDESTRUCT|$FSCK_REBOOT)
>  		res=0
>  		;;
>  	*)
> 

  reply	other threads:[~2019-05-29 15:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-28 15:17 [PATCH v3 0/4] Misc. fsck.overlay test fixes Amir Goldstein
2019-05-28 15:17 ` [PATCH v3 1/4] fstests: define constants for fsck exit codes Amir Goldstein
2019-05-29 15:57   ` zhangyi (F) [this message]
2019-05-28 15:17 ` [PATCH v3 2/4] overlay: fix _repair_scratch_fs Amir Goldstein
2019-05-29 16:10   ` zhangyi (F)
2019-05-28 15:17 ` [PATCH v3 3/4] overlay: correct fsck.overlay exit code Amir Goldstein
2019-05-29 16:13   ` zhangyi (F)
2019-06-02  7:26   ` Eryu Guan
2019-06-02  8:07     ` Amir Goldstein
2019-05-28 15:17 ` [PATCH v3 4/4] overlay: fix exit code for some fsck.overlay valid cases Amir Goldstein

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=8070e26a-b46e-e161-0376-76c88177199a@huawei.com \
    --to=yi.zhang@huawei.com \
    --cc=amir73il@gmail.com \
    --cc=fstests@vger.kernel.org \
    --cc=guaneryu@gmail.com \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    /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