]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/workunits/rados/test_alloc_hint.sh: sudo to ls files 5838/head
authorKefu Chai <kchai@redhat.com>
Tue, 8 Sep 2015 10:20:04 +0000 (18:20 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 8 Sep 2015 12:50:36 +0000 (20:50 +0800)
The osd data dir is owned by ceph and not readable by other
non-root users.

Fixes: #12861
Signed-off-by: Kefu Chai <kchai@redhat.com>
qa/workunits/rados/test_alloc_hint.sh

index c43fc3c00bde5689c7d7642ed85dd90290e0afb4..b3e185adefd6e0ef3c12f2ad26b906ecdccfc99e 100755 (executable)
@@ -61,7 +61,7 @@ function expect_alloc_hint_eq() {
 
         # e.g., .../25.6_head/foo__head_7FC1F406__19
         #       .../26.bs1_head/bar__head_EFE6384B__1a_ffffffffffffffff_1
-        local fns=$(sudo find ${OSD_DATA[i]}/current/${PGID}*_head -type f | grep head/${OBJ}_)
+        local fns=$(sudo sh -c "ls ${OSD_DATA[i]}/current/${PGID}*_head/${OBJ}_*")
         local count="${#fns[@]}"
         if [ "${count}" -ne 1 ]; then
             echo "bad fns count: ${count}" >&2