Skip to contentSkip to conversation

How to run individual C testcase file like ltp/testcases/kernel/containers/pidns/pidns01.c

LTP Abhishek Dasgupta 2 participants 4 messages Sep 28, 2015 – Sep 30, 2015 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hi,

I am new to LTP and developing a testcase under pidns. I want to
start with , if there is any way to run , suppose pidns01.c using only gcc command. Only using gcc command, it should be possible to run pidns01.c as the file contains main program. I am also interested in knowing the parameters used to call the file using gcc command.

Regards,

---------------------------------------------------------------------------------------
Abhishek Dasgupta
Linux Software Developer - Linux Technology Centre IBM Systems Lab,
IBM India Pvt. Ltd.
Embassy Golf Link, D Block
Koramongala - Off Indiranagar Ring Road Bangalore - 560 071
Mobile: +91-8884107981
---------------------------------------------------------------------------------------

#1 lore raw

Hi!

Quoted 5 lines

I am new to LTP and developing a testcase under pidns. I want to
start with , if there is any way to run , suppose pidns01.c using only gcc command. Only using gcc command, it should be possible to run pidns01.c as the file contains main program. I am also interested in knowing the parameters used to call the file using gcc command.

This does not make any sense at all. You speak about running testcases then continue to talk about the gcc compiler.

What do you want to do? Compile individual test? Run individual test? Or both?

Signature · 2 lines
Cyril Hrubis
[email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

Hi!

Quoted 3 lines

I want to compile and run all the individual testcase (like, pidns01.c from ltp/testcases/kernel/containers/pidns/pidns01.c) only from github source files. If there is any way to do this?

There is an howto for building LTP from git checkout:

https://github.com/linux-test-project/ltp/blob/master/doc/mini-howto-building-ltp-from-git.txt

All you need is basically:

make autotools
./configure --prefix=$PREFIX
make

Which will create binary for each of the pidns testcases. Then you can just run them.

[CC: The LTP mailing list, you should always at least CC it when asking
questions about LTP]

Signature · 2 lines
Cyril Hrubis
[email protected]
#4 lore raw

Thank you Cyril for your reply. It helped me a lot.

Quoted 20 lines · Cyril Hrubis

Hi!

Quoted 3 lines

I want to compile and run all the individual testcase (like, pidns01.c from ltp/testcases/kernel/containers/pidns/pidns01.c) only from github source files. If there is any way to do this?

There is an howto for building LTP from git checkout:

https://github.com/linux-test-project/ltp/blob/master/doc/mini-howto-building-ltp-from-git.txt

All you need is basically:

make autotools
./configure --prefix=$PREFIX
make

Which will create binary for each of the pidns testcases. Then you can just run them.

[CC: The LTP mailing list, you should always at least CC it when asking
questions about LTP]

Signature · 12 lines
   Regards,

   ---------------------------------------------------------------------------------------
   Abhishek Dasgupta
   Linux Software Developer - Linux Technology Centre
   IBM Systems Lab,
   IBM India Pvt. Ltd.
   Embassy Golf Link, D Block
   Koramongala - Off Indiranagar Ring Road
   Bangalore - 560 071
   Mobile: +91-8884107981
   ---------------------------------------------------------------------------------------