* [LTP] [PATCH 1/3] lib: errnos: use ERFKILL only if it's defined
@ 2014-01-07 13:46 Jan Stancek
2014-01-07 13:46 ` [LTP] [PATCH 2/3] cpuset/cpuset_syscall_test: check HAVE_DECL_MPOL_F_MEMS_ALLOWED Jan Stancek
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Jan Stancek @ 2014-01-07 13:46 UTC (permalink / raw)
To: ltp-list
This is to fix compilation on RHEL5.3:
In file included from tst_res.c:216:
errnos.h: In function ‘strerrnodef’:
errnos.h:164: error: ‘ERFKILL’ undeclared (first use in this function)
errnos.h:164: error: (Each undeclared identifier is reported only once
errnos.h:164: error: for each function it appears in.)
errnos.h:164: error: array index in initializer not of integer type
errnos.h:164: error: (near initialization for ‘errno_pairs’)
make[1]: *** [tst_res.o] Error 1
Signed-off-by: Jan Stancek <jstancek@redhat.com>
---
lib/errnos.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/lib/errnos.h b/lib/errnos.h
index 797aed4..ee9620b 100644
--- a/lib/errnos.h
+++ b/lib/errnos.h
@@ -161,7 +161,9 @@ static const char *strerrnodef(int err)
PAIR(EKEYREJECTED)
PAIR(EOWNERDEAD)
PAIR(ENOTRECOVERABLE)
+#ifdef ERFKILL
PAIR(ERFKILL)
+#endif
#ifdef EHWPOISON
PAIR(EHWPOISON)
#endif
--
1.7.1
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 8+ messages in thread* [LTP] [PATCH 2/3] cpuset/cpuset_syscall_test: check HAVE_DECL_MPOL_F_MEMS_ALLOWED 2014-01-07 13:46 [LTP] [PATCH 1/3] lib: errnos: use ERFKILL only if it's defined Jan Stancek @ 2014-01-07 13:46 ` Jan Stancek 2014-01-09 18:48 ` chrubis 2014-08-18 7:00 ` Shuang Qiu 2014-01-07 13:46 ` [LTP] [PATCH 3/3] syscalls/dup3_02: define O_CLOEXEC if needed Jan Stancek 2014-01-08 13:00 ` [LTP] [PATCH 1/3] lib: errnos: use ERFKILL only if it's defined chrubis 2 siblings, 2 replies; 8+ messages in thread From: Jan Stancek @ 2014-01-07 13:46 UTC (permalink / raw) To: ltp-list This is to fix compilation on RHEL5.3: gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D_FORTIFY_SOURCE=2 -I/root/ltp/testcases/kernel/include -DNUMA_VERSION1_COMPATIBILITY -I../../../../../include -I../../../../../include -L/root/ltp/testcases/kernel/controllers/cpuset/cpuset_syscall_test/../cpuset_lib -L/root/ltp/testcases/kernel/controllers/cpuset/cpuset_syscall_test/../../libcontrollers -L../../../../../lib cpuset_syscall_test.c -lltp -lcpu_set -lcontrollers -lltp -lnuma -o cpuset_syscall_test cpuset_syscall_test.c: In function ‘test_get_mempolicy’: cpuset_syscall_test.c:190: error: ‘MPOL_F_MEMS_ALLOWED’ undeclared (first use in this function) cpuset_syscall_test.c:190: error: (Each undeclared identifier is reported only once cpuset_syscall_test.c:190: error: for each function it appears in.) make[5]: *** [cpuset_syscall_test] Error 1 This patch restores check which has been removed by this commit: commit 87156a05a2ffd50f5e467d6f986daae9da7b9cf7 Author: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com> Date: Tue Oct 1 17:44:50 2013 +0400 cpuset/cpuset_syscall_test: fixes Signed-off-by: Jan Stancek <jstancek@redhat.com> --- .../cpuset_syscall_test/cpuset_syscall_test.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_test.c b/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_test.c index dd35cd0..e202295 100644 --- a/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_test.c +++ b/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_test.c @@ -186,8 +186,12 @@ void test_get_mempolicy(void) ret = 1; return; } +#if HAVE_DECL_MPOL_F_MEMS_ALLOWED ret = get_mempolicy(NULL, bitmask_mask(nmask), bitmask_nbits(nmask), 0, MPOL_F_MEMS_ALLOWED); +#else + ret = -1; +#endif bitmask_displaylist(str, 256, nmask); puts(str); -- 1.7.1 ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [LTP] [PATCH 2/3] cpuset/cpuset_syscall_test: check HAVE_DECL_MPOL_F_MEMS_ALLOWED 2014-01-07 13:46 ` [LTP] [PATCH 2/3] cpuset/cpuset_syscall_test: check HAVE_DECL_MPOL_F_MEMS_ALLOWED Jan Stancek @ 2014-01-09 18:48 ` chrubis 2014-08-18 7:00 ` Shuang Qiu 1 sibling, 0 replies; 8+ messages in thread From: chrubis @ 2014-01-09 18:48 UTC (permalink / raw) To: Jan Stancek; +Cc: ltp-list Hi! I've succesfully reproduced the failure, tested that the patch works and pushed it, thanks. -- Cyril Hrubis chrubis@suse.cz ------------------------------------------------------------------------------ CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments & Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [LTP] [PATCH 2/3] cpuset/cpuset_syscall_test: check HAVE_DECL_MPOL_F_MEMS_ALLOWED 2014-01-07 13:46 ` [LTP] [PATCH 2/3] cpuset/cpuset_syscall_test: check HAVE_DECL_MPOL_F_MEMS_ALLOWED Jan Stancek 2014-01-09 18:48 ` chrubis @ 2014-08-18 7:00 ` Shuang Qiu 2014-08-18 7:49 ` Jan Stancek 1 sibling, 1 reply; 8+ messages in thread From: Shuang Qiu @ 2014-08-18 7:00 UTC (permalink / raw) To: Jan Stancek; +Cc: ltp-list Hi Jan, In this case,if MPOL_F_MEMS_ALLOWED is undeclared,"ret = -1" will make some of cpuset_syscall_test failed. i.e. test15 failed: cpuset_syscall 15 TFAIL : Test task exited abnormally.(expect return value is 0) Why do we fail this test if MPOL_F_MEMS_ALLOWED is undeclared rather than skip this test. Thanks Shuang On 01/07/2014 09:46 PM, Jan Stancek wrote: > This is to fix compilation on RHEL5.3: > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D_FORTIFY_SOURCE=2 > -I/root/ltp/testcases/kernel/include -DNUMA_VERSION1_COMPATIBILITY > -I../../../../../include -I../../../../../include > -L/root/ltp/testcases/kernel/controllers/cpuset/cpuset_syscall_test/../cpuset_lib > -L/root/ltp/testcases/kernel/controllers/cpuset/cpuset_syscall_test/../../libcontrollers > -L../../../../../lib cpuset_syscall_test.c -lltp -lcpu_set > -lcontrollers -lltp -lnuma -o cpuset_syscall_test > cpuset_syscall_test.c: In function ‘test_get_mempolicy’: > cpuset_syscall_test.c:190: error: ‘MPOL_F_MEMS_ALLOWED’ undeclared > (first use in this function) > cpuset_syscall_test.c:190: error: (Each undeclared identifier is > reported only once > cpuset_syscall_test.c:190: error: for each function it appears in.) > make[5]: *** [cpuset_syscall_test] Error 1 > > This patch restores check which has been removed by this commit: > commit 87156a05a2ffd50f5e467d6f986daae9da7b9cf7 > Author: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com> > Date: Tue Oct 1 17:44:50 2013 +0400 > cpuset/cpuset_syscall_test: fixes > > Signed-off-by: Jan Stancek <jstancek@redhat.com> > --- > .../cpuset_syscall_test/cpuset_syscall_test.c | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_test.c b/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_test.c > index dd35cd0..e202295 100644 > --- a/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_test.c > +++ b/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_test.c > @@ -186,8 +186,12 @@ void test_get_mempolicy(void) > ret = 1; > return; > } > +#if HAVE_DECL_MPOL_F_MEMS_ALLOWED > ret = get_mempolicy(NULL, bitmask_mask(nmask), bitmask_nbits(nmask), 0, > MPOL_F_MEMS_ALLOWED); > +#else > + ret = -1; > +#endif > > bitmask_displaylist(str, 256, nmask); > puts(str); ------------------------------------------------------------------------------ _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [LTP] [PATCH 2/3] cpuset/cpuset_syscall_test: check HAVE_DECL_MPOL_F_MEMS_ALLOWED 2014-08-18 7:00 ` Shuang Qiu @ 2014-08-18 7:49 ` Jan Stancek 2014-10-15 12:16 ` Cyril Hrubis 0 siblings, 1 reply; 8+ messages in thread From: Jan Stancek @ 2014-08-18 7:49 UTC (permalink / raw) To: Shuang Qiu; +Cc: ltp-list ----- Original Message ----- > From: "Shuang Qiu" <shuang.qiu@oracle.com> > To: "Jan Stancek" <jstancek@redhat.com> > Cc: ltp-list@lists.sourceforge.net > Sent: Monday, 18 August, 2014 9:00:34 AM > Subject: Re: [LTP] [PATCH 2/3] cpuset/cpuset_syscall_test: check HAVE_DECL_MPOL_F_MEMS_ALLOWED > > Hi Jan, > > In this case,if MPOL_F_MEMS_ALLOWED is undeclared,"ret = -1" will make > some of cpuset_syscall_test failed. > i.e. test15 failed: cpuset_syscall 15 TFAIL : Test task exited > abnormally.(expect return value is 0) > Why do we fail this test if MPOL_F_MEMS_ALLOWED is undeclared rather > than skip this test. Hi, that looks like an oversight, which is there for couple years. Commit below was supposed to restore that chunk to previous state, where it at least compiled. I agree that skip (of test15/16 by the first look) would be better. Regards, Jan > > Thanks > Shuang > On 01/07/2014 09:46 PM, Jan Stancek wrote: > > This is to fix compilation on RHEL5.3: > > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D_FORTIFY_SOURCE=2 > > -I/root/ltp/testcases/kernel/include -DNUMA_VERSION1_COMPATIBILITY > > -I../../../../../include -I../../../../../include > > -L/root/ltp/testcases/kernel/controllers/cpuset/cpuset_syscall_test/../cpuset_lib > > -L/root/ltp/testcases/kernel/controllers/cpuset/cpuset_syscall_test/../../libcontrollers > > -L../../../../../lib cpuset_syscall_test.c -lltp -lcpu_set > > -lcontrollers -lltp -lnuma -o cpuset_syscall_test > > cpuset_syscall_test.c: In function ‘test_get_mempolicy’: > > cpuset_syscall_test.c:190: error: ‘MPOL_F_MEMS_ALLOWED’ undeclared > > (first use in this function) > > cpuset_syscall_test.c:190: error: (Each undeclared identifier is > > reported only once > > cpuset_syscall_test.c:190: error: for each function it appears in.) > > make[5]: *** [cpuset_syscall_test] Error 1 > > > > This patch restores check which has been removed by this commit: > > commit 87156a05a2ffd50f5e467d6f986daae9da7b9cf7 > > Author: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com> > > Date: Tue Oct 1 17:44:50 2013 +0400 > > cpuset/cpuset_syscall_test: fixes > > > > Signed-off-by: Jan Stancek <jstancek@redhat.com> > > --- > > .../cpuset_syscall_test/cpuset_syscall_test.c | 4 ++++ > > 1 files changed, 4 insertions(+), 0 deletions(-) > > > > diff --git > > a/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_test.c > > b/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_test.c > > index dd35cd0..e202295 100644 > > --- > > a/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_test.c > > +++ > > b/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_test.c > > @@ -186,8 +186,12 @@ void test_get_mempolicy(void) > > ret = 1; > > return; > > } > > +#if HAVE_DECL_MPOL_F_MEMS_ALLOWED > > ret = get_mempolicy(NULL, bitmask_mask(nmask), bitmask_nbits(nmask), 0, > > MPOL_F_MEMS_ALLOWED); > > +#else > > + ret = -1; > > +#endif > > > > bitmask_displaylist(str, 256, nmask); > > puts(str); > > ------------------------------------------------------------------------------ _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [LTP] [PATCH 2/3] cpuset/cpuset_syscall_test: check HAVE_DECL_MPOL_F_MEMS_ALLOWED 2014-08-18 7:49 ` Jan Stancek @ 2014-10-15 12:16 ` Cyril Hrubis 0 siblings, 0 replies; 8+ messages in thread From: Cyril Hrubis @ 2014-10-15 12:16 UTC (permalink / raw) To: Jan Stancek; +Cc: ltp-list Hi! > that looks like an oversight, which is there for couple years. > > Commit below was supposed to restore that chunk to previous state, > where it at least compiled. I agree that skip (of test15/16 by the first look) > would be better. Jan, can you please push a patch that fixes this? -- Cyril Hrubis chrubis@suse.cz ------------------------------------------------------------------------------ Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://p.sf.net/sfu/Zoho _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list ^ permalink raw reply [flat|nested] 8+ messages in thread
* [LTP] [PATCH 3/3] syscalls/dup3_02: define O_CLOEXEC if needed 2014-01-07 13:46 [LTP] [PATCH 1/3] lib: errnos: use ERFKILL only if it's defined Jan Stancek 2014-01-07 13:46 ` [LTP] [PATCH 2/3] cpuset/cpuset_syscall_test: check HAVE_DECL_MPOL_F_MEMS_ALLOWED Jan Stancek @ 2014-01-07 13:46 ` Jan Stancek 2014-01-08 13:00 ` [LTP] [PATCH 1/3] lib: errnos: use ERFKILL only if it's defined chrubis 2 siblings, 0 replies; 8+ messages in thread From: Jan Stancek @ 2014-01-07 13:46 UTC (permalink / raw) To: ltp-list This is to fix compilation on RHEL5.3: gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D_FORTIFY_SOURCE=2 -I/root/ltp/testcases/kernel/include -I../../../../include -I../../../../include -L../../../../lib dup3_02.c -lltp -o dup3_02 dup3_02.c:55: error: ‘O_CLOEXEC’ undeclared here (not in a function) make[4]: *** [dup3_02] Error 1 make[4]: Leaving directory `/root/ltp/testcases/kernel/syscalls/dup3' make[3]: *** [all] Error 2 In similar manner as in dup3_01.c, define O_CLOEXEC if needed. Signed-off-by: Jan Stancek <jstancek@redhat.com> --- testcases/kernel/syscalls/dup3/dup3_02.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/testcases/kernel/syscalls/dup3/dup3_02.c b/testcases/kernel/syscalls/dup3/dup3_02.c index 0401ddc..3a455da 100644 --- a/testcases/kernel/syscalls/dup3/dup3_02.c +++ b/testcases/kernel/syscalls/dup3/dup3_02.c @@ -37,6 +37,9 @@ #include "safe_macros.h" #include "linux_syscall_numbers.h" +#ifndef O_CLOEXEC +#define O_CLOEXEC 02000000 +#endif static void setup(void); static void cleanup(void); -- 1.7.1 ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [LTP] [PATCH 1/3] lib: errnos: use ERFKILL only if it's defined 2014-01-07 13:46 [LTP] [PATCH 1/3] lib: errnos: use ERFKILL only if it's defined Jan Stancek 2014-01-07 13:46 ` [LTP] [PATCH 2/3] cpuset/cpuset_syscall_test: check HAVE_DECL_MPOL_F_MEMS_ALLOWED Jan Stancek 2014-01-07 13:46 ` [LTP] [PATCH 3/3] syscalls/dup3_02: define O_CLOEXEC if needed Jan Stancek @ 2014-01-08 13:00 ` chrubis 2 siblings, 0 replies; 8+ messages in thread From: chrubis @ 2014-01-08 13:00 UTC (permalink / raw) To: Jan Stancek; +Cc: ltp-list Hi! > This is to fix compilation on RHEL5.3: > In file included from tst_res.c:216: > errnos.h: In function ???strerrnodef???: > errnos.h:164: error: ???ERFKILL??? undeclared (first use in this function) > errnos.h:164: error: (Each undeclared identifier is reported only once > errnos.h:164: error: for each function it appears in.) > errnos.h:164: error: array index in initializer not of integer type > errnos.h:164: error: (near initialization for ???errno_pairs???) > make[1]: *** [tst_res.o] Error 1 > > Signed-off-by: Jan Stancek <jstancek@redhat.com> > --- > lib/errnos.h | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) > > diff --git a/lib/errnos.h b/lib/errnos.h > index 797aed4..ee9620b 100644 > --- a/lib/errnos.h > +++ b/lib/errnos.h > @@ -161,7 +161,9 @@ static const char *strerrnodef(int err) > PAIR(EKEYREJECTED) > PAIR(EOWNERDEAD) > PAIR(ENOTRECOVERABLE) > +#ifdef ERFKILL > PAIR(ERFKILL) > +#endif > #ifdef EHWPOISON > PAIR(EHWPOISON) > #endif Pushed and added few more so that we are compatible back to the SLES9 and RHEL4. Thanks. -- Cyril Hrubis chrubis@suse.cz ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-10-15 12:16 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-01-07 13:46 [LTP] [PATCH 1/3] lib: errnos: use ERFKILL only if it's defined Jan Stancek 2014-01-07 13:46 ` [LTP] [PATCH 2/3] cpuset/cpuset_syscall_test: check HAVE_DECL_MPOL_F_MEMS_ALLOWED Jan Stancek 2014-01-09 18:48 ` chrubis 2014-08-18 7:00 ` Shuang Qiu 2014-08-18 7:49 ` Jan Stancek 2014-10-15 12:16 ` Cyril Hrubis 2014-01-07 13:46 ` [LTP] [PATCH 3/3] syscalls/dup3_02: define O_CLOEXEC if needed Jan Stancek 2014-01-08 13:00 ` [LTP] [PATCH 1/3] lib: errnos: use ERFKILL only if it's defined chrubis
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox