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.
--- testcases/kernel/mem/mtest01/mtest01.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
(quoted diff) +0 -0
b/testcases/kernel/mem/mtest01/mtest01.c
index b247dbf..dc960a8 100644
testcases/kernel/mem/mtest01/mtest01.c +2 -1
@@ -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;
Signature · 8 lines
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.
--- testcases/kernel/mem/mtest01/mtest01.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
testcases/kernel/mem/mtest01/mtest01.c +2 -1
@@ -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;
Signature · 1 line
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
forgot to add [PATCH] tag... re-send patch.
Quoted 29 lines · Caspar Zhang
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 commit8147b761b08eefde4f9b965fabb9ef614b3d5817, 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(-)testcases/kernel/mem/mtest01/mtest01.c +2
-1@@ -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;
Signature · 4 lines
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.
--- testcases/kernel/mem/mtest01/mtest01.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
testcases/kernel/mem/mtest01/mtest01.c +2 -1
@@ -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;
Signature · 1 line
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
Hi!
Commited, thanks.
Signature · 12 lines
Cyril Hrubis [email protected] ------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list