optimize the perf and support more features

This commit is contained in:
Lei Xue
2026-03-14 11:45:35 +08:00
parent 7e7ebacd9d
commit 00cfac3d24
56 changed files with 6340 additions and 1019 deletions

32
test/verify_libiscsi_compat.sh Executable file
View File

@@ -0,0 +1,32 @@
#!/bin/bash
# Verify libiscsi compatibility - validates iSCSI protocol format
set -e
echo "=== iSCSI Protocol Format Verification ==="
echo
cd "$(dirname "$0")/.."
# Run all protocol tests
echo "1. Running protocol format tests..."
go test ./pkg/port/iscsit/... -v -run "Test.*Format" 2>&1 | grep -E "(PASS|FAIL|===)"
echo
echo "2. Running TSIH bitmap tests..."
go test ./pkg/port/iscsit/... -v -run "TestTSIH" 2>&1 | grep -E "(PASS|FAIL|===)"
echo
echo "3. Running object pool tests..."
go test ./pkg/port/iscsit/... -v -run "Test.*Pool" 2>&1 | grep -E "(PASS|FAIL|===)"
echo
echo "4. Running all unit tests..."
go test ./pkg/... ./mock/... 2>&1 | grep -E "(ok|FAIL)"
echo
echo "5. Benchmark tests..."
go test ./pkg/port/iscsit/... -bench=. -benchtime=100ms 2>&1 | grep -E "(Benchmark|PASS|ns/op)"
echo
echo "=== Verification Complete ==="