EXSWHTEC-224 - Test cases ID clean up and documentation for Device Memory Access (#88)

- Test cases ID clean up and documentation for Device Memory Access
- Added group for deprecated Context Management

[ROCm/hip-tests commit: 15c91808cc]
This commit is contained in:
milos-mozetic
2023-06-28 06:17:04 +02:00
committed by GitHub
vanhempi a2ead92795
commit 16eee59975
7 muutettua tiedostoa jossa 324 lisäystä ja 57 poistoa
@@ -16,17 +16,35 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
/*
Testcase Scenarios :
Unit_hipMemGetAddressRange_Positive - Test hipMemGetAddressRange api for various memory allocation
types and offsets Unit_hipMemGetAddressRange_Negative - Test unsuccessful execution of
hipMemGetAddressRange api when parameters are invalid
*/
#include <hip_test_common.hh>
#include <hip/hip_runtime_api.h>
#include <utils.hh>
#include <resource_guards.hh>
/**
* @addtogroup hipMemGetAddressRange hipMemGetAddressRange
* @{
* @ingroup PeerToPeerTest
* `hipMemGetAddressRange(hipDeviceptr_t* pbase, size_t* psize, hipDeviceptr_t dptr)` -
* Get information on memory allocations.
*/
/**
* Test Description
* ------------------------
* - Allocate memory and check if base and size match allocated memory values.
* - Check for various offset values from base memory address:
* - Host address range
* - Device address range
* - Pitch address range
* Test source
* ------------------------
* - unit/memory/hipMemGetAddressRange.cc
* Test requirements
* ------------------------
* - HIP_VERSION >= 5.2
*/
TEST_CASE("Unit_hipMemGetAddressRange_Positive") {
hipDeviceptr_t base_ptr;
size_t mem_size = 0;
@@ -67,6 +85,21 @@ TEST_CASE("Unit_hipMemGetAddressRange_Positive") {
}
}
/**
* Test Description
* ------------------------
* - Validates handling of invalid arguments:
* -# When device handle is not valid
* - Expected output: return `hipErrorNotFound`
* -# When offset is greated than allocated size
* - Expected output: return `hipErrorNotFound`
* Test source
* ------------------------
* - unit/memory/hipMemGetAddressRange.cc
* Test requirements
* ------------------------
* - HIP_VERSION >= 5.2
*/
TEST_CASE("Unit_hipMemGetAddressRange_Negative") {
hipDeviceptr_t base_ptr;
size_t mem_size = 0;