Commit Graph

4 Commits

Author SHA1 Message Date
Diego Elio Pettenò
d86ce05797 commandtest: avoid printing loader-control variables from commandhelper
This avoids throwing the tests off if LD_LIBRARY_PATH or LD_PRELOAD or
other variables are set.

Signed-off-by: Diego Elio Pettenò <flameeyes@gmail.com>
2011-01-06 14:21:17 -07:00
Eric Blake
630fe36f06 tests: avoid data race
I got some spurious failures when commandhelper won the race and
ran to the point of parent detection prior to the intermediate
daemonizing process getting a chance to exit.  This fixes it.

* tests/commandhelper.c (main): Checking for re-parenting to
init(1) is racy; instead check that we belong to a new session.
2010-12-20 10:29:50 -07:00
Jiri Denemark
58d0f4d737 tests: Don't ignore return value of getcwd() 2010-12-06 10:12:01 +01:00
Daniel P. Berrange
f16ad06fb2 Introduce new APIs for spawning processes
This introduces a new set of APIs in src/util/command.h
to use for invoking commands. This is intended to replace
all current usage of virRun and virExec variants, with a
more flexible and less error prone API.

* src/util/command.c: New file.
* src/util/command.h: New header.
* src/Makefile.am (UTIL_SOURCES): Build it.
* src/libvirt_private.syms: Export symbols internally.
* tests/commandtest.c: New test.
* tests/Makefile.am (check_PROGRAMS): Run it.
* tests/commandhelper.c: Auxiliary program.
* tests/commanddata/test2.log - test15.log: New expected outputs.
* cfg.mk (useless_free_options): Add virCommandFree.
(msg_gen_function): Add virCommandError.
* po/POTFILES.in: New translation.
* .x-sc_avoid_write: Add exemption.
* tests/.gitignore: Ignore new built file.
2010-12-02 16:00:44 -07:00