From 3a6bf7d258654b1d47e926470ee643a48f9626f7 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Tue, 1 Mar 2016 09:13:52 +0800 Subject: [PATCH] tasks/scrub_test: match the NOSNAP with "head" * rados cli prints "head" at seeing CEPH_NOSNAP, so update the test accordingly * print inconsistent objs before testing them Fixes: #14924 Signed-off-by: Kefu Chai --- tasks/scrub_test.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tasks/scrub_test.py b/tasks/scrub_test.py index 34359a4665b7a..a2ab2c46c69d8 100644 --- a/tasks/scrub_test.py +++ b/tasks/scrub_test.py @@ -6,7 +6,6 @@ import json import logging import os import time -import ctypes import tempfile import ceph_manager @@ -214,8 +213,6 @@ class MessUp: class InconsistentObjChecker: """Check the returned inconsistents/inconsistent info""" - CEPH_NOSNAP = ctypes.c_uint64(-2).value - def __init__(self, osd, acting, obj_name): self.osd = osd self.acting = acting @@ -224,7 +221,7 @@ class InconsistentObjChecker: def basic_checks(self, inc): assert inc['object']['name'] == self.obj - assert inc['object']['snap'] == self.CEPH_NOSNAP + assert inc['object']['snap'] == "head" assert len(inc['shards']) == len(self.acting), \ "the number of returned shard does not match with the acting set" @@ -309,9 +306,9 @@ def test_list_inconsistent_obj(ctx, manager, osd_remote, pg, acting, osd_id, checker = InconsistentObjChecker(osd_id, acting, obj_name) inc_obj = objs[0] + log.info('inc = %r', inc_obj) checker.basic_checks(inc_obj) for check in checks: - log.info('inc = %r', inc_obj) checker.run(check, inc_obj) -- 2.39.5