]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
test/mon: Accept ENOENT as returned value on FreeBSD
authorWillem Jan Withagen <wjw@digiware.nl>
Wed, 11 Nov 2020 14:09:12 +0000 (15:09 +0100)
committerWillem Jan Withagen <wjw@digiware.nl>
Sun, 15 Nov 2020 09:09:23 +0000 (10:09 +0100)
FreeBSD returns ENOENT on resolv error

Tracker: https://tracker.ceph.com/issues/48183
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
src/test/mon/MonMap.cc

index 81b054a9048f17cdebdf6a963b39f06dfe69def5..c9bcb7fec0835917b6b6b9eae67583ace74b17a3 100644 (file)
@@ -237,5 +237,9 @@ TEST(MonMapBuildInitial, build_initial_mon_host_from_dns_fail) {
   cct->_conf.set_val("mon_host", "ceph.noname");
   MonMap monmap;
   int r = monmap.build_initial(cct.get(), false, std::cerr);
+#if defined(__FreeBSD__)
+  ASSERT_EQ(r, -ENOENT);
+#else
   ASSERT_EQ(r, -EINVAL);
+#endif
 }