CHROMIUM: test_initctl: --no-dbus startup wait

With --no-dbus, we don't have a proper way to wait for Upstart to be
running, since all control mechanisms (e.g., initctl) will return
errors. Thus, this test is racy, and can in rare circumstances hit
things like:

...Ensure D-Bus still disabled on SIGUSR1
BAD: wrong value for WTERMSIG (status), expected 9 got 10
        at tests/test_initctl.c:11575 (test_no_dbus).
FAIL test_initctl (exit status: 134)

This means that we didn't even let Upstart start up far enough to
register its SIGUSR1 handler, and so kill(pid, SIGUSR1) immediately
kills Upstart with an exit status of WTERMSIG(SIGUSR1) instead of the
later-expected WTERMSIG(SIGKILL).

Let's add a startup.conf job, so we can poll for its log file
(startup.log) instead.

Tweak the WAIT_FOR_FILE() macro to avoid an up-front sleep while I'm at
it, as this can hide similar race conditions and slow down tests.

BUG=b:332653406, b:232122437
TEST=`FEATURES=test emerge-${BOARD} upstart`

Change-Id: I2b23a5238dc28d307ba6f57390a91c1ef9782da3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/upstart/+/5431194
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Tested-by: Brian Norris <briannorris@chromium.org>
Commit-Queue: Brian Norris <briannorris@chromium.org>
2 files changed