From: Li Wang <liwang@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] mkswap: make the test device size is aligned to pagesize
Date: Wed, 27 Jul 2016 17:58:39 +0800 [thread overview]
Message-ID: <1469613519-27167-1-git-send-email-liwang@redhat.com> (raw)
We get failures like below because of 'DEVICE_SIZE-10000' makes the
loop device size is not aligned to system PAGE_SIZE any more.
-----
mkswap01 1 TINFO : Found free device '/dev/loop1'
mkswap01 1 TPASS : 'mkswap /dev/loop1 ' passed.
mkswap01 2 TFAIL : 'mkswap -f /dev/loop1 92400' failed, not expected.
mkswap01 3 TINFO : Can not do swapon on /dev/loop1.
mkswap01 3 TINFO : Device size specified by 'mkswap' greater than real size.
mkswap01 3 TINFO : Swapon failed expectedly.
mkswap01 3 TPASS : 'mkswap -f /dev/loop1 112400' passed.
Signed-off-by: Li Wang <liwang@redhat.com>
---
testcases/commands/mkswap/mkswap01.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/testcases/commands/mkswap/mkswap01.sh b/testcases/commands/mkswap/mkswap01.sh
index 9727b0f..e89c720 100755
--- a/testcases/commands/mkswap/mkswap01.sh
+++ b/testcases/commands/mkswap/mkswap01.sh
@@ -169,8 +169,8 @@ mkswap_test()
setup
mkswap_test "" "" "$TST_DEVICE"
-mkswap_test "" "" "$TST_DEVICE" "$((DEVICE_SIZE-10000))"
-mkswap_test "-f" "" "$TST_DEVICE" "$((DEVICE_SIZE+10000))"
+mkswap_test "" "" "$TST_DEVICE" "$((DEVICE_SIZE-PAGE_SIZE/1024))"
+mkswap_test "-f" "" "$TST_DEVICE" "$((DEVICE_SIZE+PAGE_SIZE/1024))"
mkswap_test "-c" "" "$TST_DEVICE"
mkswap_test "-p" "2048" "$TST_DEVICE"
mkswap_test "-L" "ltp_testswap" "-L ltp_testswap" "" "/dev/disk/by-label/ltp_testswap"
--
1.8.3.1
next reply other threads:[~2016-07-27 9:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-27 9:58 Li Wang [this message]
2016-08-09 16:41 ` [LTP] [PATCH] mkswap: make the test device size is aligned to pagesize Cyril Hrubis
2016-08-15 9:25 ` Li Wang
2016-08-15 12:39 ` Cyril Hrubis
2016-08-16 3:24 ` Li Wang
2016-08-16 12:15 ` Cyril Hrubis
2016-08-17 3:39 ` Li Wang
2016-08-17 11:18 ` Cyril Hrubis
2016-08-18 11:08 ` Li Wang
2016-08-18 11:33 ` 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=1469613519-27167-1-git-send-email-liwang@redhat.com \
--to=liwang@redhat.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