public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] "check_netns_enabled.c" build failed with "2010-02-10" cvs
@ 2010-02-10  6:26 Mitani
  2010-02-10 23:25 ` Garrett Cooper
  0 siblings, 1 reply; 3+ messages in thread
From: Mitani @ 2010-02-10  6:26 UTC (permalink / raw)
  To: ltp-list

Hi,

I tried to build with "2010-02-10" cvs in my systems.
I tried in RHEL5.4 (2.6.18-164.el5) and RHEL4.8 (2.6.9-89.ELsmp).
But "make" failed in "check_netns_enabled.c" as follows in RHEL4.8:
------------
gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall
-I/home/LTP/ltp-2010-02-10/testcases/kernel/include
-I/home/LTP/ltp-2010-02-10/testcases/kernel/containers/netns/../libclone
-I../../../../include -I../../../../include
-L/home/LTP/ltp-2010-02-10/testcases/kernel/containers/netns/../libclone
-L../../../../lib  check_netns_enabled.c   -lltp -o check_netns_enabled
check_netns_enabled.c: In function `main':
check_netns_enabled.c:40: warning: implicit declaration of function
`unshare'
/tmp/cciXlXlf.o(.text+0x2c): In function `main':
/home/LTP/ltp-2010-02-10/testcases/kernel/containers/netns/check_netns_enabl
ed.c:40: undefined reference to `unshare'
collect2: ld returned 1 exit status
make[4]: *** [check_netns_enabled] Error 1
make[4]: Leaving directory
`/home/LTP/ltp-2010-02-10/testcases/kernel/containers/netns'
------------

"unshare()" function was supported after kernel 2.6.16.
Therefore, "make" of "check_netns_enabled.c" failed in RHEL4.8, I think.

I made patch and "make" succeeded:
============
--- ./testcases/kernel/containers/netns/check_netns_enabled.c   2008-09-19
21:17:10.000000000 +0900
+++ ./testcases/kernel/containers/netns/check_netns_enabled.c.new
2010-02-10 14:59:53.000000000 +0900
@@ -37,10 +37,12 @@
        if (tst_kvercmp(2,6,24) < 0)
                return 1;

+#ifdef HAVE_UNSHARE
         ret = unshare(flags);
        if ( ret < 0 ) {
                printf ("Error:Unshare syscall failed for network
namespace\n");
                return 3;
        }
+#endif
        return 0;
 }
============

I'm glad if I could get some opinions.


Thank you--


-Tomonori Mitani



------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LTP] "check_netns_enabled.c" build failed with "2010-02-10" cvs
  2010-02-10  6:26 [LTP] "check_netns_enabled.c" build failed with "2010-02-10" cvs Mitani
@ 2010-02-10 23:25 ` Garrett Cooper
  2010-02-11  5:00   ` Rishikesh
  0 siblings, 1 reply; 3+ messages in thread
From: Garrett Cooper @ 2010-02-10 23:25 UTC (permalink / raw)
  To: Mitani; +Cc: ltp-list

On Feb 9, 2010, at 10:26 PM, Mitani wrote:

> Hi,
> 
> I tried to build with "2010-02-10" cvs in my systems.
> I tried in RHEL5.4 (2.6.18-164.el5) and RHEL4.8 (2.6.9-89.ELsmp).
> But "make" failed in "check_netns_enabled.c" as follows in RHEL4.8:
> ------------
> gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall
> -I/home/LTP/ltp-2010-02-10/testcases/kernel/include
> -I/home/LTP/ltp-2010-02-10/testcases/kernel/containers/netns/../libclone
> -I../../../../include -I../../../../include
> -L/home/LTP/ltp-2010-02-10/testcases/kernel/containers/netns/../libclone
> -L../../../../lib  check_netns_enabled.c   -lltp -o check_netns_enabled
> check_netns_enabled.c: In function `main':
> check_netns_enabled.c:40: warning: implicit declaration of function
> `unshare'
> /tmp/cciXlXlf.o(.text+0x2c): In function `main':
> /home/LTP/ltp-2010-02-10/testcases/kernel/containers/netns/check_netns_enabl
> ed.c:40: undefined reference to `unshare'
> collect2: ld returned 1 exit status
> make[4]: *** [check_netns_enabled] Error 1
> make[4]: Leaving directory
> `/home/LTP/ltp-2010-02-10/testcases/kernel/containers/netns'
> ------------
> 
> "unshare()" function was supported after kernel 2.6.16.
> Therefore, "make" of "check_netns_enabled.c" failed in RHEL4.8, I think.
> 
> I made patch and "make" succeeded:
> ============
> --- ./testcases/kernel/containers/netns/check_netns_enabled.c   2008-09-19
> 21:17:10.000000000 +0900
> +++ ./testcases/kernel/containers/netns/check_netns_enabled.c.new
> 2010-02-10 14:59:53.000000000 +0900
> @@ -37,10 +37,12 @@
>        if (tst_kvercmp(2,6,24) < 0)
>                return 1;
> 
> +#ifdef HAVE_UNSHARE
>         ret = unshare(flags);
>        if ( ret < 0 ) {
>                printf ("Error:Unshare syscall failed for network
> namespace\n");
>                return 3;
>        }
> +#endif
>        return 0;
> }
> ============
> 
> I'm glad if I could get some opinions.

	Should be fixed now.
-Garrett
------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LTP] "check_netns_enabled.c" build failed with "2010-02-10" cvs
  2010-02-10 23:25 ` Garrett Cooper
