tests: honor EPIPE in kill(HUP) test pre_cmake
authorMichael Wallner <mike@php.net>
Thu, 30 Jan 2020 11:17:17 +0000 (12:17 +0100)
committerMichael Wallner <mike@php.net>
Thu, 30 Jan 2020 11:17:17 +0000 (12:17 +0100)
tests/libmemcached-1.0/mem_functions.cc

index d799f4f6340fc9496bb22d6953c550116666f7e4..9c6ab3deb2bbd1d3f762a53f706417f54f57428a 100644 (file)
@@ -5083,7 +5083,11 @@ test_return_t kill_HUP_TEST(memcached_st *original_memc)
                                         test_literal_param(__func__), // Keys
                                         test_literal_param(__func__), // Values
                                         0, 0);
-  test_compare(MEMCACHED_CONNECTION_FAILURE, ret);
+  if (ret == MEMCACHED_ERRNO) {
+    test_compare(EPIPE, memcached_last_error_errno(memc));
+  } else {
+    test_compare(MEMCACHED_CONNECTION_FAILURE, ret);
+  }
 
   memcached_free(memc);