All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] Correlation between test cases and .c files
@ 2017-03-30 13:13 Jonatas Bastos
  2017-03-30 13:22 ` Cyril Hrubis
  0 siblings, 1 reply; 4+ messages in thread
From: Jonatas Bastos @ 2017-03-30 13:13 UTC (permalink / raw)
  To: ltp

I`m a PhD student interested in run some studies with the different LTP
releases. I would like to know how can I correlate tests cases with .c file
that contain the test case ?
All test cases listed in runtest/ directory. each file in side it contains
the list of test.

For example:  ltp-20011206 the file crashme in the runtest/ directory
contains

# Before running these: BACKUP YOUR SYSTEM!  you've been warned!
f00f f00f
# This is a simple test for handling of the pentium f00f bug.
# It is an example of a catistrophic test case.  If the system
# doesn't correctly handle this test, it will likely lockup.
crash01 crash01
# Generate random code and execute it. Read f00f comment,
# this test lockup SunOS,WindowsNT,etc. in seconds..
crash02 crash02
# Generate random syscalls and execute them, less probability
# to hose your system, but still.
mem01 mem01 -r
# Memory eater. Loves to be run in parallel with other programs.
# May panic on buggy systems if the OOM killer was not fast enough :-)
proc01 proc01
# Read every file in /proc. Not likely to crash, but does enough
# to disturb the kernel. A good kernel latency killer too.

Where the relations between f001 test case and the respective test file
(code) is established ? I need to inspect the code for each test case and
get some metrics.


-- 
Jonatas Bastos
------------------------------------------------------------ --------
Professor de Computação no Instituto Federal (IFBA)
M.Sc. Computer Science - CIn/UFPE
skype: jonatasfbastos
gtalk: jonatasfbastos@...

“Face your fears, live your dreams"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20170330/8a3bf771/attachment-0001.html>

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

* [LTP] Correlation between test cases and .c files
  2017-03-30 13:13 [LTP] Correlation between test cases and .c files Jonatas Bastos
@ 2017-03-30 13:22 ` Cyril Hrubis
  2017-04-30 21:19   ` Jonatas Bastos
  0 siblings, 1 reply; 4+ messages in thread
From: Cyril Hrubis @ 2017-03-30 13:22 UTC (permalink / raw)
  To: ltp

Hi!
> I`m a PhD student interested in run some studies with the different LTP
> releases. I would like to know how can I correlate tests cases with .c file
> that contain the test case ?
> All test cases listed in runtest/ directory. each file in side it contains
> the list of test.

The runtest file syntax is simple:

* Start of the line until first whitespace is test id
  the rest of the line is command line to be executed

* Every line starting with # is comment

> For example:  ltp-20011206 the file crashme in the runtest/ directory
> contains
> 
> # Before running these: BACKUP YOUR SYSTEM!  you've been warned!
> f00f f00f
> # This is a simple test for handling of the pentium f00f bug.
> # It is an example of a catistrophic test case.  If the system
> # doesn't correctly handle this test, it will likely lockup.
> crash01 crash01
> # Generate random code and execute it. Read f00f comment,
> # this test lockup SunOS,WindowsNT,etc. in seconds..
> crash02 crash02
> # Generate random syscalls and execute them, less probability
> # to hose your system, but still.
> mem01 mem01 -r
> # Memory eater. Loves to be run in parallel with other programs.
> # May panic on buggy systems if the OOM killer was not fast enough :-)
> proc01 proc01
> # Read every file in /proc. Not likely to crash, but does enough
> # to disturb the kernel. A good kernel latency killer too.
> 
> Where the relations between f001 test case and the respective test file
> (code) is established ? I need to inspect the code for each test case and
> get some metrics.

All test binaries are installed into a single directory. To get the test
source you need to locate the executable name in the command line part
of the corresponding line, then do something as find -name foo* in the
LTP source tree. You will likely end up either with C source or a shell
script.

-- 
Cyril Hrubis
chrubis@suse.cz

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

* [LTP] Correlation between test cases and .c files
  2017-03-30 13:22 ` Cyril Hrubis
@ 2017-04-30 21:19   ` Jonatas Bastos
  2017-05-02 10:35     ` Cyril Hrubis
  0 siblings, 1 reply; 4+ messages in thread
