[SWDEV-335697 + SWDEV-342812] Fix NPS & Compute tests

Updates:
    * Fixed rsmi_dev_compute_partition_get
      & rsmi_dev_nps_mode_get to properly check
      for invalid arguments
    * Updated compute partition & NPS mode tests
      - Now properly confirms the invalid
        argument is seen
      - Spacing for multiple devices is added
        to better see distinction between
        separate device's tests (for verbose output)
      - Changed expect to assert calls, so errors
        are observed faster for test failures
      - Fixed multiple device testing where a
        variable should have been unset, but
        having multiple devices caused it to
        set
      - Updated multiple device testing to iterate
        accross all devices (previously returned,
        instead of continuing checking support
        after RSMI_STATUS_NOT_SUPPORTED detected)
      - Fixed a few spelling errors & verbose output

Change-Id: Ieba9e5b46763c6cd880fbf27fcdf58be8ecbc683
Signed-off-by: Charis Poag <Charis.Poag@amd.com>
Αυτή η υποβολή περιλαμβάνεται σε:
Charis Poag
2023-03-02 13:24:38 -06:00
γονέας fcb6afa289
υποβολή c252ecccd1
4 αρχεία άλλαξαν με 49 προσθήκες και 56 διαγραφές
+4 -4
Προβολή Αρχείου
@@ -3791,12 +3791,12 @@ get_compute_partition(uint32_t dv_ind, std::string &compute_partition) {
rsmi_status_t
rsmi_dev_compute_partition_get(uint32_t dv_ind, char *compute_partition,
uint32_t len) {
CHK_SUPPORT_NAME_ONLY(compute_partition)
TRY
if ((len == 0) || (compute_partition == nullptr)) {
return RSMI_STATUS_INVALID_ARGS;
}
CHK_SUPPORT_NAME_ONLY(compute_partition)
TRY
std::string returning_compute_partition;
rsmi_status_t ret = get_compute_partition(dv_ind,
returning_compute_partition);
@@ -3996,12 +3996,12 @@ rsmi_dev_nps_mode_set(uint32_t dv_ind, rsmi_nps_mode_type_t nps_mode) {
rsmi_status_t
rsmi_dev_nps_mode_get(uint32_t dv_ind, char *nps_mode,
uint32_t len) {
CHK_SUPPORT_NAME_ONLY(nps_mode)
TRY
if ((len == 0) || (nps_mode == nullptr)) {
return RSMI_STATUS_INVALID_ARGS;
}
CHK_SUPPORT_NAME_ONLY(nps_mode)
TRY
std::string returning_nps_mode;
rsmi_status_t ret = get_nps_mode(dv_ind,
returning_nps_mode);