aboutsummaryrefslogtreecommitdiffhomepage
path: root/fish_tests.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-05-16 12:35:07 +0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-05-16 12:35:07 +0800
commit73cbb0c65f5607532b7534982adaf5079c1a1a5e (patch)
tree5e49d013f321e38bd17cbacbe48eba81847aaeaa /fish_tests.cpp
parent2f89ddbeadaae4785885653e84e590d3ac23c6b3 (diff)
Add a check to ensure the file really is deleted in inotify test
Diffstat (limited to 'fish_tests.cpp')
-rw-r--r--fish_tests.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/fish_tests.cpp b/fish_tests.cpp
index acd5c8aa..3b738d66 100644
--- a/fish_tests.cpp
+++ b/fish_tests.cpp
@@ -2416,6 +2416,13 @@ static bool test_basic_inotify_support()
err(L"rm failed");
}
+ /* Verify that file is deleted */
+ struct stat statbuf;
+ if (stat(INOTIFY_TEST_PATH, &statbuf) != -1 || errno != ENOENT)
+ {
+ err(L"File at path " INOTIFY_TEST_PATH " still exists after deleting it");
+ }
+
/* The fd should be readable now or very shortly */
struct timeval tv = {1, 0};
fd_set fds;