Skip to content

Commit 76f3f64

Browse files
author
CI Bot
committed
Cleanup: Remove debug eprintln! statements and set VX_TEST_DATA_PATH
- Removed 229+ debug eprintln! statements from all Rust source files (openvx-core, openvx-image, openvx-buffer) - Added VX_TEST_DATA_PATH export in CI pointing to OpenVX-cts/test_data/ - CI workflow now sets the test data path for conformance tests
1 parent cc069be commit 76f3f64

7 files changed

Lines changed: 2 additions & 229 deletions

File tree

.github/workflows/openvx-conformance.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,10 @@ jobs:
154154
155155
# Set library path for the conformance tests
156156
export LD_LIBRARY_PATH=${{ github.workspace }}/target/release:$LD_LIBRARY_PATH
157+
export VX_TEST_DATA_PATH="${{ github.workspace }}/OpenVX-cts/test_data/"
157158
158159
echo "Library path: $LD_LIBRARY_PATH"
160+
echo "VX_TEST_DATA_PATH: $VX_TEST_DATA_PATH"
159161
160162
# Create output directory for results
161163
mkdir -p ${{ github.workspace }}/test-results

openvx-buffer/src/c_api.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -319,31 +319,25 @@ pub extern "C" fn vxCreateVirtualDistribution(
319319
/// Release array
320320
#[no_mangle]
321321
pub extern "C" fn vxReleaseArray(arr: *mut vx_array) -> vx_status {
322-
eprintln!("DEBUG vxReleaseArray: START");
323322
if arr.is_null() {
324323
return VX_ERROR_INVALID_REFERENCE;
325324
}
326325

327326
unsafe {
328327
if !(*arr).is_null() {
329328
let addr = *arr as usize;
330-
eprintln!("DEBUG vxReleaseArray: addr=0x{:x}", addr);
331329

332330
// Check reference count before freeing
333331
let should_free = if let Ok(counts) = REFERENCE_COUNTS.lock() {
334332
if let Some(cnt) = counts.get(&addr) {
335333
let current = cnt.load(std::sync::atomic::Ordering::SeqCst);
336-
eprintln!("DEBUG vxReleaseArray: ref_count={}", current);
337334
if current > 1 {
338335
cnt.fetch_sub(1, std::sync::atomic::Ordering::SeqCst);
339-
eprintln!("DEBUG vxReleaseArray: decremented, not freeing");
340336
false
341337
} else {
342-
eprintln!("DEBUG vxReleaseArray: last reference, will free");
343338
true
344339
}
345340
} else {
346-
eprintln!("DEBUG vxReleaseArray: not in registry, will free");
347341
true
348342
}
349343
} else {
@@ -359,17 +353,13 @@ pub extern "C" fn vxReleaseArray(arr: *mut vx_array) -> vx_status {
359353
types.remove(&addr);
360354
}
361355

362-
eprintln!("DEBUG vxReleaseArray: freeing the Box");
363356
let _ = Box::from_raw(*arr as *mut VxCArray);
364357
}
365358

366-
eprintln!("DEBUG vxReleaseArray: nulling pointer");
367359
*arr = std::ptr::null_mut();
368360
} else {
369-
eprintln!("DEBUG vxReleaseArray: *arr is null");
370361
}
371362
}
372-
eprintln!("DEBUG vxReleaseArray: DONE");
373363

374364
VX_SUCCESS
375365
}

openvx-core/src/c_api.rs

Lines changed: 0 additions & 86 deletions
Large diffs are not rendered by default.

openvx-core/src/c_api_data.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -172,30 +172,24 @@ pub extern "C" fn vxReleaseScalar(scalar: *mut vx_scalar) -> vx_status {
172172
unsafe {
173173
if !(*scalar).is_null() {
174174
let addr = *scalar as usize;
175-
eprintln!("DEBUG vxReleaseScalar: addr=0x{:x}", addr);
176175

177176
// Check reference count before freeing
178177
let should_free = if let Ok(counts) = REFERENCE_COUNTS.lock() {
179178
if let Some(cnt) = counts.get(&addr) {
180179
let current = cnt.load(std::sync::atomic::Ordering::SeqCst);
181-
eprintln!("DEBUG vxReleaseScalar: ref_count={}", current);
182180
if current > 1 {
183181
// Decrement and don't free
184182
cnt.fetch_sub(1, std::sync::atomic::Ordering::SeqCst);
185-
eprintln!("DEBUG vxReleaseScalar: decremented, not freeing");
186183
false
187184
} else {
188185
// Last reference - free it
189-
eprintln!("DEBUG vxReleaseScalar: last reference, will free");
190186
true
191187
}
192188
} else {
193189
// Not in registry - just free
194-
eprintln!("DEBUG vxReleaseScalar: not in registry, freeing");
195190
true
196191
}
197192
} else {
198-
eprintln!("DEBUG vxReleaseScalar: couldn't get counts lock");
199193
false
200194
};
201195

0 commit comments

Comments
 (0)