From 7f1c0cc9cd3deab925440b56d82c3e61a8ba5ab1 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sat, 11 Jul 2015 23:04:33 +0800 Subject: [PATCH] crush/CrushTester: return EINVAL if crushtool returns non-zero this backports a tiny part of ec02441, otherwise CrushTester will return 1, and "ceph" cli will take it as EPERM, which is miss leading, and fails osd-crush.sh:TEST_crush_reject_empty. Signed-off-by: Kefu Chai --- src/crush/CrushTester.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crush/CrushTester.cc b/src/crush/CrushTester.cc index 04c5be1de16..9aada7b1eb9 100644 --- a/src/crush/CrushTester.cc +++ b/src/crush/CrushTester.cc @@ -435,7 +435,7 @@ int CrushTester::test_with_crushtool(const string& crushtool, // something else entirely happened // log it and consider an invalid crush map err << "error running crushmap through crushtool: " << cpp_strerror(r); - return -r; + return -EINVAL; } namespace { -- 2.47.3