Changeset 2369


Ignore:
Timestamp:
29/10/2008 20:55:43 (3 years ago)
Author:
chris
Message:

Use the same ostringstream formatting for protocol logging to file
that we use for standard logging, to fix 64bit platform warnings
reported by Matt Brown.

File:
1 edited

Legend:

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

    r2347 r2369  
    10031003                intercept_setup_delay("testfiles/TestDir1/spacetest/f1",  
    10041004                        0, 4000, SYS_read, 1); 
    1005                 pid = start_internal_daemon(); 
    1006                 intercept_clear_setup(); 
    1007                  
    1008                 fd = open("testfiles/TestDir1/spacetest/f1", O_WRONLY); 
    1009                 TEST_THAT(fd > 0); 
    1010                 // write again, to update the file's timestamp 
    1011                 TEST_EQUAL(sizeof(buffer), write(fd, buffer, sizeof(buffer)), 
    1012                         "Buffer write"); 
    1013                 TEST_THAT(close(fd) == 0);       
    1014  
    1015                 wait_for_backup_operation(); 
    1016                 // can't test whether intercept was triggered, because 
    1017                 // it's in a different process. 
    1018                 // TEST_THAT(intercept_triggered()); 
    1019                 TEST_THAT(stop_internal_daemon(pid)); 
     1005                { 
     1006                        Timers::Init(); 
     1007                        BackupDaemon bbackupd; 
     1008                        bbackupd.Configure("testfiles/bbackupd.conf"); 
     1009                        bbackupd.InitCrypto(); 
     1010                 
     1011                        fd = open("testfiles/TestDir1/spacetest/f1", O_WRONLY); 
     1012                        TEST_THAT(fd > 0); 
     1013                        // write again, to update the file's timestamp 
     1014                        TEST_EQUAL(1, write(fd, "z", 1), "Buffer write"); 
     1015                        TEST_THAT(close(fd) == 0); 
     1016 
     1017                        // wait long enough to put file into sync window 
     1018                        wait_for_operation(5); 
     1019 
     1020                        bbackupd.RunSyncNow(); 
     1021                        TEST_THAT(intercept_triggered()); 
     1022                        intercept_clear_setup(); 
     1023                        Timers::Cleanup(); 
     1024                } 
    10201025 
    10211026                // check that the diff was aborted, i.e. upload was not a diff 
     
    11751180                        std::string line; 
    11761181                        TEST_THAT(reader.GetLine(line)); 
    1177                         if (line == "Send ListDirectory(0x3,0xffffffff,0xc,true)") 
     1182                        if (line == "Send ListDirectory(0x3,0xffff,0xc,true)") 
    11781183                        { 
    11791184                                found1 = true; 
Note: See TracChangeset for help on using the changeset viewer.