test(suites): run acceptance and fault flows on dummy backend

This commit is contained in:
2026-03-06 08:50:32 +08:00
parent 3e1ee23e42
commit eed6695758
5 changed files with 58 additions and 73 deletions
+10 -7
View File
@@ -40,7 +40,7 @@ cmake --build build
**Verify binaries exist:**
```bash
ls -la build/{cvmmap_sim,cvmmap_streamer,rtp_receiver_tester,rtmp_stub_tester}
ls -la build/{cvmmap_streamer,rtp_receiver_tester,rtmp_stub_tester}
```
### Mandatory Acceptance (Standalone)
@@ -79,14 +79,17 @@ Run the fault injection and latency validation suite.
**1. Start the simulator:**
```bash
./build/cvmmap_sim \
./build/cvmmap_streamer \
--run-mode pipeline \
--codec h264 \
--shm-name test_stream \
--zmq-endpoint "ipc:///tmp/test_sync.ipc" \
--label teststream \
--frames 300 \
--fps 30 \
--width 640 \
--height 360
--input-mode dummy \
--dummy-label teststream \
--dummy-frames 300 \
--dummy-fps 30 \
--dummy-width 640 \
--dummy-height 360
```
**2. Test RTP output:**
+12 -9
View File
@@ -21,10 +21,10 @@ The cv-mmap simulator uses POSIX shared memory naming that imposes a 24-byte max
Use compact deterministic labels:
```bash
# Good (19 bytes)
./build/cvmmap_sim --label acc_1_rtp_h264 ...
./build/cvmmap_streamer --run-mode pipeline --input-mode dummy --dummy-label acc_1_rtp_h264 ...
# Bad (28 bytes, will fail)
./build/cvmmap_sim --label acceptance_rtp_h264_test ...
./build/cvmmap_streamer --run-mode pipeline --input-mode dummy --dummy-label acceptance_rtp_h264_test ...
```
### Deterministic Simulator Sizing
@@ -37,11 +37,14 @@ Small frame sizes can trigger GStreamer caps negotiation failures before the fir
**Recommended simulator parameters for validation:**
```bash
./build/cvmmap_sim \
--width 640 \
--height 360 \
--fps 200 \
--frames 320
./build/cvmmap_streamer \
--run-mode pipeline \
--input-mode dummy \
--dummy-label acc_1_rtp_h264 \
--dummy-width 640 \
--dummy-height 360 \
--dummy-fps 200 \
--dummy-frames 320
```
### Build Path Isolation
@@ -266,7 +269,7 @@ cat .sisyphus/evidence/task-14-acceptance/RUN_ID/1-rtp_h264/streamer.log
Before running scripts, verify all binaries are built:
```bash
for bin in cvmmap_sim cvmmap_streamer rtp_receiver_tester rtmp_stub_tester; do
for bin in cvmmap_streamer rtp_receiver_tester rtmp_stub_tester; do
test -x "build/$bin" || echo "Missing: $bin"
done
```
@@ -275,7 +278,7 @@ done
```bash
# Test simulator only
./build/cvmmap_sim --help
./build/cvmmap_streamer --run-mode pipeline --help
# Test streamer config validation only
./build/cvmmap_streamer --codec h264 --shm-name test --zmq-endpoint ipc:///tmp/test.ipc
+9 -7
View File
@@ -134,15 +134,17 @@ echo "Exit code: $?"
--packet-threshold 1 \
--timeout-ms 10000
# Terminal 2: Simulator + Streamer
./build/cvmmap_sim \
# Terminal 2: Streamer in dummy input mode
./build/cvmmap_streamer \
--run-mode pipeline \
--input-mode dummy \
--shm-name test_rtp_h264 \
--zmq-endpoint "ipc:///tmp/test_rtp_h264.ipc" \
--label rtp_h264 \
--frames 320 \
--fps 200 \
--width 640 \
--height 360 &
--dummy-label rtp_h264 \
--dummy-frames 320 \
--dummy-fps 200 \
--dummy-width 640 \
--dummy-height 360 &
./build/cvmmap_streamer \
--run-mode pipeline \
+9 -20
View File
@@ -126,23 +126,19 @@ run_matrix_row() {
local sim_label="acc_${order}_${protocol}_${codec}"
local sim_cmd=(
"${BUILD_DIR}/cvmmap_sim"
--shm-name "${shm_name}"
--zmq-endpoint "${zmq_endpoint}"
--label "${sim_label}"
--frames 320
--fps 200
--width 640
--height 360
)
local streamer_cmd=(
"${BUILD_DIR}/cvmmap_streamer"
--run-mode pipeline
--codec "${codec}"
--shm-name "${shm_name}"
--zmq-endpoint "${zmq_endpoint}"
--input-mode dummy
--dummy-label "${sim_label}"
--dummy-frames 320
--dummy-fps 200
--dummy-width 640
--dummy-height 360
--dummy-startup-delay-ms 0
--queue-size 1
--gop 30
--b-frames 0
@@ -220,12 +216,7 @@ run_matrix_row() {
cleanup_pids+=("${tester_pid}")
sleep 1
"${sim_cmd[@]}" > "${sim_log}" 2>&1 &
local sim_pid=$!
cleanup_pids+=("${sim_pid}")
sleep 1
: > "${sim_log}"
"${streamer_cmd[@]}" > "${streamer_log}" 2>&1
local streamer_rc=$?
@@ -233,8 +224,7 @@ run_matrix_row() {
wait_pid "${tester_pid}" 15
local tester_rc=$?
wait_pid "${sim_pid}" 15
local sim_rc=$?
local sim_rc=0
row_end_ms="$(date +%s%3N)"
duration_ms=$((row_end_ms - row_start_ms))
@@ -270,7 +260,6 @@ run_matrix_row() {
main() {
local required=(
"${BUILD_DIR}/cvmmap_sim"
"${BUILD_DIR}/cvmmap_streamer"
"${BUILD_DIR}/rtp_receiver_tester"
"${BUILD_DIR}/rtmp_stub_tester"
+12 -24
View File
@@ -205,26 +205,19 @@ run_fault_scenario() {
local rtp_port
rtp_port="$(scenario_port "${order}")"
local sim_cmd=(
"${BUILD_DIR}/cvmmap_sim"
--shm-name "${shm_name}"
--zmq-endpoint "${zmq_endpoint}"
--label "${sim_label}"
--frames "${sim_frames}"
--fps "${sim_fps}"
--width 640
--height 360
)
if [[ -n "${reset_every}" ]]; then
sim_cmd+=(--emit-reset-every "${reset_every}")
fi
local streamer_cmd=(
"${BUILD_DIR}/cvmmap_streamer"
--run-mode pipeline
--codec h264
--shm-name "${shm_name}"
--zmq-endpoint "${zmq_endpoint}"
--input-mode dummy
--dummy-label "${sim_label}"
--dummy-frames "${sim_frames}"
--dummy-fps "${sim_fps}"
--dummy-width 640
--dummy-height 360
--dummy-startup-delay-ms 0
--queue-size 1
--gop 30
--b-frames 0
@@ -237,6 +230,9 @@ run_fault_scenario() {
--rtp-payload-type 96
--rtp-sdp "${sdp_path}"
)
if [[ -n "${reset_every}" ]]; then
streamer_cmd+=(--dummy-reset-every "${reset_every}")
fi
local tester_cmd=(
"${BUILD_DIR}/rtp_receiver_tester"
@@ -254,21 +250,14 @@ run_fault_scenario() {
cleanup_pids+=("${tester_pid}")
sleep 1
"${sim_cmd[@]}" > "${sim_log}" 2>&1 &
local sim_pid=$!
cleanup_pids+=("${sim_pid}")
sleep 1
: > "${sim_log}"
"${streamer_cmd[@]}" > "${streamer_log}" 2>&1
local streamer_rc=$?
wait_pid "${tester_pid}" 25
local tester_rc=$?
wait_pid "${sim_pid}" 25
local sim_rc=$?
local sim_rc=0
row_end_ms="$(date +%s%3N)"
duration_ms=$((row_end_ms - row_start_ms))
@@ -300,7 +289,6 @@ run_fault_scenario() {
main() {
local required=(
"${BUILD_DIR}/cvmmap_sim"
"${BUILD_DIR}/cvmmap_streamer"
"${BUILD_DIR}/rtp_receiver_tester"
)