diff --git a/test/iobuf_unittest.cpp b/test/iobuf_unittest.cpp index 5add0104b6..e7a6e10dbc 100644 --- a/test/iobuf_unittest.cpp +++ b/test/iobuf_unittest.cpp @@ -1027,7 +1027,9 @@ TEST_F(IOBufTest, append_store_append_cut) { if (!write_to_dev_null) { ASSERT_EQ(0, system(cmd)); } - remove(name); + if (!write_to_dev_null) { + remove(name); + } } for (size_t i = 0; i < ARRAY_SIZE(w); ++i) {