From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 2/2] du01.sh: BTRFS fix for the symlink
Date: Mon, 21 Nov 2016 13:40:37 +0100 [thread overview]
Message-ID: <20161121124036.GD25334@rei.lan> (raw)
In-Reply-To: <1479310748-14359-2-git-send-email-stanislav.kholmanskikh@oracle.com>
Hi!
> By default, BTRFS reports symlinks to be of page size.
>
> Modify the corresponding check to verify if the symlink
> is either 0 or page size.
>
> Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
> ---
> testcases/commands/du/du01.sh | 8 +++++++-
> 1 files changed, 7 insertions(+), 1 deletions(-)
>
> diff --git a/testcases/commands/du/du01.sh b/testcases/commands/du/du01.sh
> index 823c50a..7b17f6f 100755
> --- a/testcases/commands/du/du01.sh
> +++ b/testcases/commands/du/du01.sh
> @@ -83,12 +83,18 @@ setup
>
> block_size=512
>
> +page_size=$(getconf PAGESIZE)
> +if [ "$page_size" -lt 1024 ]; then
> + tst_brkm TBROK "Page size < 1024"
> +fi
I doubt that this will ever happen, but it does not do any harm anyway.
Both patches acked, thanks for fixing this.
> +page_size=$(( page_size / 1024 ))
> +
> # The output could be different in some systems, if we use du to
> # estimate file space usage with the same filesystem and the same size.
> # So we use the approximate value to check.
> check1="^10[2-3][0-9][0-9][[:space:]]\."
> check2="^10[2-3][0-9][0-9][[:space:]]testfile"
> -check3="^[0-4][[:space:]]\.\/testdir\/testsymlink"
> +check3="^\(0\|${page_size}\)[[:space:]]\.\/testdir\/testsymlink"
> check5="^20[4-6][0-9][0-9][[:space:]]\."
> check7="^10[4-5][0-9][0-9]\{4\}[[:space:]]\."
> check9="^10[2-3][0-9][0-9][[:space:]]total"
> --
> 1.7.1
>
>
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2016-11-21 12:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-09 15:29 [LTP] du01 with btrfs on systems with > 4k page size Stanislav Kholmanskikh
2016-11-09 16:18 ` Cyril Hrubis
2016-11-10 14:39 ` Stanislav Kholmanskikh
2016-11-10 15:12 ` Cyril Hrubis
2016-11-16 15:39 ` [LTP] [PATCH 1/2] du01.sh: start matching at the beginning of a line Stanislav Kholmanskikh
2016-11-16 15:39 ` [LTP] [PATCH 2/2] du01.sh: BTRFS fix for the symlink Stanislav Kholmanskikh
2016-11-21 12:40 ` Cyril Hrubis [this message]
2016-11-21 14:07 ` Stanislav Kholmanskikh
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=20161121124036.GD25334@rei.lan \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
/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