Fix all 7 remaining SmokeTest failures to achieve 100% Group 1 (Core Framework) conformance.
- ✅ GraphBase: 14/14 PASSING
- ✅ SmokeTestBase: 7/7 PASSING
⚠️ SmokeTest: 7/14 (7 FAILURES remaining)
- SmokeTest.vxRegisterUserStruct - User struct enum allocation
- SmokeTest.vxHint - vxHint implementation
- SmokeTest.vxReleaseReference - Reference counting for objects
- SmokeTest.vxSetParameterByIndex - Parameter setting on nodes
- SmokeTest.vxSetParameterByReference - Parameter setting by reference
- SmokeTest.vxGetParameterByIndex - Parameter retrieval
- SmokeTestBase.vxReleaseReferenceBase - Base reference release
Error: Assertion mytype >= VX_TYPE_USER_STRUCT_START failed
Root Cause: vxRegisterUserStructWithName returns enum value < 0x100
Fix: Ensure atomic counter starts at 0x100
Error: vxHint not implemented or returns error Root Cause: Function missing or stub Fix: Implement vxHint to accept and store hints
Error: Expected ref_count1 - ref_count0 == 1, Actual: 0 != 1
Root Cause: Objects (pyramid, remap, scalar, etc.) not counted in vxQueryContext VX_CONTEXT_REFERENCES
Fix: Ensure ALL object creation functions register in REFERENCE_COUNTS and are counted
Error: vxQueryNode VX_NODE_PARAMETERS not implemented, vxSet/GetParameterByIndex failing Root Cause: Parameter management incomplete Fix: Implement full parameter lifecycle
Error: Base test failing Root Cause: Related to reference counting Fix: Same as Failure 3
Dependencies: None Approach:
- Search for all vxCreate* functions in codebase
- Verify each registers in REFERENCE_COUNTS
- Verify each registers in REFERENCE_TYPES for type detection Verification: List of 20+ create functions with registration status Files: All c_api.rs and unified_c_api.rs
Dependencies: None Approach:
- Find vxRegisterUserStructWithName in c_api.rs or unified_c_api.rs
- Add atomic counter:
static NEXT_USER_STRUCT: AtomicI32 = AtomicI32::new(0x100) - Change return to use
fetch_add(1, Ordering::SeqCst) - Ensure VX_TYPE_USER_STRUCT_START = 0x100 is defined Verification: SmokeTest.vxRegisterUserStruct passes Files: openvx-core/src/c_api.rs
Dependencies: None Approach:
- Add vxHint function definition
- Accept reference, hint enum, and data pointer
- Validate inputs (non-null reference)
- Store hint in registry or just return SUCCESS for now Verification: SmokeTest.vxHint passes Files: openvx-core/src/c_api.rs
Dependencies: Step 1 (analysis complete) Approach:
- For each vxCreate* function:
- Add REFERENCE_COUNTS registration:
counts.insert(ptr as usize, AtomicUsize::new(1)) - Add REFERENCE_TYPES registration with correct type
- Add REFERENCE_COUNTS registration:
- Update vxQueryContext VX_CONTEXT_REFERENCES to count all types Verification: SmokeTest.vxReleaseReference passes Files:
- openvx-core/src/c_api.rs (context, graph, node, kernel)
- openvx-core/src/c_api_data.rs (scalar, matrix, lut, threshold, pyramid, convolution)
- openvx-core/src/unified_c_api.rs (distribution, remap)
- openvx-image/src/c_api.rs (image)
- openvx-buffer/src/c_api.rs (array)
Dependencies: None (parallel to Step 4) Approach:
- vxQueryNode: Add VX_NODE_PARAMETERS case (already done? verify)
- vxSetParameterByIndex: Set parameter in node's parameter vector
- vxSetParameterByReference: Find parameter by reference, set value
- vxGetParameterByIndex: Return parameter object (create if needed)
- vxQueryParameter: Add VX_PARAMETER_REF case Verification:
- SmokeTest.vxSetParameterByIndex passes
- SmokeTest.vxSetParameterByReference passes
- SmokeTest.vxGetParameterByIndex passes Files: openvx-core/src/c_api.rs, openvx-core/src/unified_c_api.rs
Dependencies: Steps 2-5 complete Approach:
- Build:
cargo build --release - Rebuild CTS:
make -j$(nproc) - Run all SmokeTest:
--filter="Smoke*"Verification: All 14 SmokeTest tests pass Files: N/A (build only)
Dependencies: Step 6 Approach:
- Run GraphBase.*: All 14 should pass
- Run SmokeTestBase.*: All 7 should pass
- Run SmokeTest.*: All 14 should pass (no failures) Verification: 35/35 Group 1 tests passing Files: N/A (test only)
Blockers:
- REFERENCE_COUNTS type mismatch (HashMap value type issues)
- Circular dependencies between crates for type registration
- Parameter structure differences between c_api and unified_c_api
Mitigation:
- Use AtomicUsize consistently, fix operations with load/store
- Use centralized REFERENCE_TYPES registry in unified_c_api
- Focus on c_api implementation, unified can delegate
Rollback:
- Each step isolated to specific functions
- Can revert individual commits
- Tests verify each step
Steps 2, 3, and 5 can run in parallel (independent fixes). Step 4 is large and can be parallelized by object type:
- Agent A: Context, Graph, Node, Kernel
- Agent B: Image (in openvx-image crate)
- Agent C: Array (in openvx-buffer crate)
- Agent D: Scalar, Matrix, LUT, Threshold, Pyramid, Convolution, Distribution, Remap
Step 6 (build/test) depends on all previous steps. Step 7 (validation) final check.