ceph-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zorro Lang <zlang@redhat.com>
To: xiubli@redhat.com
Cc: fstests@vger.kernel.org, ceph-devel@vger.kernel.org
Subject: Re: [PATCH] generic/020: fix another really long attr test failure for ceph
Date: Tue, 21 Mar 2023 22:26:36 +0800	[thread overview]
Message-ID: <20230321142636.epdz3wtbksmnsumk@zlang-mailbox> (raw)
In-Reply-To: <20230319062928.278235-1-xiubli@redhat.com>

On Sun, Mar 19, 2023 at 02:29:27PM +0800, xiubli@redhat.com wrote:
> From: Xiubo Li <xiubli@redhat.com>
> 
> If the CONFIG_CEPH_FS_SECURITY_LABEL is disabled the kernel ceph
> the 'selinux_size' will be empty and then:
> max_attrval_size=$((65536 - $size - $selinux_size - $max_attrval_namelen))
> will be:
> max_attrval_size=$((65536 - $size - - $max_attrval_namelen))
> which equals to:
> max_attrval_size=$((65536 - $size + $max_attrval_namelen))
> 
> Signed-off-by: Xiubo Li <xiubli@redhat.com>
> ---

Makes sense to me,
Reviewed-by: Zorro Lang <zlang@redhat.com>

>  tests/generic/020 | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/tests/generic/020 b/tests/generic/020
> index 538a24c6..e00365a9 100755
> --- a/tests/generic/020
> +++ b/tests/generic/020
> @@ -154,6 +154,12 @@ _attr_get_maxval_size()
>  			awk -F "=0x" '/^user/ {len += length($1) + length($2) / 2} END {print len}')
>  		local selinux_size=$(getfattr -n 'security.selinux' --dump -e hex $filename 2>/dev/null | \
>  			awk -F "=0x" '/^security/ {len += length($1) + length($2) / 2} END {print len}')
> +		if [ -z $size ]; then
> +			size=0
> +		fi
> +		if [ -z $selinux_size ]; then
> +			selinux_size=0
> +		fi
>  		max_attrval_size=$((65536 - $size - $selinux_size - $max_attrval_namelen))
>  		;;
>  	*)
> -- 
> 2.31.1
> 


      reply	other threads:[~2023-03-21 14:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-19  6:29 [PATCH] generic/020: fix another really long attr test failure for ceph xiubli
2023-03-21 14:26 ` Zorro Lang [this message]

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=20230321142636.epdz3wtbksmnsumk@zlang-mailbox \
    --to=zlang@redhat.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=xiubli@redhat.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;
as well as URLs for NNTP newsgroup(s).