Skip to content

Commit 1ae6eec

Browse files
committed
SMB servers: vendor smb-consumer-maxreadsize fixture (smb2 0.9.1)
smb2 0.9.1 promoted the chunked-IO fixture from its `internal/` set to its consumer-class set. Re-vendor `.compose/` to pick up the new `smb-consumer-maxreadsize` Dockerfile + smb.conf, bump the dep, and add the container to `start.sh core` so the local rust check (and CI) spin it up automatically. Provides a small 64 KB max_read/max_write fixture for any test that needs to force the streaming-fallback path without bringing in the smb2 internal-fixture compose stack.
1 parent 5553103 commit 1ae6eec

6 files changed

Lines changed: 56 additions & 19 deletions

File tree

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/desktop/src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ mdns-sd = { version = "0.19", features = ["logging"] }
170170
# SMB2/3 protocol client for share enumeration (pure Rust, pipelined I/O).
171171
# When bumping: also re-vendor the test containers per
172172
# apps/desktop/test/smb-servers/.compose/VENDORED.md
173-
smb2 = "0.9.0"
173+
smb2 = "0.9.1"
174174
# NFD normalization for APFS collation and SMB path normalization
175175
unicode-normalization = "0.1"
176176

apps/desktop/test/smb-servers/.compose/docker-compose.yml

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,84 +3,90 @@ services:
33
build:
44
context: smb-consumer-guest
55
ports:
6-
- '${SMB_CONSUMER_GUEST_PORT:-10480}:445'
6+
- "${SMB_CONSUMER_GUEST_PORT:-10480}:445"
77

88
smb-consumer-auth:
99
build:
1010
context: smb-consumer-auth
1111
ports:
12-
- '${SMB_CONSUMER_AUTH_PORT:-10481}:445'
12+
- "${SMB_CONSUMER_AUTH_PORT:-10481}:445"
1313

1414
smb-consumer-both:
1515
build:
1616
context: smb-consumer-both
1717
ports:
18-
- '${SMB_CONSUMER_BOTH_PORT:-10482}:445'
18+
- "${SMB_CONSUMER_BOTH_PORT:-10482}:445"
1919

2020
smb-consumer-50shares:
2121
build:
2222
context: smb-consumer-50shares
2323
ports:
24-
- '${SMB_CONSUMER_50SHARES_PORT:-10483}:445'
24+
- "${SMB_CONSUMER_50SHARES_PORT:-10483}:445"
2525

2626
smb-consumer-unicode:
2727
build:
2828
context: smb-consumer-unicode
2929
ports:
30-
- '${SMB_CONSUMER_UNICODE_PORT:-10484}:445'
30+
- "${SMB_CONSUMER_UNICODE_PORT:-10484}:445"
3131

3232
smb-consumer-longnames:
3333
build:
3434
context: smb-consumer-longnames
3535
ports:
36-
- '${SMB_CONSUMER_LONGNAMES_PORT:-10485}:445'
36+
- "${SMB_CONSUMER_LONGNAMES_PORT:-10485}:445"
3737

3838
smb-consumer-deepnest:
3939
build:
4040
context: smb-consumer-deepnest
4141
ports:
42-
- '${SMB_CONSUMER_DEEPNEST_PORT:-10486}:445'
42+
- "${SMB_CONSUMER_DEEPNEST_PORT:-10486}:445"
4343

4444
smb-consumer-manyfiles:
4545
build:
4646
context: smb-consumer-manyfiles
4747
ports:
48-
- '${SMB_CONSUMER_MANYFILES_PORT:-10487}:445'
48+
- "${SMB_CONSUMER_MANYFILES_PORT:-10487}:445"
4949

5050
smb-consumer-readonly:
5151
build:
5252
context: smb-consumer-readonly
5353
ports:
54-
- '${SMB_CONSUMER_READONLY_PORT:-10488}:445'
54+
- "${SMB_CONSUMER_READONLY_PORT:-10488}:445"
5555

