[Date Prev][Date Next]
(ITS#3952) Patch: 'make test' does not fail at all errors
Full_Name: Hallvard B Furuseth
Submission from: (NULL) (184.108.40.206)
Submitted by: hallvard
'make test' does not fail if a subprocess fails. Also, sometimes
it does 'exit $RC' when RC can be 0 and that is an error.
I hope to commit this fairly quickly, before someone changes some
tests too much. However:
I cannot test this with sql, just a plain "make test" with
--enable-<backends, overlays, aci, crypt> --disable-<sql, perl>.
And 'make test' currently hangs in test038 (bdb) anyway.
I don't know what the scripts/start-server* programs are used for.
So I don't know if the changes to them (noted below) are correct. I
assume they should kill slapd if they fail, but maybe they should not
obey $KILLSERVERS (the ./run -k flag)?
I'm not sure if I should just go ahead and commit it anyway?
* Fail if a subprocess failed. To achieve this:
- Wait for subprocess after killing them.
- Since this means the test will hang if a subprocess is hanging,
print "Shutting down and waiting for subprocesses." first.
Also change some other messages about processes.
- all, sql-all, test030-relay: Do not "wait for things to exit".
- test030-relay: Fail if one of the relay runs failed.
* passwd-search, test005-modrdn: Obey the ./run -k option.
* test008-concurrency: Delete pointless wait for (foreground) slapadd.
* start-server*: If these scripts return failure, kill and wait for
slapd first - unless $KILLSERVERS (the ./run -k option) is set.
* Kill subprocesses before exit a few places where that was missing.
* When RC=0 and that is an error, set RC=99 before any 'exit $RC'.
* Set $PIDNAME_<pid>='textual name of process' for all background
processes. Used to report which process failed or is being killed.
* New variables $DO_KILL / $DO_KILL_ONE: Eval them to kill processes.