diff --git a/sycl/test-e2e/MemorySanitizer/track-origins/check_host_usm.cpp b/sycl/test-e2e/MemorySanitizer/track-origins/check_host_usm.cpp index 7d032e233beed..e370ff0de509e 100644 --- a/sycl/test-e2e/MemorySanitizer/track-origins/check_host_usm.cpp +++ b/sycl/test-e2e/MemorySanitizer/track-origins/check_host_usm.cpp @@ -1,10 +1,10 @@ // REQUIRES: linux, cpu || (gpu && level_zero) -// RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O0 -g -o %t2.out -// RUN: %{run} %t2.out 2>&1 | FileCheck %s +// RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O0 -g -o %t1.out +// RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t1.out 2>&1 | FileCheck %s --check-prefixes CHECK,CHECK-ORIGIN-STACK // RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O1 -g -o %t2.out -// RUN: %{run} %t2.out 2>&1 | FileCheck %s +// RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t2.out 2>&1 | FileCheck %s --check-prefixes CHECK // RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O2 -g -o %t3.out -// RUN: %{run} %t3.out 2>&1 | FileCheck %s +// RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t3.out 2>&1 | FileCheck %s --check-prefixes CHECK // RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:0 %{run} %t3.out 2>&1 | FileCheck %s --check-prefixes CHECK-HOSTUSM #include @@ -25,7 +25,7 @@ int main() { // CHECK: kernel <{{.*MyKernel}}> // CHECK: #{{.*}} {{.*check_host_usm.cpp}}:[[@LINE-6]] // CHECK: ORIGIN: Host USM allocation - // CHECK: #{{.*}} {{.*check_host_usm.cpp}}:[[@LINE-11]] + // CHECK-ORIGIN-STACK: #{{.*}} {{.*check_host_usm.cpp}}:[[@LINE-11]] // CHECK-HOSTUSM-NOT: use-of-uninitialized-value sycl::free(array, Q); diff --git a/sycl/test-e2e/MemorySanitizer/track-origins/check_host_usm_initialized_on_host.cpp b/sycl/test-e2e/MemorySanitizer/track-origins/check_host_usm_initialized_on_host.cpp index 55fb7578de043..eb732846fdbac 100644 --- a/sycl/test-e2e/MemorySanitizer/track-origins/check_host_usm_initialized_on_host.cpp +++ b/sycl/test-e2e/MemorySanitizer/track-origins/check_host_usm_initialized_on_host.cpp @@ -1,6 +1,8 @@ // REQUIRES: linux, cpu || (gpu && level_zero) +// RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O0 -g -o %t0.out +// RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t0.out 2>&1 | FileCheck %s --check-prefixes CHECK,CHECK-ORIGIN-STACK // RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O2 -g -o %t1.out -// RUN: %{run} %t1.out 2>&1 | FileCheck %s +// RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t1.out 2>&1 | FileCheck %s // RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:0 %{run} %t1.out 2>&1 | FileCheck %s --check-prefixes CHECK-HOSTUSM #include @@ -22,7 +24,7 @@ int main() { // CHECK: kernel <{{.*MyKernel}}> // CHECK: #{{.*}} {{.*check_host_usm_initialized_on_host.cpp}}:[[@LINE-6]] // CHECK: ORIGIN: Host USM allocation - // CHECK: #{{.*}} {{.*check_host_usm_initialized_on_host.cpp}}:[[@LINE-12]] + // CHECK-ORIGIN-STACK: #{{.*}} {{.*check_host_usm_initialized_on_host.cpp}}:[[@LINE-12]] // CHECK-HOSTUSM-NOT: use-of-uninitialized-value sycl::free(array, Q); diff --git a/sycl/test-e2e/MemorySanitizer/track-origins/check_kernel_memcpy.cpp b/sycl/test-e2e/MemorySanitizer/track-origins/check_kernel_memcpy.cpp index 3669242af2e45..dcc5de9dcf496 100644 --- a/sycl/test-e2e/MemorySanitizer/track-origins/check_kernel_memcpy.cpp +++ b/sycl/test-e2e/MemorySanitizer/track-origins/check_kernel_memcpy.cpp @@ -1,8 +1,8 @@ // REQUIRES: linux, cpu || (gpu && level_zero) // RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O2 -g -o %t1.out -// RUN: %{run} %t1.out 2>&1 | FileCheck %s +// RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t1.out 2>&1 | FileCheck %s // RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -DINIT_SOURCE -O2 -g -o %t2.out -// RUN: %{run} %t2.out 2>&1 | FileCheck %s --check-prefixes CHECK-INIT +// RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t2.out 2>&1 | FileCheck %s --check-prefixes CHECK-INIT #include #include diff --git a/sycl/test-e2e/MemorySanitizer/track-origins/check_kernel_memmove_no_overlap.cpp b/sycl/test-e2e/MemorySanitizer/track-origins/check_kernel_memmove_no_overlap.cpp index 87db3461bb1ad..3d28c2a3af4c3 100644 --- a/sycl/test-e2e/MemorySanitizer/track-origins/check_kernel_memmove_no_overlap.cpp +++ b/sycl/test-e2e/MemorySanitizer/track-origins/check_kernel_memmove_no_overlap.cpp @@ -1,8 +1,10 @@ // REQUIRES: linux, cpu || (gpu && level_zero) +// RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O0 -g -o %t0.out +// RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t0.out 2>&1 | FileCheck %s --check-prefixes CHECK,CHECK-ORIGIN-STACK // RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O2 -g -o %t1.out -// RUN: %{run} %t1.out 2>&1 | FileCheck %s +// RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t1.out 2>&1 | FileCheck %s // RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -DINIT_SOURCE -O2 -g -o %t2.out -// RUN: %{run} %t2.out 2>&1 | FileCheck %s --check-prefixes CHECK-INIT +// RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t2.out 2>&1 | FileCheck %s --check-prefixes CHECK-INIT #include #include @@ -36,7 +38,7 @@ void no_overlap() { // CHECK: kernel <{{.*MyKernel3}}> // CHECK: #{{.*}} {{.*check_kernel_memmove_no_overlap.cpp}}:[[@LINE-6]] // CHECK: ORIGIN: Host USM allocation - // CHECK: #{{.*}} {{.*check_kernel_memmove_no_overlap.cpp}}:[[@LINE-24]] + // CHECK-ORIGIN-STACK: #{{.*}} {{.*check_kernel_memmove_no_overlap.cpp}}:[[@LINE-24]] // CHECK-INIT-NOT: use-of-uninitialized-value sycl::free(array1, Q); diff --git a/sycl/test-e2e/MemorySanitizer/track-origins/check_kernel_memmove_overlap.cpp b/sycl/test-e2e/MemorySanitizer/track-origins/check_kernel_memmove_overlap.cpp index f0a15e52f387a..7a75aa1871c93 100644 --- a/sycl/test-e2e/MemorySanitizer/track-origins/check_kernel_memmove_overlap.cpp +++ b/sycl/test-e2e/MemorySanitizer/track-origins/check_kernel_memmove_overlap.cpp @@ -1,6 +1,8 @@ // REQUIRES: linux, cpu || (gpu && level_zero) +// RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O0 -g -o %t0.out +// RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t0.out 2>&1 | FileCheck %s --check-prefixes CHECK,CHECK-ORIGIN-STACK // RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O2 -g -o %t1.out -// RUN: %{run} %t1.out 2>&1 | FileCheck %s +// RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t1.out 2>&1 | FileCheck %s #include #include @@ -30,7 +32,7 @@ void overlap() { // CHECK: kernel <{{.*MyKernel2}}> // CHECK: #{{.*}} {{.*check_kernel_memmove_overlap.cpp}}:[[@LINE-6]] // CHECK: ORIGIN: Shared USM allocation - // CHECK: #{{.*}} {{.*check_kernel_memmove_overlap.cpp}}:[[@LINE-20]] + // CHECK-ORIGIN-STACK: #{{.*}} {{.*check_kernel_memmove_overlap.cpp}}:[[@LINE-20]] sycl::free(array, Q); } diff --git a/sycl/test-e2e/MemorySanitizer/track-origins/check_shared_usm.cpp b/sycl/test-e2e/MemorySanitizer/track-origins/check_shared_usm.cpp index 4f5a79772c1e8..e936227bda78f 100644 --- a/sycl/test-e2e/MemorySanitizer/track-origins/check_shared_usm.cpp +++ b/sycl/test-e2e/MemorySanitizer/track-origins/check_shared_usm.cpp @@ -1,10 +1,10 @@ // REQUIRES: linux, cpu || (gpu && level_zero) -// RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O0 -g -o %t2.out -// RUN: %{run} %t2.out 2>&1 | FileCheck %s +// RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O0 -g -o %t1.out +// RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t1.out 2>&1 | FileCheck %s --check-prefixes CHECK,CHECK-ORIGIN-STACK // RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O1 -g -o %t2.out -// RUN: %{run} %t2.out 2>&1 | FileCheck %s +// RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t2.out 2>&1 | FileCheck %s // RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O2 -g -o %t3.out -// RUN: %{run} %t3.out 2>&1 | FileCheck %s +// RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t3.out 2>&1 | FileCheck %s // RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:0 %{run} %t3.out 2>&1 | FileCheck %s --check-prefixes CHECK-SHAREDUSM #include @@ -25,7 +25,7 @@ int main() { // CHECK: kernel <{{.*MyKernel}}> // CHECK: #{{.*}} {{.*check_shared_usm.cpp}}:[[@LINE-6]] // CHECK: ORIGIN: Shared USM allocation - // CHECK: #{{.*}} {{.*check_shared_usm.cpp}}:[[@LINE-11]] + // CHECK-ORIGIN-STACK: #{{.*}} {{.*check_shared_usm.cpp}}:[[@LINE-11]] // CHECK-SHAREDUSM-NOT: use-of-uninitialized-value sycl::free(array, Q);