5656
smb-consumer-windows:
5757
build:
5858
context: smb-consumer-windows
5959
ports:
60-
- '${SMB_CONSUMER_WINDOWS_PORT:-10489}:445'
60+
- "${SMB_CONSUMER_WINDOWS_PORT:-10489}:445"
6161

6262
smb-consumer-synology:
6363
build:
6464
context: smb-consumer-synology
6565
ports:
66-
- '${SMB_CONSUMER_SYNOLOGY_PORT:-10490}:445'
66+
- "${SMB_CONSUMER_SYNOLOGY_PORT:-10490}:445"
6767

6868
smb-consumer-linux:
6969
build:
7070
context: smb-consumer-linux
7171
ports:
72-
- '${SMB_CONSUMER_LINUX_PORT:-10491}:445'
72+
- "${SMB_CONSUMER_LINUX_PORT:-10491}:445"
7373

7474
smb-consumer-flaky:
7575
build:
7676
context: smb-consumer-flaky
7777
ports:
78-
- '${SMB_CONSUMER_FLAKY_PORT:-10492}:445'
78+
- "${SMB_CONSUMER_FLAKY_PORT:-10492}:445"
7979

8080
smb-consumer-slow:
8181
build:
8282
context: smb-consumer-slow
8383
ports:
84-
- '${SMB_CONSUMER_SLOW_PORT:-10493}:445'
84+
- "${SMB_CONSUMER_SLOW_PORT:-10493}:445"
8585
cap_add:
8686
- NET_ADMIN
87+
88+
smb-consumer-maxreadsize:
89+
build:
90+
context: smb-consumer-maxreadsize
91+
ports:
92+
- "${SMB_CONSUMER_MAXREADSIZE_PORT:-10494}:445"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM alpine:3.21
2+
RUN apk add --no-cache samba
3+
COPY smb.conf /etc/samba/smb.conf
4+
RUN mkdir -p /shares/public && chmod 777 /shares/public
5+
EXPOSE 445
6+
HEALTHCHECK --interval=2s --timeout=3s --retries=10 \
7+
CMD nc -z localhost 445
8+
CMD ["smbd", "--foreground", "--no-process-group", "--debug-stdout"]
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[global]
2+
server role = standalone server
3+
server min protocol = SMB2_02
4+
server max protocol = SMB3_11
5+
map to guest = Bad User
6+
log level = 1
7+
# Force tiny read/write sizes (64 KB) so every multi-MB transfer is
8+
# chunked. Lets consumer tests exercise the streaming-write fallback
9+
# path that historically deadlocked when wrapped in a single-shared-
10+
# session mutex; consumers can use this fixture as a regression guard
11+
# without standing up the internal-fixture smb-maxreadsize container.
12+
smb2 max read = 65536
13+
smb2 max write = 65536
14+
smb2 max trans = 65536
15+
16+
[public]
17+
path = /shares/public
18+
read only = no
19+
guest ok = yes
20+
browseable = yes
21+
create mask = 0666
22+
directory mask = 0777

apps/desktop/test/smb-servers/start.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,11 @@ case "$mode" in
4040
core)
4141
echo "Starting core SMB servers (auth scenarios + edge cases)..."
4242
services=(smb-consumer-guest smb-consumer-auth smb-consumer-both \
43-
smb-consumer-readonly smb-consumer-flaky smb-consumer-slow)
43+
smb-consumer-readonly smb-consumer-flaky smb-consumer-slow \
44+
smb-consumer-maxreadsize)
4445
;;
4546
all)
46-
echo "Starting all SMB servers (14 containers)..."
47+
echo "Starting all SMB servers (15 containers)..."
4748
# Empty services list means "all defined in compose" for both `up` and
4849
# the post-up probe loop. We resolve the actual set via `compose ps`.
4950
;;

0 commit comments

Comments
 (0)