-
Notifications
You must be signed in to change notification settings - Fork 787
[DeviceSanitizer] refine option parsing #15293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
martygrant
merged 5 commits into
intel:sycl
from
yingcong-wu:yc-0903-handle-option-exception
Sep 25, 2024
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// REQUIRES: linux | ||
// RUN: %{build} %device_asan_flags -O0 -g -o %t | ||
// RUN: %{run} %t | ||
|
||
// Invalid ur option format | ||
// RUN: env UR_LAYER_ASAN_OPTIONS=a:1,b:1 %{run} not %t 2>&1 | FileCheck %s --check-prefixes INVALID-FORMAT | ||
// INVALID-FORMAT: <SANITIZER>[ERROR]: Wrong format of the UR_LAYER_ASAN_OPTIONS environment variable value | ||
|
||
// Invalid bool option | ||
// RUN: env UR_LAYER_ASAN_OPTIONS=debug:yes %{run} not %t 2>&1 | FileCheck %s --check-prefixes INVALID-BOOL | ||
// INVALID-BOOL: <SANITIZER>[ERROR]: "debug" is set to "yes", which is not an valid setting. Acceptable input are: for enable, use: "1" "true"; for disable, use: "0" "false". | ||
|
||
// Invalid quarantine_size_mb | ||
// RUN: env UR_LAYER_ASAN_OPTIONS=quarantine_size_mb:-1 %{run} not %t 2>&1 | FileCheck %s --check-prefixes INVALID-QUARANTINE | ||
// RUN: env UR_LAYER_ASAN_OPTIONS=quarantine_size_mb:4294967296 %{run} not %t 2>&1 | FileCheck %s --check-prefixes INVALID-QUARANTINE | ||
// INVALID-QUARANTINE: <SANITIZER>[ERROR]: "quarantine_size_mb" should be an integer in range[0, 4294967295]. | ||
|
||
// Invalid redzone and max_redzone | ||
// RUN: env UR_LAYER_ASAN_OPTIONS=redzone:abc %{run} not %t 2>&1 | FileCheck %s --check-prefixes INVALID-REDZONE | ||
// INVALID-REDZONE: <SANITIZER>[ERROR]: "redzone" should be an integer in range[0, 16]. | ||
// RUN: env UR_LAYER_ASAN_OPTIONS=max_redzone:abc %{run} not %t 2>&1 | FileCheck %s --check-prefixes INVALID-MAXREDZONE | ||
// INVALID-MAXREDZONE: <SANITIZER>[ERROR]: "max_redzone" should be an integer in range[0, 2048]. | ||
|
||
|
||
|
||
#include <sycl/usm.hpp> | ||
|
||
int main() { | ||
sycl::queue q; | ||
constexpr std::size_t N = 8; | ||
auto *array = sycl::malloc_device<char>(N, q); | ||
|
||
q.submit([&](sycl::handler &h) { | ||
h.single_task<class Test>([=]() { ++array[0]; }); | ||
}).wait(); | ||
|
||
sycl::free(array, q); | ||
return 0; | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an incorrect location for this test. Functionality that is being tested resides in Unified Runtime and therefore it should be tested there