@ 2010-02-11  5:00   ` Rishikesh
  0 siblings, 0 replies; 3+ messages in thread
From: Rishikesh @ 2010-02-11  5:00 UTC (permalink / raw)
  To: Garrett Cooper, Mitani; +Cc: ltp-list

On 02/11/2010 04:55 AM, Garrett Cooper wrote:
> On Feb 9, 2010, at 10:26 PM, Mitani wrote:
>
>    
>> Hi,
>>
>> I tried to build with "2010-02-10" cvs in my systems.
>> I tried in RHEL5.4 (2.6.18-164.el5) and RHEL4.8 (2.6.9-89.ELsmp).
>> But "make" failed in "check_netns_enabled.c" as follows in RHEL4.8:
>> ------------
>> gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall
>> -I/home/LTP/ltp-2010-02-10/testcases/kernel/include
>> -I/home/LTP/ltp-2010-02-10/testcases/kernel/containers/netns/../libclone
>> -I../../../../include -I../../../../include
>> -L/home/LTP/ltp-2010-02-10/testcases/kernel/containers/netns/../libclone
>> -L../../../../lib  check_netns_enabled.c   -lltp -o check_netns_enabled
>> check_netns_enabled.c: In function `main':
>> check_netns_enabled.c:40: warning: implicit declaration of function
>> `unshare'
>> /tmp/cciXlXlf.o(.text+0x2c): In function `main':
>> /home/LTP/ltp-2010-02-10/testcases/kernel/containers/netns/check_netns_enabl
>> ed.c:40: undefined reference to `unshare'
>> collect2: ld returned 1 exit status
>> make[4]: *** [check_netns_enabled] Error 1
>> make[4]: Leaving directory
>> `/home/LTP/ltp-2010-02-10/testcases/kernel/containers/netns'
>> ------------
>>
>> "unshare()" function was supported after kernel 2.6.16.
>> Therefore, "make" of "check_netns_enabled.c" failed in RHEL4.8, I think.
>>
>> I made patch and "make" succeeded:
>> ============
>> --- ./testcases/kernel/containers/netns/check_netns_enabled.c   2008-09-19
>> 21:17:10.000000000 +0900
>> +++ ./testcases/kernel/containers/netns/check_netns_enabled.c.new
>> 2010-02-10 14:59:53.000000000 +0900
>> @@ -37,10 +37,12 @@
>>         if (tst_kvercmp(2,6,24)<  0)
>>                 return 1;
>>
>> +#ifdef HAVE_UNSHARE
>>          ret = unshare(flags);
>>         if ( ret<  0 ) {
>>                 printf ("Error:Unshare syscall failed for network
>> namespace\n");
>>                 return 3;
>>         }
>> +#endif
>>         return 0;
>> }
>> ============
>>
>> I'm glad if I could get some opinions.
>>      
> 	Should be fixed now.
>    
Thanks,
Rishi

> -Garrett
> ------------------------------------------------------------------------------
> SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
> http://p.sf.net/sfu/solaris-dev2dev
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list
>    


-- 
Thanks&  Regards
Rishi Kesh K Rajak
IBM LTC, Bangalore
LTP Maintainer
Please join IRC: #ltp @ freenode.net


------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-02-11  5:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-10  6:26 [LTP] "check_netns_enabled.c" build failed with "2010-02-10" cvs Mitani
2010-02-10 23:25 ` Garrett Cooper
2010-02-11  5:00   ` Rishikesh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox