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 <[email protected]>
---
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
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 <[email protected]>
---
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
------------------------------------------------------------------------------
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
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list