Use xargs to read file list instead of passing directory path directly.
This avoids permission denied errors when rspamc runs inside Docker
container and tries to read files from mounted volumes with different
user permissions.
The controller test already uses this approach successfully.
echo ""
echo "Testing via proxy worker ($PROXY_PORT)..."
- # Use corpus directory for proxy test too
- if ASAN_OPTIONS=detect_leaks=0 rspamc -h "$RSPAMD_HOST:$PROXY_PORT" -n "$PARALLEL" -j \
- "$CORPUS_DIR" > "$DATA_DIR/proxy_results.json" 2> "$DATA_DIR/proxy_errors.log"; then
+ # Use same file list approach as controller test to avoid permission issues
+ if xargs -a "$DATA_DIR/shuffled_files.txt" rspamc -h "$RSPAMD_HOST:$PROXY_PORT" \
+ -n "$PARALLEL" -j > "$DATA_DIR/proxy_results.json" 2> "$DATA_DIR/proxy_errors.log"; then
echo "✓ Proxy test complete"
echo "Results saved to $DATA_DIR/proxy_results.json"
else