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
This commit is contained in:
nives-vukovic authored and GitHub committed 2022-09-26 11:03:18 +05:30
1 parent 66471b01c9
commit d60b65b5dc
2 files changed
+40 -39

No files matched your search

@@ -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