From: Stefan Metzmacher Date: Fri, 16 May 2025 11:41:21 +0000 (+0200) Subject: s4:torture/smb2: let smb2.bench tests start the loop only when everything is ready X-Git-Tag: tevent-0.17.0~162 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b6757378be238985d2b5d514219e8fc9d0ab04ee;p=thirdparty%2Fsamba.git s4:torture/smb2: let smb2.bench tests start the loop only when everything is ready Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider Autobuild-User(master): Stefan Metzmacher Autobuild-Date(master): Fri May 16 13:41:56 UTC 2025 on atb-devel-224 --- diff --git a/source4/torture/smb2/bench.c b/source4/torture/smb2/bench.c index 2474028a723..e16409bae18 100644 --- a/source4/torture/smb2/bench.c +++ b/source4/torture/smb2/bench.c @@ -442,6 +442,14 @@ static bool test_smb2_bench_echo(struct torture_context *tctx, loop->conn = &state->conns[i]; loop->im = tevent_create_immediate(state->loops); torture_assert(tctx, loop->im != NULL, __location__); + } + } + + for (li = 0, i = 0; i num_conns; i++) { + size_t pcli; + + for (pcli = 0; pcli < torture_qdepth; pcli++) { + struct test_smb2_bench_echo_loop *loop = &state->loops[li]; tevent_schedule_immediate(loop->im, tctx->ev, @@ -916,6 +924,14 @@ bool test_smb2_bench_path_contention_shared(struct torture_context *tctx, torture_assert(tctx, loop->im != NULL, __location__); loop->opens.io = open_io; loop->closes.io = close_io; + } + } + + for (li = 0, i = 0; i num_conns; i++) { + size_t pcli; + + for (pcli = 0; pcli < torture_qdepth; pcli++) { + struct test_smb2_bench_path_contention_shared_loop *loop = &state->loops[li]; tevent_schedule_immediate(loop->im, tctx->ev, @@ -1328,6 +1344,14 @@ static bool test_smb2_bench_read(struct torture_context *tctx, sfinfo.end_of_file_info.in.size = state->io_size; status = smb2_setinfo_file(state->conns[i].tree, &sfinfo); CHECK_STATUS(status, NT_STATUS_OK); + } + } + + for (li = 0, i = 0; i num_conns; i++) { + size_t pcli; + + for (pcli = 0; pcli < torture_qdepth; pcli++) { + struct test_smb2_bench_read_loop *loop = &state->loops[li]; tevent_schedule_immediate(loop->im, tctx->ev, @@ -1805,6 +1829,14 @@ static bool test_smb2_bench_session_setup(struct torture_context *tctx, loop->conn = &state->conns[i]; loop->im = tevent_create_immediate(state->loops); torture_assert(tctx, loop->im != NULL, __location__); + } + } + + for (li = 0, i = 0; i num_conns; i++) { + size_t pcli; + + for (pcli = 0; pcli < torture_qdepth; pcli++) { + struct test_smb2_bench_session_setup_shared_loop *loop = &state->loops[li]; tevent_schedule_immediate(loop->im, tctx->ev,