EXSWHTEC-24 - Fix issues and refactor code in Stream Management tests (#2916)

- Fix bug in calculation of normal priority in Unit_hipStreamGetPriority_StreamsWithCUMask tests
- Delete duplicate test Unit_hipStreamGetPriority_InvalidPriorityPointer
- Separate Unit_hipStreamAddCallback_ParamTst into positive and negative test
- Remove Unit_hipStreamDestroy_Negative_DoubleDestroy test for Nvidia devices due to error

[ROCm/hip commit: d60b65b5dc]
This commit is contained in:
nives-vukovic
2022-09-26 07:33:18 +02:00
committed by GitHub
szülő d45eb3bb01
commit 263e58230b
2 fájl változott, egészen pontosan 40 új sor hozzáadva és 39 régi sor törölve
@@ -29,16 +29,6 @@ priority should be clamped to the priority range.
#include <hip_test_common.hh>
/**
* Check the error returned when an invalid pointer to a priority is used.
*/
TEST_CASE("Unit_hipStreamGetPriority_InvalidPriorityPointer") {
hipStream_t stream{};
HIP_CHECK(hipStreamCreate(&stream));
HIP_CHECK_ERROR(hipStreamGetPriority(stream, nullptr), hipErrorInvalidValue);
HIP_CHECK(hipStreamDestroy(stream));
}
/**
* Create stream and check priority.
*/
@@ -145,7 +135,7 @@ TEST_CASE("Unit_hipStreamGetPriority_StreamsWithCUMask") {
int priority_high = 0;
// Test is to get the Stream Priority Range
HIP_CHECK(hipDeviceGetStreamPriorityRange(&priority_low, &priority_high));
priority_normal = priority_low + priority_high;
priority_normal = (priority_low + priority_high) / 2;
// Check if priorities are indeed supported
REQUIRE_FALSE(priority_low == priority_high);
// Creating a stream with hipExtStreamCreateWithCUMask and checking