Changeset 2838 for box/trunk/test


Ignore:
Timestamp:
09/01/2011 11:54:00 (17 months ago)
Author:
chris
Message:

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
File:
1 edited

Legend:

Unmodified
Added
Removed
  • box/trunk/test/bbackupd/testbbackupd.cpp

    r2828 r2838  
    750750extern "C" struct dirent *readdir_test_hook_2(DIR *dir) 
    751751{ 
    752         if (time(NULL) >= readdir_stop_time) 
     752        time_t time_now = time(NULL); 
     753 
     754        if (time_now >= readdir_stop_time) 
    753755        { 
    754756#ifndef PLATFORM_CLIB_FNS_INTERCEPTION_IMPOSSIBLE 
     757                BOX_NOTICE("Cancelling readdir hook at " << time_now); 
    755758                intercept_setup_readdir_hook(NULL, NULL); 
    756759                intercept_setup_lstat_hook  (NULL, NULL); 
    757760                // we will not be called again. 
     761#else 
     762                BOX_NOTICE("Failed to cancel readdir hook at " << time_now); 
    758763#endif 
     764        } 
     765        else 
     766        { 
     767                BOX_INFO("readdir hook still active at " << time_now << ", " 
     768                        "waiting for " << readdir_stop_time); 
    759769        } 
    760770 
     
    769779                sizeof(readdir_test_dirent.d_name), 
    770780                "test.%d", readdir_test_counter); 
     781        BOX_INFO("readdir hook returning " << readdir_test_dirent.d_name); 
    771782 
    772783        // ensure that when bbackupd stats the file, it gets the  
Note: See TracChangeset for help on using the changeset viewer.