Skip to contentSkip to conversation

cap_bset_inh_bounds.c build failure

LTP Applied Mitani 4 participants 8 messages Apr 2, 2010 – Apr 15, 2010

lore
Share & tools
lore

Mitani

author
#0 lore raw

Hi,

I tried to build by using yesterday's git in my system (RHEL4.8 x86).
(ltp-dev-4837fee8a7c2de6a83c8927a574c792ca6dabe4e.tar.gz)
But build failed in "cap_bset_inh_bounds.c" with following message. This is different from "cap_bounds_r.c"'s problem (another thread), I think

------------
gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -I/home/LTP/ltp-dev-20100401-3/testcases/kernel/include
-I../../../../include -I../../../../include -L../../../../lib
cap_bset_inh_bounds.c -lltp -lcap -o cap_bset_inh_bounds
cap_bset_inh_bounds.c:124: error: syntax error before numeric constant cap_bset_inh_bounds.c:124: warning: type defaults to int' in declaration of tst_resm'
cap_bset_inh_bounds.c:124: error: conflicting types for 'tst_resm' ../../../../include/test.h:192: error: previous declaration of 'tst_resm' was here
cap_bset_inh_bounds.c:124: error: conflicting types for 'tst_resm' ../../../../include/test.h:192: error: previous declaration of 'tst_resm' was here
cap_bset_inh_bounds.c:124: warning: data definition has no type or storage class
cap_bset_inh_bounds.c:129: warning: type defaults to int' in declaration of tst_exit'
cap_bset_inh_bounds.c:129: error: conflicting types for 'tst_exit' ../../../../include/test.h:203: error: previous declaration of 'tst_exit' was here
cap_bset_inh_bounds.c:129: error: conflicting types for 'tst_exit' ../../../../include/test.h:203: error: previous declaration of 'tst_exit' was here
cap_bset_inh_bounds.c:129: warning: data definition has no type or storage class
cap_bset_inh_bounds.c:130: error: syntax error before '}' token
------------

In this source, the pair of "ifdef" start/end and the pair of main() function's "parenthesis" are alternate, I think.

How about following patch?

Index: ./testcases/kernel/security/cap_bound/cap_bset_inh_bounds.c
============
--- ./testcases/kernel/security/cap_bound/cap_bset_inh_bounds.c 2010-04-01 16:15:00.000000000 +0900
+++ ./testcases/kernel/security/cap_bound/cap_bset_inh_bounds.c.new

2010-04-01 17:27:23.000000000 +0900

@@ -39,11 +39,11 @@

int errno;

