summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2025-10-15 16:30:20 +0200
committerRalph Boehme <slow@samba.org>2025-10-16 18:42:05 +0000
commite28dc4e98f100d73e93490a04993ca773d21cfad (patch)
treedaf0efa46d0b7c82c3810cbeff953fe3f23f66a2
parentd1ea929c6b994eea6315ed3bf3091b129eaf71a2 (diff)
downloadsamba-e28dc4e98f100d73e93490a04993ca773d21cfad.tar.gz
samba-e28dc4e98f100d73e93490a04993ca773d21cfad.tar.bz2
samba-e28dc4e98f100d73e93490a04993ca773d21cfad.zip
smbtorture: fix regression in smb2.bench
The changes in b6757378be23 caused a regression where only the first connection was used. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15934 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Thu Oct 16 18:42:05 UTC 2025 on atb-devel-224
-rw-r--r--source4/torture/smb2/bench.c64
1 files changed, 24 insertions, 40 deletions
diff --git a/source4/torture/smb2/bench.c b/source4/torture/smb2/bench.c
index 48c7aabea4f..08b9ab513ac 100644
--- a/source4/torture/smb2/bench.c
+++ b/source4/torture/smb2/bench.c
@@ -445,17 +445,13 @@ static bool test_smb2_bench_echo(struct torture_context *tctx,
}
}
- for (li = 0, i = 0; i <state->num_conns; i++) {
- size_t pcli;
+ for (li = 0; li <state->num_loops; li++) {
+ struct test_smb2_bench_echo_loop *loop = &state->loops[li];
- for (pcli = 0; pcli < torture_qdepth; pcli++) {
- struct test_smb2_bench_echo_loop *loop = &state->loops[li];
-
- tevent_schedule_immediate(loop->im,
- tctx->ev,
- test_smb2_bench_echo_loop_start,
- loop);
- }
+ tevent_schedule_immediate(loop->im,
+ tctx->ev,
+ test_smb2_bench_echo_loop_start,
+ loop);
}
torture_comment(tctx, "Opened %zu connections with qdepth=%d => %zu loops\n",
@@ -927,17 +923,13 @@ bool test_smb2_bench_path_contention_shared(struct torture_context *tctx,
}
}
- for (li = 0, i = 0; i <state->num_conns; i++) {
- size_t pcli;
+ for (li = 0; li <state->num_loops; li++) {
+ struct test_smb2_bench_path_contention_shared_loop *loop = &state->loops[li];
- 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,
- test_smb2_bench_path_contention_loop_start,
- loop);
- }
+ tevent_schedule_immediate(loop->im,
+ tctx->ev,
+ test_smb2_bench_path_contention_loop_start,
+ loop);
}
torture_comment(tctx, "Opened %zu connections with qdepth=%d => %zu loops\n",
@@ -1347,17 +1339,13 @@ static bool test_smb2_bench_read(struct torture_context *tctx,
}
}
- for (li = 0, i = 0; i <state->num_conns; i++) {
- size_t pcli;
+ for (li = 0; li <state->num_loops; li++) {
+ struct test_smb2_bench_read_loop *loop = &state->loops[li];
- for (pcli = 0; pcli < torture_qdepth; pcli++) {
- struct test_smb2_bench_read_loop *loop = &state->loops[li];
-
- tevent_schedule_immediate(loop->im,
- tctx->ev,
- test_smb2_bench_read_loop_start,
- loop);
- }
+ tevent_schedule_immediate(loop->im,
+ tctx->ev,
+ test_smb2_bench_read_loop_start,
+ loop);
}
torture_comment(tctx, "Opened %zu connections with qdepth=%d => %zu loops\n",
@@ -1833,17 +1821,13 @@ static bool test_smb2_bench_session_setup(struct torture_context *tctx,
}
}
- for (li = 0, i = 0; i <state->num_conns; i++) {
- size_t pcli;
+ for (li = 0; li <state->num_loops; li++) {
+ struct test_smb2_bench_session_setup_shared_loop *loop = &state->loops[li];
- 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,
- test_smb2_bench_session_setup_loop_start,
- loop);
- }
+ tevent_schedule_immediate(loop->im,
+ tctx->ev,
+ test_smb2_bench_session_setup_loop_start,
+ loop);
}
torture_comment(tctx, "Opened %zu connections with qdepth=%d => %zu loops\n",