All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Marlin <dmarlin@redhat.com>
To: ltp-list <ltp-list@lists.sourceforge.net>
Subject: [LTP] redefinition of errno in some syscalls tests
Date: Mon, 16 Aug 2010 12:12:58 -0500	[thread overview]
Message-ID: <4C69719A.3050507@redhat.com> (raw)

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

             reply	other threads:[~2010-08-16 17:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-16 17:12 David Marlin [this message]
2010-08-16 18:08 ` [LTP] redefinition of errno in some syscalls tests Garrett Cooper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C69719A.3050507@redhat.com \
    --to=dmarlin@redhat.com \
    --cc=ltp-list@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.