All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] Design question around ltp-list
@ 2014-03-17 10:11 Mats Liljegren
  2014-03-17 12:39 ` Carlos Hernandez
  2014-03-17 13:56 ` chrubis
  0 siblings, 2 replies; 4+ messages in thread
From: Mats Liljegren @ 2014-03-17 10:11 UTC (permalink / raw)
  To: ltp-list

I'd like to create a time-boxed test case, i.e. the test will run for a certain amount of time and if nothing goes wrong during this time, the test passed.

This would also need to be recursive. So when starting my test, it in turn will start some test cases to be used as a system load. These loads are simple application that will run until killed. My intention was to start them using ltp-pan.

So imagine my test case is started with ltp-pan, where a running time has been specified. My test case in turn will use ltp-pan to start an application that only exits when killed. What will happen when the first ltp-pan invocation times out? Will it automatically kill child ltp-pan instances, and they in turn kill the load applications?

Or how are you supposed to do such a test case?

/Mats

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] Design question around ltp-list
  2014-03-17 10:11 [LTP] Design question around ltp-list Mats Liljegren
@ 2014-03-17 12:39 ` Carlos Hernandez
  2014-03-17 13:56 ` chrubis
  1 sibling, 0 replies; 4+ messages in thread
From: Carlos Hernandez @ 2014-03-17 12:39 UTC (permalink / raw)
  To: Mats Liljegren; +Cc: ltp-list

Mats,

You may be able to use runltp's -c option to create background load.

Carlos
On 03/17/2014 06:11 AM, Mats Liljegren wrote:
> I'd like to create a time-boxed test case, i.e. the test will run for a certain amount of time and if nothing goes wrong during this time, the test passed.
>
> This would also need to be recursive. So when starting my test, it in turn will start some test cases to be used as a system load. These loads are simple application that will run until killed. My intention was to start them using ltp-pan.
>
> So imagine my test case is started with ltp-pan, where a running time has been specified. My test case in turn will use ltp-pan to start an application that only exits when killed. What will happen when the first ltp-pan invocation times out? Will it automatically kill child ltp-pan instances, and they in turn kill the load applications?
>
> Or how are you supposed to do such a test case?
>
> /Mats
>
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/13534_NeoTech
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] Design question around ltp-list
  2014-03-17 10:11 [LTP] Design question around ltp-list Mats Liljegren
  2014-03-17 12:39 ` Carlos Hernandez
@ 2014-03-17 13:56 ` chrubis
       [not found]   ` <0247700D01F14443B9209F90AD938CC524366738@sestoex05.enea.se>
  1 sibling, 1 reply; 4+ messages in thread
From: chrubis @ 2014-03-17 13:56 UTC (permalink / raw)
  To: Mats Liljegren; +Cc: ltp-list

Hi!
> I'd like to create a time-boxed test case, i.e. the test will run for
> a certain amount of time and if nothing goes wrong during this time,
> the test passed.
>
> This would also need to be recursive. So when starting my test, it in
> turn will start some test cases to be used as a system load. These
> loads are simple application that will run until killed. My intention
> was to start them using ltp-pan.
>
> So imagine my test case is started with ltp-pan, where a running time
> has been specified. My test case in turn will use ltp-pan to start an
> application that only exits when killed. What will happen when the
> first ltp-pan invocation times out? Will it automatically kill child
> ltp-pan instances, and they in turn kill the load applications?
>
> Or how are you supposed to do such a test case?

LTP testcases are self-contained and does not depend on any test driver
(i.e. ltp-pan). Moreover ltp-pan may be replaced with a better test
driver in the future.

If you need a background load while your test is running you should fork
a child process from the test itself and do the load from the child. The
test is also responsible for cleaning up later.

All that you need to start a LTP test should be executing the binary
(you may need to modify $PATH, set $LTP_DEV etc. but that should be
all). Also note that these are allready set if you are in the middle of
LTP testcase execution.

Also note that you can start a LTP testcase just by doing exec() with
right testname from another testcase (becase all of the test binaries
are in $PATH).

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] Design question around ltp-list
       [not found]   ` <0247700D01F14443B9209F90AD938CC524366738@sestoex05.enea.se>
@ 2014-03-17 16:23     ` chrubis
  0 siblings, 0 replies; 4+ messages in thread
From: chrubis @ 2014-03-17 16:23 UTC (permalink / raw)
  To: Mats Liljegren; +Cc: ltp-list

Hi!
> That means I get no support for errors occurring when executing the
> load, i.e. I have to check the return value myself and give correct
> diagnostic message. Not a real problem, just more work to do...

That is mostly one waitpid() in parent, you don't have to overdo the
error conditions checks. There is always possibility that something
unexpected will happen. The most appropripate behavior is to fail the
test and expect user to check what has happened.

> But now I know I should avoid ltp-pan, thanks!

I'm not even sure that running pan from pan would work fine. There is
really tricky stuff with terminal controll and sessions that allows it
to kill test leftover processes which may cause really strange behavior.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

end of thread, other threads:[~2014-03-17 16:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-17 10:11 [LTP] Design question around ltp-list Mats Liljegren
2014-03-17 12:39 ` Carlos Hernandez
2014-03-17 13:56 ` chrubis
     [not found]   ` <0247700D01F14443B9209F90AD938CC524366738@sestoex05.enea.se>
2014-03-17 16:23     ` chrubis

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.