From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2 1/1] Fix compression ratio calculation in zram01
Date: Fri, 8 Nov 2019 16:29:02 +0100 [thread overview]
Message-ID: <20191108152902.GA8931@rei> (raw)
In-Reply-To: <20191105090339.6522-2-mdoucha@suse.cz>
Hi!
> + if [ ! -f "/sys/block/zram$i/mm_stat" ]; then
> + if [ $i -eq 0 ]; then
> + tst_resm TCONF "zram compression ratio test requires zram mm_stat sysfs file"
> + fi
>
> - tst_resm TINFO "zram used ${used_mem}M, zram disk sizes ${total_size}M"
> + continue
> + fi
>
> - local v=$((100 * $total_size / $used_mem))
> + local compr_size=`cat "/sys/block/zram$i/mm_stat" | awk '{print $2}'`
Why not just:
awk '{print $2}' /sys/block/zram$i/mm_stat
Other than this it looks good. Also no need to send v3, I can fix this
when applying.
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2019-11-08 15:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-04 12:52 [LTP] [PATCH 0/1] Fix zram01.sh Martin Doucha
2019-11-04 12:52 ` [LTP] [PATCH 1/1] Fix compression ratio calculation in zram01 Martin Doucha
2019-11-04 15:16 ` Petr Vorel
2019-11-04 15:51 ` Martin Doucha
2019-11-05 8:23 ` Petr Vorel
2019-11-05 8:46 ` Martin Doucha
2019-11-05 9:03 ` [LTP] [PATCH v2 0/1] " Martin Doucha
2019-11-05 9:03 ` [LTP] [PATCH v2 1/1] " Martin Doucha
2019-11-08 15:29 ` Cyril Hrubis [this message]
2019-11-08 15:31 ` Martin Doucha
2019-11-08 15:49 ` Cyril Hrubis
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=20191108152902.GA8931@rei \
--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