From: Jonatas Bastos @ 2017-04-30 21:19 UTC (permalink / raw)
  To: ltp

We asked you about the testcases and their code. During our analysis we
need to link the testcase name located at each lines of the files at runtest/
directory

folder and its .c or .sh file. We saw that some tests (first word of each
line) did not have any .c or .sh with the same name. Could you please
explain it? There is no .c or .sh file for each line of runtest/ directory
files? How can I correlate testscase with .c file that contain the test
case ?

On Thu, Mar 30, 2017 at 10:22 AM, Cyril Hrubis <chrubis@suse.cz> wrote:

> Hi!
> > I`m a PhD student interested in run some studies with the different LTP
> > releases. I would like to know how can I correlate tests cases with .c
> file
> > that contain the test case ?
> > All test cases listed in runtest/ directory. each file in side it
> contains
> > the list of test.
>
> The runtest file syntax is simple:
>
> * Start of the line until first whitespace is test id
>   the rest of the line is command line to be executed
>
> * Every line starting with # is comment
>
> > For example:  ltp-20011206 the file crashme in the runtest/ directory
> > contains
> >
> > # Before running these: BACKUP YOUR SYSTEM!  you've been warned!
> > f00f f00f
> > # This is a simple test for handling of the pentium f00f bug.
> > # It is an example of a catistrophic test case.  If the system
> > # doesn't correctly handle this test, it will likely lockup.
> > crash01 crash01
> > # Generate random code and execute it. Read f00f comment,
> > # this test lockup SunOS,WindowsNT,etc. in seconds..
> > crash02 crash02
> > # Generate random syscalls and execute them, less probability
> > # to hose your system, but still.
> > mem01 mem01 -r
> > # Memory eater. Loves to be run in parallel with other programs.
> > # May panic on buggy systems if the OOM killer was not fast enough :-)
> > proc01 proc01
> > # Read every file in /proc. Not likely to crash, but does enough
> > # to disturb the kernel. A good kernel latency killer too.
> >
> > Where the relations between f001 test case and the respective test file
> > (code) is established ? I need to inspect the code for each test case and
> > get some metrics.
>
> All test binaries are installed into a single directory. To get the test
> source you need to locate the executable name in the command line part
> of the corresponding line, then do something as find -name foo* in the
> LTP source tree. You will likely end up either with C source or a shell
> script.
>
> --
> Cyril Hrubis
> chrubis@suse.cz
>



-- 
Jonatas Bastos
------------------------------------------------------------ --------
Professor de Computação no Instituto Federal (IFBA)
M.Sc. Computer Science - CIn/UFPE
skype: jonatasfbastos
gtalk: jonatasfbastos@...

“Face your fears, live your dreams"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20170430/268ed11f/attachment.html>

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

* [LTP] Correlation between test cases and .c files
  2017-04-30 21:19   ` Jonatas Bastos
@ 2017-05-02 10:35     ` Cyril Hrubis
  0 siblings, 0 replies; 4+ messages in thread
From: Cyril Hrubis @ 2017-05-02 10:35 UTC (permalink / raw)
  To: ltp

Hi!
> We asked you about the testcases and their code. During our analysis we
> need to link the testcase name located at each lines of the files at runtest/
> directory
> 
> folder and its .c or .sh file. We saw that some tests (first word of each
> line) did not have any .c or .sh with the same name. Could you please
> explain it? There is no .c or .sh file for each line of runtest/ directory
> files? How can I correlate testscase with .c file that contain the test
> case ?

The first word on the line is just test name, that does not necessarily
correspond to a binary name or shell script filename. You have to look
at the rest of the line which is the command line to be executed as that
actually contains the binary or shell script filename, which then could
be used to find the test source code.

Do not be confused with the fact that most of the testcases have the
same test name (tag) as executable filename, this is not necessarily
true.

-- 
Cyril Hrubis
chrubis@suse.cz

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

end of thread, other threads:[~2017-05-02 10:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-30 13:13 [LTP] Correlation between test cases and .c files Jonatas Bastos
2017-03-30 13:22 ` Cyril Hrubis
2017-04-30 21:19   ` Jonatas Bastos
2017-05-02 10:35     ` Cyril Hrubis

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.