From 0504206205ce6cdaf1e218c7bee2adf10708d589 Mon Sep 17 00:00:00 2001 From: Li Wei Date: Fri, 18 Sep 2026 10:43:52 +0900 Subject: [PATCH] DAOS-19589 tests: Fix dmg_negative_test extend cases The logic of run_osa_dmg_test when extend is True seems strange: - It avoids extending the pool to rank 0, but treats the other ranks in the pool differently. - It uses the expected results which sometimes are based on invalid targets, even though the extend command does not take targets parameter. This might have led to the extend command returning an error when given a rank that is already in the pool, while the exclude, drain, and reintegrate commands all succeed when given ranks that is already excluded, drained, and reintegrated, respectively. #18651 and #19026 have changed the extend case to succeed. This patch fixes dmg_negative_test to match the new behavior. Test-tag: OSADmgNegativeTest Signed-off-by: Li Wei --- src/tests/ftest/osa/dmg_negative_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/ftest/osa/dmg_negative_test.py b/src/tests/ftest/osa/dmg_negative_test.py index 1d242b80c4e..69526b93ded 100644 --- a/src/tests/ftest/osa/dmg_negative_test.py +++ b/src/tests/ftest/osa/dmg_negative_test.py @@ -88,9 +88,9 @@ def run_osa_dmg_test(self, num_pool, extend=False): expected_result = str(sequence[2]) # Extend the pool - # There is no need to extend rank 0 + # There is no need to extend rank 0-3 # Avoid DER_ALREADY - if extend is True and rank != "0": + if extend is True and rank in ["4", "5"]: self.log.info("=> Sequence %s: Extend rank %s onto pool %s", index, rank, pool) if not self.validate_results(pool, expected_result, pool.extend(rank)): self.fail("Error extending rank {} onto pool {}".format(rank, str(pool)))