+int main(int argc, char *argv[])
+{
#if HAVE_SYS_CAPABILITY_H
#if HAVE_DECL_PR_CAPBSET_READ && HAVE_DECL_PR_CAPBSET_DROP #ifdef HAVE_LIBCAP
-int main(int argc, char *argv[])

-{
        int ret = 1;
        cap_value_t v[1];
        cap_flag_value_t f;

============

Thank you--

-Tomonori Mitani

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#1 lore raw
Quoted 36 lines · Mitani

Hi,

I tried to build by using yesterday's git in my system (RHEL4.8 x86).
(ltp-dev-4837fee8a7c2de6a83c8927a574c792ca6dabe4e.tar.gz)
But build failed in "cap_bset_inh_bounds.c" with following message. This is different from "cap_bounds_r.c"'s problem (another thread), I think

------------
gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall

(quoted diff) +0 -2
-I/home/LTP/ltp-dev-20100401-3/testcases/kernel/include
-I../../../../include -I../../../../include   -L../../../../lib

cap_bset_inh_bounds.c -lltp -lcap -o cap_bset_inh_bounds
cap_bset_inh_bounds.c:124: error: syntax error before numeric constant cap_bset_inh_bounds.c:124: warning: type defaults to int' in declaration of tst_resm'
cap_bset_inh_bounds.c:124: error: conflicting types for 'tst_resm' ../../../../include/test.h:192: error: previous declaration of 'tst_resm' was here
cap_bset_inh_bounds.c:124: error: conflicting types for 'tst_resm' ../../../../include/test.h:192: error: previous declaration of 'tst_resm' was here
cap_bset_inh_bounds.c:124: warning: data definition has no type or storage class
cap_bset_inh_bounds.c:129: warning: type defaults to int' in declaration of tst_exit'
cap_bset_inh_bounds.c:129: error: conflicting types for 'tst_exit' ../../../../include/test.h:203: error: previous declaration of 'tst_exit' was here
cap_bset_inh_bounds.c:129: error: conflicting types for 'tst_exit' ../../../../include/test.h:203: error: previous declaration of 'tst_exit' was here
cap_bset_inh_bounds.c:129: warning: data definition has no type or storage class
cap_bset_inh_bounds.c:130: error: syntax error before '}' token
------------

Quoted 7 lines

In this source, the pair of "ifdef" start/end and the pair of main() function's "parenthesis" are alternate, I think.

How about following patch?

Yup - although really the #ifdef HAVE_LIBCAP should be redundant as the testcases/kernel/security/cap_bound/Makefile shouldn't compile cap_bounds at all if HAVE_LIBCAP is not defined.

Quoted 29 lines

Index: ./testcases/kernel/security/cap_bound/cap_bset_inh_bounds.c
============
--- ./testcases/kernel/security/cap_bound/cap_bset_inh_bounds.c 2010-04-01 16:15:00.000000000 +0900
+++ ./testcases/kernel/security/cap_bound/cap_bset_inh_bounds.c.new

2010-04-01 17:27:23.000000000 +0900
(quoted diff) +2 -2
@@ -39,11 +39,11 @@
 
 int errno;
 
+int main(int argc, char *argv[])
+{
 #if HAVE_SYS_CAPABILITY_H
 #if HAVE_DECL_PR_CAPBSET_READ && HAVE_DECL_PR_CAPBSET_DROP
 #ifdef HAVE_LIBCAP
-int main(int argc, char *argv[])
-{
        int ret = 1;
        cap_value_t v[1];
        cap_flag_value_t f;

============

Thank you--

-Tomonori Mitani

Quoted 10 lines

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

author
#2 lore raw

Hi,

Quoted 58 lines

-----Original Message-----
From: Serge E. Hallyn [mailto:[email protected]]
Sent: Monday, April 05, 2010 10:22 PM
To: Mitani
Cc: [email protected]
Subject: Re: [LTP] cap_bset_inh_bounds.c build failure

Quoted 6 lines · Mitani

Hi,

I tried to build by using yesterday's git in my system (RHEL4.8 x86).
(ltp-dev-4837fee8a7c2de6a83c8927a574c792ca6dabe4e.tar.gz)
But build failed in "cap_bset_inh_bounds.c" with following message. This is different from "cap_bounds_r.c"'s problem (another thread),

I think

Quoted 7 lines

------------
gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall

(quoted diff) +0 -2
-I/home/LTP/ltp-dev-20100401-3/testcases/kernel/include
-I../../../../include -I../../../../include   -L../../../../lib

cap_bset_inh_bounds.c -lltp -lcap -o cap_bset_inh_bounds
cap_bset_inh_bounds.c:124: error: syntax error before numeric

constant

Quoted 1 line

cap_bset_inh_bounds.c:124: warning: type defaults to `int' in

declaration of

Quoted 3 lines

`tst_resm'
cap_bset_inh_bounds.c:124: error: conflicting types for 'tst_resm' ../../../../include/test.h:192: error: previous declaration of

'tst_resm'

Quoted 3 lines

was here
cap_bset_inh_bounds.c:124: error: conflicting types for 'tst_resm' ../../../../include/test.h:192: error: previous declaration of

'tst_resm'

Quoted 2 lines

was here
cap_bset_inh_bounds.c:124: warning: data definition has no type or

storage

Quoted 2 lines

class
cap_bset_inh_bounds.c:129: warning: type defaults to `int' in

declaration of

Quoted 3 lines

`tst_exit'
cap_bset_inh_bounds.c:129: error: conflicting types for 'tst_exit' ../../../../include/test.h:203: error: previous declaration of

'tst_exit'

Quoted 3 lines

was here
cap_bset_inh_bounds.c:129: error: conflicting types for 'tst_exit' ../../../../include/test.h:203: error: previous declaration of

'tst_exit'

Quoted 2 lines

was here
cap_bset_inh_bounds.c:129: warning: data definition has no type or

storage

Quoted 8 lines

class
cap_bset_inh_bounds.c:130: error: syntax error before '}' token
------------

In this source, the pair of "ifdef" start/end and the pair of main() function's "parenthesis" are alternate, I think.

Quoted 8 lines
Quoted 3 lines

How about following patch?

Yup - although really the #ifdef HAVE_LIBCAP should be redundant as the testcases/kernel/security/cap_bound/Makefile shouldn't compile cap_bounds at all if HAVE_LIBCAP is not defined.

Yes. - In my system, this source is not problem. Your indication is right. :-)
But, I manually had updated "libcap2" once. And after "./configure", HAVE_LIBCAP is defined. Therefore, I noticed this error.

The system which updated to "libcap2" will need solution of this problem, I think.

Thank you--

-Tomonori Mitani

Quoted 32 lines
Quoted 1 line

Index: ./testcases/kernel/security/cap_bound/cap_bset_inh_bounds.c

Quoted 2 lines

============
--- ./testcases/kernel/security/cap_bound/cap_bset_inh_bounds.c

2010-04-01

Quoted 2 lines

16:15:00.000000000 +0900

+++ ./testcases/kernel/security/cap_bound/cap_bset_inh_bounds.c.ne w

Quoted 20 lines
2010-04-01 17:27:23.000000000 +0900
(quoted diff) +2 -2
@@ -39,11 +39,11 @@
 
 int errno;
 
+int main(int argc, char *argv[])
+{
 #if HAVE_SYS_CAPABILITY_H
 #if HAVE_DECL_PR_CAPBSET_READ && HAVE_DECL_PR_CAPBSET_DROP
 #ifdef HAVE_LIBCAP
-int main(int argc, char *argv[])
-{
        int ret = 1;
        cap_value_t v[1];
        cap_flag_value_t f;

============

Thank you--

Quoted 16 lines
Quoted 5 lines

-Tomonori Mitani

------------------------------------------------------------------
------------

Quoted 9 lines

Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#3 lore raw
Quoted 69 lines · Mitani

Hi,

Quoted 58 lines

-----Original Message-----
From: Serge E. Hallyn [mailto:[email protected]]
Sent: Monday, April 05, 2010 10:22 PM
To: Mitani
Cc: [email protected]
Subject: Re: [LTP] cap_bset_inh_bounds.c build failure

Quoted 6 lines · Mitani

Hi,

I tried to build by using yesterday's git in my system (RHEL4.8 x86).
(ltp-dev-4837fee8a7c2de6a83c8927a574c792ca6dabe4e.tar.gz)
But build failed in "cap_bset_inh_bounds.c" with following message. This is different from "cap_bounds_r.c"'s problem (another thread),

I think

Quoted 7 lines

------------
gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall

(quoted diff) +0 -2
-I/home/LTP/ltp-dev-20100401-3/testcases/kernel/include
-I../../../../include -I../../../../include   -L../../../../lib

cap_bset_inh_bounds.c -lltp -lcap -o cap_bset_inh_bounds
cap_bset_inh_bounds.c:124: error: syntax error before numeric

constant

Quoted 1 line

cap_bset_inh_bounds.c:124: warning: type defaults to `int' in

declaration of

Quoted 3 lines

`tst_resm'
cap_bset_inh_bounds.c:124: error: conflicting types for 'tst_resm' ../../../../include/test.h:192: error: previous declaration of

'tst_resm'

Quoted 3 lines

was here
cap_bset_inh_bounds.c:124: error: conflicting types for 'tst_resm' ../../../../include/test.h:192: error: previous declaration of

'tst_resm'

Quoted 2 lines

was here
cap_bset_inh_bounds.c:124: warning: data definition has no type or

storage

Quoted 2 lines

class
cap_bset_inh_bounds.c:129: warning: type defaults to `int' in

declaration of

Quoted 3 lines

`tst_exit'
cap_bset_inh_bounds.c:129: error: conflicting types for 'tst_exit' ../../../../include/test.h:203: error: previous declaration of

'tst_exit'

Quoted 3 lines

was here
cap_bset_inh_bounds.c:129: error: conflicting types for 'tst_exit' ../../../../include/test.h:203: error: previous declaration of

'tst_exit'

Quoted 2 lines

was here
cap_bset_inh_bounds.c:129: warning: data definition has no type or

storage

Quoted 8 lines

class
cap_bset_inh_bounds.c:130: error: syntax error before '}' token
------------

In this source, the pair of "ifdef" start/end and the pair of main() function's "parenthesis" are alternate, I think.

Quoted 8 lines
Quoted 3 lines

How about following patch?

Yup - although really the #ifdef HAVE_LIBCAP should be redundant as the testcases/kernel/security/cap_bound/Makefile shouldn't compile cap_bounds at all if HAVE_LIBCAP is not defined.

Quoted 7 lines

Yes. - In my system, this source is not problem. Your indication is right. :-)
But, I manually had updated "libcap2" once. And after "./configure", HAVE_LIBCAP is defined. Therefore, I noticed this error.

The system which updated to "libcap2" will need solution of this problem, I think.

Agreed, since this is LTP it's not right to expect "sane" userspace-kernel combos. So we need to check both. Unfortunately I won't have time to work with that this week.

Even if I did, I'd have a guidance question for Garrett: Do we want to assume that people will change kernels, but not libraries, between compile/install and run of ltp? If so, then we can stick with the autoconf checks for libraries+includes, and add a check at runtime (as I believe was there originally) for the requisite kernel support - file capabilities, bounding sets, and 64-bit capabilities.

OTOH if you're ok with assuming kernel is same at ltp configure and run, then we can do a test in autoconf which makes for a cleaner run.

thanks,
-serge

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#4 lore raw
Quoted 2 lines · Serge E. Hallyn
Quoted 1 line · Mitani

Hi,

[...]

Quoted 11 lines

Agreed, since this is LTP it's not right to expect "sane" userspace-kernel combos.  So we need to check both.  Unfortunately I won't have time to work with that this week.

Even if I did, I'd have a guidance question for Garrett:  Do we want to assume that people will change kernels, but not libraries, between compile/install and run of ltp?  If so, then we can stick with the autoconf checks for libraries+includes, and add a check at runtime (as I believe was there originally) for the requisite kernel support - file capabilities, bounding sets, and 64-bit capabilities.

Assuming that kernels remain constant between compile and install would be a nice thing to shoot for, but I personally on an embedded project [for instance] have compiled LTP once, not had the major libs change, but the kernel potentially changed, and then dropped in ltp and voila.. it worked perfectly fine. With that in mind, yes.. breaking that assumption would be painful, as many packagers actually compile and distribute one version of ltp as a package (debian for instance is one said example).

Quoted 3 lines

OTOH if you're ok with assuming kernel is same at ltp configure and run, then we can do a test in autoconf which makes for a cleaner run.

Yes, it's fine to have runtime tests. The point that I've tried to make in the past (and partially failed) is that the following needs to be kept in mind:

1. Groups can backport patches from kernel versions; thus using kernel version checks to determine whether or not functionality A exists is dubious. It's better just to compile the functionality in such a way that the test works and let the group executing the test do so without hacking the test.
2. Compiling at runtime is no bueno for almost everything in the source tree. There are a handful of tests in the source tree that do do that, but by and large this is a bad idea as we aren't guaranteed to have a full compile toolchain on the running system -- only the build system.

Thanks,
-Garrett

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

author
#5 lore raw
In reply to Serge E. Hallyn

Sorry.
My patch was destroyed by e-mail.
I attach patch for "cap_bset_inh_bounds.c" file.

Regards--

-Tomonori Mitani

Quoted 98 lines

-----Original Message-----
From: Serge E. Hallyn [mailto:[email protected]]
Sent: Monday, April 05, 2010 10:22 PM
To: Mitani
Cc: [email protected]
Subject: Re: [LTP] cap_bset_inh_bounds.c build failure

Quoted 6 lines · Mitani

Hi,

I tried to build by using yesterday's git in my system (RHEL4.8 x86).
(ltp-dev-4837fee8a7c2de6a83c8927a574c792ca6dabe4e.tar.gz)
But build failed in "cap_bset_inh_bounds.c" with following message. This is different from "cap_bounds_r.c"'s problem (another thread),

I think

Quoted 7 lines

------------
gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall

(quoted diff) +0 -2
-I/home/LTP/ltp-dev-20100401-3/testcases/kernel/include
-I../../../../include -I../../../../include   -L../../../../lib

cap_bset_inh_bounds.c -lltp -lcap -o cap_bset_inh_bounds
cap_bset_inh_bounds.c:124: error: syntax error before numeric

constant

Quoted 1 line

cap_bset_inh_bounds.c:124: warning: type defaults to `int' in

declaration of

Quoted 3 lines

`tst_resm'
cap_bset_inh_bounds.c:124: error: conflicting types for 'tst_resm' ../../../../include/test.h:192: error: previous declaration of

'tst_resm'

Quoted 3 lines

was here
cap_bset_inh_bounds.c:124: error: conflicting types for 'tst_resm' ../../../../include/test.h:192: error: previous declaration of

'tst_resm'

Quoted 2 lines

was here
cap_bset_inh_bounds.c:124: warning: data definition has no type or

storage

Quoted 2 lines

class
cap_bset_inh_bounds.c:129: warning: type defaults to `int' in

declaration of

Quoted 3 lines

`tst_exit'
cap_bset_inh_bounds.c:129: error: conflicting types for 'tst_exit' ../../../../include/test.h:203: error: previous declaration of

'tst_exit'

Quoted 3 lines

was here
cap_bset_inh_bounds.c:129: error: conflicting types for 'tst_exit' ../../../../include/test.h:203: error: previous declaration of

'tst_exit'

Quoted 2 lines

was here
cap_bset_inh_bounds.c:129: warning: data definition has no type or

storage

Quoted 11 lines

class
cap_bset_inh_bounds.c:130: error: syntax error before '}' token
------------

In this source, the pair of "ifdef" start/end and the pair of main() function's "parenthesis" are alternate, I think.

How about following patch?

Yup - although really the #ifdef HAVE_LIBCAP should be redundant as the testcases/kernel/security/cap_bound/Makefile shouldn't compile cap_bounds at all if HAVE_LIBCAP is not defined.

Quoted 1 line

Index: ./testcases/kernel/security/cap_bound/cap_bset_inh_bounds.c

Quoted 2 lines

============
--- ./testcases/kernel/security/cap_bound/cap_bset_inh_bounds.c

2010-04-01

Quoted 2 lines

16:15:00.000000000 +0900

+++ ./testcases/kernel/security/cap_bound/cap_bset_inh_bounds.c.ne w

Quoted 20 lines
2010-04-01 17:27:23.000000000 +0900
(quoted diff) +2 -2
@@ -39,11 +39,11 @@
 
 int errno;
 
+int main(int argc, char *argv[])
+{
 #if HAVE_SYS_CAPABILITY_H
 #if HAVE_DECL_PR_CAPBSET_READ && HAVE_DECL_PR_CAPBSET_DROP
 #ifdef HAVE_LIBCAP
-int main(int argc, char *argv[])
-{
        int ret = 1;
        cap_value_t v[1];
        cap_flag_value_t f;

============

Thank you--

Quoted 16 lines
Quoted 5 lines

-Tomonori Mitani

------------------------------------------------------------------
------------

Quoted 9 lines

Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

testcases/kernel/security/cap_bound/cap_bset_inh_bounds.c +2 -2
@@ -39,11 +39,11 @@
 
 int errno;
 
+int main(int argc, char *argv[])
+{
 #if HAVE_SYS_CAPABILITY_H
 #if HAVE_DECL_PR_CAPBSET_READ && HAVE_DECL_PR_CAPBSET_DROP
 #ifdef HAVE_LIBCAP
-int main(int argc, char *argv[])
-{
 	int ret = 1;
 	cap_value_t v[1];
 	cap_flag_value_t f;

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev

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

#6 lore raw
Quoted 3 lines · Mitani

Sorry.
My patch was destroyed by e-mail.
I attach patch for "cap_bset_inh_bounds.c" file.

Will test and update to master by this weekend. It seems it has been already acked by serge.

Applied to next. Thanks for your patch.
-Rishi

Quoted 136 lines

Regards--

-Tomonori Mitani

Quoted 98 lines

-----Original Message-----
From: Serge E. Hallyn [mailto:[email protected]]
Sent: Monday, April 05, 2010 10:22 PM
To: Mitani
Cc: [email protected]
Subject: Re: [LTP] cap_bset_inh_bounds.c build failure

Quoted 6 lines · Mitani

Hi,

I tried to build by using yesterday's git in my system (RHEL4.8 x86).
(ltp-dev-4837fee8a7c2de6a83c8927a574c792ca6dabe4e.tar.gz)
But build failed in "cap_bset_inh_bounds.c" with following message. This is different from "cap_bounds_r.c"'s problem (another thread),

I think

Quoted 7 lines

------------
gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall

(quoted diff) +0 -2
-I/home/LTP/ltp-dev-20100401-3/testcases/kernel/include
-I../../../../include -I../../../../include   -L../../../../lib

cap_bset_inh_bounds.c -lltp -lcap -o cap_bset_inh_bounds
cap_bset_inh_bounds.c:124: error: syntax error before numeric

constant

Quoted 1 line

cap_bset_inh_bounds.c:124: warning: type defaults to `int' in

declaration of

Quoted 3 lines

`tst_resm'
cap_bset_inh_bounds.c:124: error: conflicting types for 'tst_resm' ../../../../include/test.h:192: error: previous declaration of

'tst_resm'

Quoted 3 lines

was here
cap_bset_inh_bounds.c:124: error: conflicting types for 'tst_resm' ../../../../include/test.h:192: error: previous declaration of

'tst_resm'

Quoted 2 lines

was here
cap_bset_inh_bounds.c:124: warning: data definition has no type or

storage

Quoted 2 lines

class
cap_bset_inh_bounds.c:129: warning: type defaults to `int' in

declaration of

Quoted 3 lines

`tst_exit'
cap_bset_inh_bounds.c:129: error: conflicting types for 'tst_exit' ../../../../include/test.h:203: error: previous declaration of

'tst_exit'

Quoted 3 lines

was here
cap_bset_inh_bounds.c:129: error: conflicting types for 'tst_exit' ../../../../include/test.h:203: error: previous declaration of

'tst_exit'

Quoted 2 lines

was here
cap_bset_inh_bounds.c:129: warning: data definition has no type or

storage

Quoted 11 lines

class
cap_bset_inh_bounds.c:130: error: syntax error before '}' token
------------

In this source, the pair of "ifdef" start/end and the pair of main() function's "parenthesis" are alternate, I think.

How about following patch?

Yup - although really the #ifdef HAVE_LIBCAP should be redundant as the testcases/kernel/security/cap_bound/Makefile shouldn't compile cap_bounds at all if HAVE_LIBCAP is not defined.

Quoted 1 line

Index: ./testcases/kernel/security/cap_bound/cap_bset_inh_bounds.c

Quoted 2 lines

============
--- ./testcases/kernel/security/cap_bound/cap_bset_inh_bounds.c

2010-04-01

Quoted 2 lines

16:15:00.000000000 +0900

+++ ./testcases/kernel/security/cap_bound/cap_bset_inh_bounds.c.ne w

Quoted 20 lines
2010-04-01 17:27:23.000000000 +0900
testcases/kernel/security/cap_bound/cap_bset_inh_bounds.c +2 -2
@@ -39,11 +39,11 @@
 
 int errno;
 
+int main(int argc, char *argv[])
+{
 #if HAVE_SYS_CAPABILITY_H
 #if HAVE_DECL_PR_CAPBSET_READ && HAVE_DECL_PR_CAPBSET_DROP
 #ifdef HAVE_LIBCAP
-int main(int argc, char *argv[])
-{
        int ret = 1;
        cap_value_t v[1];
        cap_flag_value_t f;

============

Thank you--

Quoted 16 lines
Quoted 5 lines

-Tomonori Mitani

------------------------------------------------------------------
------------

Quoted 9 lines

Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev

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

Signature · 16 lines
Thanks & Regards
Rishi
LTP Maintainer
IBM, LTC, Bangalore
Please join IRC #ltp @ irc.freenode.net

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#7 lore raw
Quoted 7 lines · Rishikesh K Rajak
Quoted 3 lines · Mitani

Sorry.
My patch was destroyed by e-mail.
I attach patch for "cap_bset_inh_bounds.c" file.

Will test and update to master by this weekend. It seems it has been already acked by serge.

I agree with Serge as it's a pretty obvious compile error if
HAVE_SYS_CAPABILITY_H isn't defined.
-Garrett

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list