Re: Background processes in GNU Autotest

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Mike,

On 22.06.2016 21:12, Mike Frysinger wrote:
> On 22 Jun 2016 11:03, Olaf Mandel wrote:
>> I am trying to use GNU Autotest (via AX_GNU_AUTOTEST()) to run
>> end-to-end tests on a network server. [...]
>>
>> AT_CHECK([server&],        , [ignore])
>> AT_CHECK([client --cmd]),  , [expected-output])
>> AT_CHECK([killall server], , [ignore])
>>
-Snipp-
>> Now I want to combine this with valgrind checking [...]
>>
>> valgrind --error-exitcode=1 --quiet ./server &
>>
-Snipp-
> 
> wouldn't you want the test itself to spin up/down the server as need
> be ?  that way you can write multiple end-to-end tests and have them
> all run in parallel.
> 
You mean my "client" program starting the server itself? Didn't think of
that... it would solve the cleanup question during testing. I see that
valgrind provides the --trace-children=yes option: I will have to try if
this gives suitable debugging information (I am mostly interested in
memory debugging the real server, not the client that was only written
for testing).

> i'm guessing your method described above also doesn't work when you
> try to run all the tests in parallel.

Right. This would already fail because the TCP port would be blocked and
there is no reliable way to feed back the port number from the server to
the client (and no: I can't use Unix sockets instead of TCP ports
without extending some external library). But here the suggestion of
forking the server from the client may help as well: the client can try
starting the server on different ports until one works.

Thank you for the suggestion,
Olaf

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux