1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
# docker-compose.test.yml
# Test matrix for trueno-ublk
# Per testing-debugging-troubleshooting.md Section 4.3
#
# Usage:
# docker-compose -f docker/docker-compose.test.yml up unit-tests
# docker-compose -f docker/docker-compose.test.yml up --abort-on-container-exit
version: '3.8'
x-common-volumes:
- ..:/workspace:ro
- cargo-cache:/root/.cargo/registry
- cargo-git:/root/.cargo/git
- target-cache:/workspace/target
x-privileged-config:
privileged: true
cap_add:
- SYS_ADMIN
- SYS_RAWIO
- MKNOD
- NET_ADMIN
services:
# ============================================================================
# Unit Tests (no privileges needed)
# ============================================================================
unit-tests:
build:
context: ..
dockerfile: docker/Dockerfile.ublk-test
command:
volumes: *common-volumes
environment:
- RUST_BACKTRACE=1
- RUST_LOG=debug
# ============================================================================
# Component Tests (privileged for ublk module)
# ============================================================================
component-tests:
build:
context: ..
dockerfile: docker/Dockerfile.ublk-test
<<: *privileged-config
command:
volumes:
- ..:/workspace:ro
- /lib/modules:/lib/modules:ro
- cargo-cache:/root/.cargo/registry
devices:
- /dev/ublk-control:/dev/ublk-control
depends_on:
unit-tests:
condition: service_completed_successfully
# ============================================================================
# I/O Verification Tests (F016-F035)
# ============================================================================
io-verification:
build:
context: ..
dockerfile: docker/Dockerfile.ublk-test
<<: *privileged-config
command:
volumes:
- ..:/workspace:ro
- /lib/modules:/lib/modules:ro
- cargo-cache:/root/.cargo/registry
tmpfs:
- /tmp:size=2G
depends_on:
component-tests:
condition: service_completed_successfully
# ============================================================================
# Filesystem Integration Tests (F086-F095)
# ============================================================================
filesystem-tests:
build:
context: ..
dockerfile: docker/Dockerfile.ublk-test
<<: *privileged-config
command:
volumes:
- ..:/workspace:ro
- /lib/modules:/lib/modules:ro
- cargo-cache:/root/.cargo/registry
tmpfs:
- /mnt/test:size=4G
depends_on:
io-verification:
condition: service_completed_successfully
# ============================================================================
# Stress Tests (memory pressure, concurrent I/O)
# ============================================================================
stress-tests:
build:
context: ..
dockerfile: docker/Dockerfile.ublk-test
<<: *privileged-config
command:
volumes:
- ..:/workspace:ro
- /lib/modules:/lib/modules:ro
- cargo-cache:/root/.cargo/registry
mem_limit: 8g
memswap_limit: 16g
tmpfs:
- /mnt/test:size=4G
depends_on:
filesystem-tests:
condition: service_completed_successfully
# ============================================================================
# Falsification Matrix (F001-F100)
# ============================================================================
falsification:
build:
context: ..
dockerfile: docker/Dockerfile.ublk-test
<<: *privileged-config
command:
volumes:
- ..:/workspace:ro
- /lib/modules:/lib/modules:ro
- cargo-cache:/root/.cargo/registry
- ../test-results:/workspace/test-results
tmpfs:
- /mnt/test:size=4G
environment:
- FALSIFICATION_RANGE=F001-F100
- PMAT_REPORT=true
# ============================================================================
# Five-Whys Debug Session (interactive)
# ============================================================================
debug-session:
build:
context: ..
dockerfile: docker/Dockerfile.ublk-test
<<: *privileged-config
command:
stdin_open: true
tty: true
volumes:
- ..:/workspace
- /lib/modules:/lib/modules:ro
- cargo-cache:/root/.cargo/registry
tmpfs:
- /mnt/test:size=4G
# ============================================================================
# Full Test Suite
# ============================================================================
full-suite:
build:
context: ..
dockerfile: docker/Dockerfile.ublk-test
<<: *privileged-config
command:
volumes:
- ..:/workspace:ro
- /lib/modules:/lib/modules:ro
- cargo-cache:/root/.cargo/registry
- ../test-results:/workspace/test-results
tmpfs:
- /mnt/test:size=4G
volumes:
cargo-cache:
cargo-git:
target-cache:
networks:
default:
driver: bridge