All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] redefinition of errno in some syscalls tests
@ 2010-08-16 17:12 David Marlin
  2010-08-16 18:08 ` Garrett Cooper
  0 siblings, 1 reply; 2+ messages in thread
From: David Marlin @ 2010-08-16 17:12 UTC (permalink / raw)
  To: ltp-list

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


I found that some of the testcases in kernel/syscalls redefine 'errno' 
as 'int':

   int errno;

'errno' is normally in errno.h as a #define to a function returning a 
pointer, i.e.,

   extern int *__errno_location (void)  . . .


Attached is a patch to remove the redefinition from the following files:

   testcases/kernel/syscalls/mallopt/mallopt01.c
   testcases/kernel/syscalls/memcmp/memcmp01.c
   testcases/kernel/syscalls/memcpy/memcpy01.c
   testcases/kernel/syscalls/memset/memset01.c
   testcases/kernel/syscalls/syscall/syscall01.c
   testcases/kernel/syscalls/string/string01.c


Signed-off-by: d.marlin <dmarlin@redhat.com>


[-- Attachment #2: errno.patch --]
[-- Type: text/x-patch, Size: 2063 bytes --]

--- testcases/kernel/syscalls/mallopt/mallopt01.c.orig	2010-07-03 13:29:23.000000000 -0500
+++ testcases/kernel/syscalls/mallopt/mallopt01.c	2010-08-13 10:28:12.318231274 -0500
@@ -51,7 +51,6 @@
 
 char *TCID = "mallopt01";
 int block_number;
-int errno;
 FILE *temp;
 int TST_TOTAL = 1;
 extern int Tst_COUNT;		/* Test Case counter for tst_routines */
--- testcases/kernel/syscalls/memcmp/memcmp01.c.orig	2010-07-20 17:40:58.107370000 -0500
+++ testcases/kernel/syscalls/memcmp/memcmp01.c	2010-07-20 16:51:07.468426000 -0500
@@ -57,7 +57,6 @@
 /*****	LTP Port	*****/
 int local_flag = PASSED;
 int block_number;
-int errno;
 FILE *temp;
 int TST_TOTAL = 2;
 int anyfail();
--- testcases/kernel/syscalls/memcpy/memcpy01.c.orig	2010-07-20 17:40:58.116371000 -0500
+++ testcases/kernel/syscalls/memcpy/memcpy01.c	2010-07-20 16:51:10.206237000 -0500
@@ -61,7 +61,6 @@
 /*****	LTP Port	*****/
 int local_flag = PASSED;
 int block_number;
-int errno;
 FILE *temp;
 int TST_TOTAL = 1;
 /*****	**	**	*****/
--- testcases/kernel/syscalls/memset/memset01.c.orig	2010-07-20 17:40:58.127370000 -0500
+++ testcases/kernel/syscalls/memset/memset01.c	2010-07-20 16:51:13.531048000 -0500
@@ -57,7 +57,6 @@
 /*****	LTP Port	*****/
 int local_flag = PASSED;
 int block_number;
-int errno;
 int TST_TOTAL = 1;
 
 extern int Tst_count;
--- testcases/kernel/syscalls/syscall/syscall01.c.orig	2010-07-20 17:40:58.136370000 -0500
+++ testcases/kernel/syscalls/syscall/syscall01.c	2010-07-20 16:51:18.080796000 -0500
@@ -52,7 +52,6 @@
 char *TCID = "syscall01";
 int local_flag = PASSED;
 int block_number;
-int errno;
 FILE *temp;
 int TST_TOTAL = 1;
 extern int Tst_count;
@@ -63,7 +62,6 @@
 #define ITER		500
 
 int t_flag;
-int errno;
 
 /*****	LTP Port	*****/
 void setup();
--- testcases/kernel/syscalls/string/string01.c.orig	2010-08-09 15:56:12.859181562 -0500
+++ testcases/kernel/syscalls/string/string01.c	2010-08-09 15:58:32.475110931 -0500
@@ -52,7 +52,6 @@
 
 int local_flag = PASSED;
 int block_number;
-int errno;
 FILE *temp;
 int TST_TOTAL = 1;
 extern int Tst_count;

[-- Attachment #3: Type: text/plain, Size: 224 bytes --]

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 

[-- 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	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-08-16 18:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-16 17:12 [LTP] redefinition of errno in some syscalls tests David Marlin
2010-08-16 18:08 ` Garrett Cooper

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.