summaryrefslogtreecommitdiff
path: root/test/bbackupd
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2011-01-09 11:54:00 +0000
committerChris Wilson <chris+github@qwirx.com>2011-01-09 11:54:00 +0000
commit95fd7ffcdedcaa22ec98f837752a8b08462fea02 (patch)
tree27afa9a41f1bcbbeba5b4562e7c14d181f5f7c05 /test/bbackupd
parent204c4f55e5cfc25e12e5843d77248d6c9d4101f2 (diff)
Add intercept logging, seems to work around intermittent failures in
testbbackupd: {{{ Waiting for internal daemon to scan spacetest/d1: ............ done. Waiting for server to die (pid 6307): .............................. failed! ERROR: **** TEST FAILURE: Condition [killed_server] failed at testbbackupd.cpp:718 ERROR: **** TEST FAILURE: Condition [stop_internal_daemon(pid)] failed at testbbackupd.cpp:1153 }}}
Diffstat (limited to 'test/bbackupd')
-rw-r--r--test/bbackupd/testbbackupd.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/test/bbackupd/testbbackupd.cpp b/test/bbackupd/testbbackupd.cpp
index b82e83e3..96d0e674 100644
--- a/test/bbackupd/testbbackupd.cpp
+++ b/test/bbackupd/testbbackupd.cpp
@@ -749,14 +749,24 @@ extern "C" struct dirent *readdir_test_hook_1(DIR *dir)
extern "C" struct dirent *readdir_test_hook_2(DIR *dir)
{
- if (time(NULL) >= readdir_stop_time)
+ time_t time_now = time(NULL);
+
+ if (time_now >= readdir_stop_time)
{
#ifndef PLATFORM_CLIB_FNS_INTERCEPTION_IMPOSSIBLE
+ BOX_NOTICE("Cancelling readdir hook at " << time_now);
intercept_setup_readdir_hook(NULL, NULL);
intercept_setup_lstat_hook (NULL, NULL);
// we will not be called again.
+#else
+ BOX_NOTICE("Failed to cancel readdir hook at " << time_now);
#endif
}
+ else
+ {
+ BOX_INFO("readdir hook still active at " << time_now << ", "
+ "waiting for " << readdir_stop_time);
+ }
// fill in the struct dirent appropriately
memset(&readdir_test_dirent, 0, sizeof(readdir_test_dirent));
@@ -768,6 +778,7 @@ extern "C" struct dirent *readdir_test_hook_2(DIR *dir)
snprintf(readdir_test_dirent.d_name,
sizeof(readdir_test_dirent.d_name),
"test.%d", readdir_test_counter);
+ BOX_INFO("readdir hook returning " << readdir_test_dirent.d_name);
// ensure that when bbackupd stats the file, it gets the
// right answer