From: Xiubo Li Date: Mon, 24 May 2021 02:49:09 +0000 (+0800) Subject: qa: always format the pgid in hex X-Git-Tag: v16.2.5~18^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=14a3e9fb169106d08de8ac7e47ad8cedcec00f18;p=ceph.git qa: always format the pgid in hex If the pg number is larger than 9, this won't match the array index, which was in dec just before this. Fixes: https://tracker.ceph.com/issues/50808 Signed-off-by: Xiubo Li (cherry picked from commit 2b9b2a3fbd5d4e1f01b96a96d4abaccffb8b9e3a) --- diff --git a/qa/tasks/cephfs/test_data_scan.py b/qa/tasks/cephfs/test_data_scan.py index 7d50f1003ce6..f8f033f479b8 100644 --- a/qa/tasks/cephfs/test_data_scan.py +++ b/qa/tasks/cephfs/test_data_scan.py @@ -545,7 +545,7 @@ class TestDataScan(CephFSTestCase): pg_count = self.fs.pgs_per_fs_pool for pg_n in range(0, pg_count): - pg_str = "{0}.{1}".format(self.fs.get_data_pool_id(), pg_n) + pg_str = "{0}.{1:x}".format(self.fs.get_data_pool_id(), pg_n) out = self.fs.data_scan(["pg_files", "mydir", pg_str]) lines = [l for l in out.split("\n") if l] log.info("{0}: {1}".format(pg_str, lines))