Skip to content

Commit ea3c687

Browse files
fix: Add environment variable defaults to BACKENDS (#8465)
Co-authored-by: Dmitry Tokarev <dtokarev@nvidia.com>
1 parent 2cfabea commit ea3c687

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

qa/L0_shared_memory/shared_memory_test.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,13 @@ def test_too_big_shm(self):
301301

302302
def test_large_shm_register_offset(self):
303303
# Test for out of bounds read vulnerability when registering system shared memory with large offset
304-
for platform in ["python", "onnx", "libtorch", "plan", "openvino"]:
304+
305+
platforms = (
306+
["python", "onnx", "libtorch", "plan", "openvino"]
307+
if os.environ.get("BACKENDS") is None
308+
else os.environ.get("BACKENDS").split()
309+
)
310+
for platform in platforms:
305311
model_name = f"{platform}_int32_int32_int32"
306312

307313
# Test for large offset

qa/L0_shared_memory/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ done
160160
# Test large system shared memory offset
161161
rm -rf models/*
162162
# prepare add_sub model of various backends
163-
BACKENDS="python onnx libtorch plan openvino"
163+
BACKENDS=${BACKENDS:-"python onnx libtorch plan openvino"}
164164
for backend in ${BACKENDS} ; do
165165
model="${backend}_int32_int32_int32"
166166
model_dir="models/${model}"

0 commit comments

Comments
 (0)