public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] mm: mtest01(w): fail to get EOF on some archs
@ 2011-03-07 15:32 Caspar Zhang
  2011-03-07 15:34 ` [LTP] [PATCH] " Caspar Zhang
  0 siblings, 1 reply; 3+ messages in thread
From: Caspar Zhang @ 2011-03-07 15:32 UTC (permalink / raw)
  To: LTP list

[-- 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [LTP] [PATCH] Re: mm: mtest01(w): fail to get EOF on some archs
  2011-03-07 15:32 [LTP] mm: mtest01(w): fail to get EOF on some archs Caspar Zhang
@ 2011-03-07 15:34 ` Caspar Zhang
  2011-03-09 14:49   ` Cyril Hrubis
  0 siblings, 1 reply; 3+ messages in thread
From: Caspar Zhang @ 2011-03-07 15:34 UTC (permalink / raw)
  To: LTP list

[-- Attachment #1: Type: text/plain, Size: 1346 bytes --]

forgot to add [PATCH] tag... re-send patch.

On 03/07/2011 11:32 PM, Caspar Zhang wrote:
> 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;


-- 
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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [LTP] [PATCH] Re: mm: mtest01(w): fail to get EOF on some archs
  2011-03-07 15:34 ` [LTP] [PATCH] " Caspar Zhang
@ 2011-03-09 14:49   ` Cyril Hrubis
  0 siblings, 0 replies; 3+ messages in thread
From: Cyril Hrubis @ 2011-03-09 14:49 UTC (permalink / raw)
  To: Caspar Zhang; +Cc: LTP list

Hi!

Commited, thanks.
-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-03-09 14:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-07 15:32 [LTP] mm: mtest01(w): fail to get EOF on some archs Caspar Zhang
2011-03-07 15:34 ` [LTP] [PATCH] " Caspar Zhang
2011-03-09 14:49   ` Cyril Hrubis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox