SWDEV-330666 - Test cases for null stream and/or priority. (#2651)
Change-Id: I9f5c99513fa1c754c2ab2e3cb9dcd5b6a3bb0176
[ROCm/hip-tests commit: eb22c8be11]
Bu işleme şunda yer alıyor:
işlemeyi yapan:
GitHub
ebeveyn
47af0feeb0
işleme
4fd14eda91
@@ -89,6 +89,50 @@ TEST_CASE("Unit_hipStreamGetPriority_happy") {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* both stream and priority passed as nullptr.
|
||||
*/
|
||||
TEST_CASE("Unit_hipStreamGetPriority_nullptr_nullptr") {
|
||||
auto res = hipStreamGetPriority(nullptr,nullptr);
|
||||
REQUIRE(res == hipErrorInvalidValue);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* valid stream and priority passed as nullptr.
|
||||
*/
|
||||
TEST_CASE("Unit_hipStreamGetPriority_stream_nullptr") {
|
||||
hipStream_t stream = nullptr;
|
||||
HIP_CHECK(hipStreamCreate(&stream));
|
||||
|
||||
auto res = hipStreamGetPriority(stream,nullptr);
|
||||
REQUIRE(res == hipErrorInvalidValue);
|
||||
|
||||
HIP_CHECK(hipStreamDestroy(stream));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* nullptr stream and valid priority
|
||||
*/
|
||||
TEST_CASE("Unit_hipStreamGetPriority_nullptr_priority") {
|
||||
int priority = -1;
|
||||
HIP_CHECK(hipStreamGetPriority(nullptr,&priority));
|
||||
}
|
||||
|
||||
/**
|
||||
* both stream and priority passed as valid.
|
||||
*/
|
||||
TEST_CASE("Unit_hipStreamGetPriority_stream_priority") {
|
||||
int priority = -1;
|
||||
hipStream_t stream = nullptr;
|
||||
HIP_CHECK(hipStreamCreate(&stream));
|
||||
|
||||
HIP_CHECK(hipStreamGetPriority(stream,&priority));
|
||||
|
||||
HIP_CHECK(hipStreamDestroy(stream));
|
||||
}
|
||||
|
||||
#if HT_AMD
|
||||
/**
|
||||
* Create stream with CUMask and check priority is returned as expected.
|
||||
|
||||
Yeni konuda referans
Bir kullanıcı engelle