CHROMIUM: test_initctl: Wait for D-Bus after reexec

The "ensure Session Init retains D-Bus address across a re-exec" test
case is a bit of a special case; it starts Upstart in --user mode, and
re-execs it, and then checks that we can still reach it over the public
D-Bus session. However, the "re-exec" test logic (particularly,
REEXEC_UPSTART() -> wait_for_upstart(pid)) only ensures the private
connection is up and running; it doesn't ensure that we've completed
registering with the shared message bus.

This can manifest as rare (especially when playing with sleep delays,
and with subsequent CLs that remove some excess sleep delays) failures
that look something like:

BAD: wrong string value, expected 'init (upstart [0-9.][0-9.]*' got 'initctl: Name "com.ubuntu.Upstart" does not exist'
	at tests/test_initctl.c:18353 (test_dbus_connection).
FAIL test_initctl (exit status: 134)

Other test cases don't have this problem because they aren't mixing the
|user| and non-|user| control interfaces the same way.

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

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