Skip to contentSkip to conversation

redefinition of errno in some syscalls tests

LTP David Marlin 2 participants 2 messages Aug 16, 2010

lore
Share & tools
lore
#0 lore raw

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

kernel/syscalls/mallopt/mallopt01.c renamed from kernel/syscalls/mallopt/mallopt01.c.orig +0 -1
@@ -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 */
kernel/syscalls/memcmp/memcmp01.c renamed from kernel/syscalls/memcmp/memcmp01.c.orig +0 -1
@@ -57,7 +57,6 @@
 /*****	LTP Port	*****/
 int local_flag = PASSED;
 int block_number;
-int errno;
 FILE *temp;
 int TST_TOTAL = 2;
 int anyfail();
kernel/syscalls/memcpy/memcpy01.c renamed from kernel/syscalls/memcpy/memcpy01.c.orig +0 -1
@@ -61,7 +61,6 @@
 /*****	LTP Port	*****/
 int local_flag = PASSED;
 int block_number;
-int errno;
 FILE *temp;
 int TST_TOTAL = 1;
 /*****	**	**	*****/
kernel/syscalls/memset/memset01.c renamed from kernel/syscalls/memset/memset01.c.orig +0 -1
@@ -57,7 +57,6 @@
 /*****	LTP Port	*****/
 int local_flag = PASSED;
 int block_number;
-int errno;
 int TST_TOTAL = 1;
 
 extern int Tst_count;
kernel/syscalls/syscall/syscall01.c renamed from kernel/syscalls/syscall/syscall01.c.orig +0 -2
@@ -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();
kernel/syscalls/string/string01.c renamed from kernel/syscalls/string/string01.c.orig +0 -1
@@ -52,7 +52,6 @@
 
 int local_flag = PASSED;
 int block_number;
-int errno;
 FILE *temp;
 int TST_TOTAL = 1;
 extern int Tst_count;

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

_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#1 lore raw
Quoted 2 lines · David Marlin

testcases/kernel/syscalls/string/string01.c

ACK (will commit when I get home).
-Garrett

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