From: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 2/2] du01.sh: BTRFS fix for the symlink
Date: Mon, 21 Nov 2016 17:07:03 +0300 [thread overview]
Message-ID: <5832FF87.2000701@oracle.com> (raw)
In-Reply-To: <20161121124036.GD25334@rei.lan>
On 11/21/2016 03:40 PM, Cyril Hrubis wrote:
> 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.
Thank you. Pushed.
>
>> +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
>
prev parent reply other threads:[~2016-11-21 14:07 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
2016-11-21 14:07 ` Stanislav Kholmanskikh [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=5832FF87.2000701@oracle.com \
--to=stanislav.kholmanskikh@oracle.com \
--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