SQUASHME: Address Dridis nitpicks

parent bada81bf
......@@ -310,6 +310,7 @@ mgt_launch_child(struct cli *cli)
int i, cp[2];
struct rlimit rl[1];
vtim_dur dstart;
int bstart;
vtim_mono t0;
if (child_state != CH_STOPPED && child_state != CH_DIED)
......@@ -439,10 +440,10 @@ mgt_launch_child(struct cli *cli)
AN(child_std_vlu);
/* Wait for cache/cache_cli.c::CLI_Run() to check in */
dstart = vmax(mgt_param.startup_timeout, mgt_param.cli_timeout);
bstart = mgt_param.startup_timeout >= mgt_param.cli_timeout;
dstart = bstart ? mgt_param.startup_timeout : mgt_param.cli_timeout;
t0 = VTIM_mono();
if (VCLI_ReadResult(child_cli_in, &u, NULL, dstart)) {
int bstart = mgt_param.startup_timeout >= mgt_param.cli_timeout;
assert(u == CLIS_COMMS);
if (VTIM_mono() - t0 < dstart)
mgt_launch_err(cli, u, "Child failed on launch ");
......
......@@ -16,8 +16,8 @@ varnish v1 -expectexit 0x40
process p1 { varnishd \
-sdebug=debug,dinit=5s \
-pstartup_timeout=3s -pcli_timeout=2s \
-n ${tmpdir}/p1 -a :0 -b none 2>&1 } -start
process p1 -expect-exit 0x2 -wait
-n ${tmpdir}/p1 -a :0 -b none 2>&1
} -expect-exit 0x2 -run
process p1 -expect-text 0 0 \
"Child failed on launch within startup_timeout=3.00s"
......@@ -36,8 +36,8 @@ varnish v2 -expectexit 0x40
process p2 { varnishd \
-sdebug=debug,dopen=5s \
-pstartup_timeout=2s -pcli_timeout=3s \
-n ${tmpdir}/p2 -a :0 -b none} -start
process p2 -expect-exit 0x2 -wait
-n ${tmpdir}/p2 -a :0 -b none
} -expect-exit 0x2 -run
# expect-text does not work here because the panic info pushes the
# error out of the emulated terminal's view.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment