From: Caspar Zhang <czhang@redhat.com>
To: LTP list <ltp-list@lists.sourceforge.net>
Subject: [LTP] mm: mtest01(w): fail to get EOF on some archs
Date: Mon, 07 Mar 2011 23:32:49 +0800 [thread overview]
Message-ID: <4D74FAA1.4000105@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1211 bytes --]
on some secondary archs (e.g. ppc64), mtest01(w) tests fails for
incorrect argument. Digged into the problem, we found this sentense:
while ((c = getopt(argc, argv, "c:b:p:wvh")) != -1)
here 'c' is char type instead of int. It runs well on x86 systems, but
gets failed on ppc64, s/390x systems, since it returns 255 instead of -1
when 'c' is char type.
This failure was introduced in commit
8147b761b08eefde4f9b965fabb9ef614b3d5817, this patch fixes the issue.
Signed-off-by: Caspar Zhang <czhang@redhat.com>
---
testcases/kernel/mem/mtest01/mtest01.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/testcases/kernel/mem/mtest01/mtest01.c
b/testcases/kernel/mem/mtest01/mtest01.c
index b247dbf..dc960a8 100644
--- a/testcases/kernel/mem/mtest01/mtest01.c
+++ b/testcases/kernel/mem/mtest01/mtest01.c
@@ -59,7 +59,8 @@ void handler(int signo)
int main(int argc, char* argv[])
{
- char c, *mem;
+ int c;
+ char *mem;
float percent;
unsigned int maxpercent = 0, dowrite = 0, verbose=0, j;
unsigned long bytecount, alloc_bytes, max_pids;
--
1.7.4.1
--
Quality Engineer (Kernel) in
Red Hat Software (Beijing) Co., R&D Branch
http://www.cn.redhat.com/
TEL: +86-10-62608150
[-- Attachment #2: 0002-mm-mtest01-w-fail-to-get-EOF-on-some-archs.patch --]
[-- Type: text/plain, Size: 1135 bytes --]
mm: mtest01(w): fail to get EOF on some archs
on some secondary archs (e.g. ppc64), mtest01(w) tests fails for
incorrect argument. Digged into the problem, we found this sentense:
while ((c = getopt(argc, argv, "c:b:p:wvh")) != -1)
here 'c' is char type instead of int. It runs well on x86 systems, but
gets failed on ppc64, s/390x systems, since it returns 255 instead of -1
when 'c' is char type.
This failure was introduced in commit
8147b761b08eefde4f9b965fabb9ef614b3d5817, this patch fixes the issue.
Signed-off-by: Caspar Zhang <czhang@redhat.com>
---
testcases/kernel/mem/mtest01/mtest01.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/testcases/kernel/mem/mtest01/mtest01.c b/testcases/kernel/mem/mtest01/mtest01.c
index b247dbf..dc960a8 100644
--- a/testcases/kernel/mem/mtest01/mtest01.c
+++ b/testcases/kernel/mem/mtest01/mtest01.c
@@ -59,7 +59,8 @@ void handler(int signo)
int main(int argc, char* argv[])
{
- char c, *mem;
+ int c;
+ char *mem;
float percent;
unsigned int maxpercent = 0, dowrite = 0, verbose=0, j;
unsigned long bytecount, alloc_bytes, max_pids;
--
1.7.4.1
[-- Attachment #3: Type: text/plain, Size: 309 bytes --]
------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
[-- Attachment #4: Type: text/plain, Size: 155 bytes --]
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next reply other threads:[~2011-03-07 15:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-07 15:32 Caspar Zhang [this message]
2011-03-07 15:34 ` [LTP] [PATCH] Re: mm: mtest01(w): fail to get EOF on some archs Caspar Zhang
2011-03-09 14: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=4D74FAA1.4000105@redhat.com \
--to=czhang@redhat.com \
--cc=ltp-list@lists.sourceforge.net \
/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