Changeset 2347 for box/trunk/test
- Timestamp:
- 11/10/2008 22:00:18 (4 years ago)
- File:
-
- 1 edited
-
box/trunk/test/bbackupd/testbbackupd.cpp (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
box/trunk/test/bbackupd/testbbackupd.cpp
r2320 r2347 758 758 // We set up the next intercept for the same directory by passing NULL. 759 759 760 struct dirent *readdir_test_hook_2(DIR *dir);760 extern "C" struct dirent *readdir_test_hook_2(DIR *dir); 761 761 762 762 #ifdef LINUX_WEIRD_LSTAT 763 int lstat_test_hook(int ver, const char *file_name, struct stat *buf);763 extern "C" int lstat_test_hook(int ver, const char *file_name, struct stat *buf); 764 764 #else 765 int lstat_test_hook(const char *file_name, struct stat *buf);765 extern "C" int lstat_test_hook(const char *file_name, struct stat *buf); 766 766 #endif 767 767 768 struct dirent *readdir_test_hook_1(DIR *dir)768 extern "C" struct dirent *readdir_test_hook_1(DIR *dir) 769 769 { 770 770 #ifndef PLATFORM_CLIB_FNS_INTERCEPTION_IMPOSSIBLE … … 777 777 // new filenames until the timer expires, then disables the intercept. 778 778 779 struct dirent *readdir_test_hook_2(DIR *dir)779 extern "C" struct dirent *readdir_test_hook_2(DIR *dir) 780 780 { 781 781 if (time(NULL) >= readdir_stop_time) … … 813 813 814 814 #ifdef LINUX_WEIRD_LSTAT 815 int lstat_test_hook(int ver, const char *file_name, struct stat *buf)815 extern "C" int lstat_test_hook(int ver, const char *file_name, struct stat *buf) 816 816 #else 817 int lstat_test_hook(const char *file_name, struct stat *buf)817 extern "C" int lstat_test_hook(const char *file_name, struct stat *buf) 818 818 #endif 819 819 { … … 1667 1667 // create a new file to force an upload 1668 1668 1669 c har* new_file = "testfiles/TestDir1/force-upload-2";1669 const char* new_file = "testfiles/TestDir1/force-upload-2"; 1670 1670 int fd = open(new_file, 1671 1671 O_CREAT | O_EXCL | O_WRONLY, 0700); … … 1676 1676 TEST_THAT(fd > 0); 1677 1677 1678 c har* control_string = "whee!\n";1678 const char* control_string = "whee!\n"; 1679 1679 TEST_THAT(write(fd, control_string, 1680 1680 strlen(control_string)) == … … 2419 2419 // runs the SyncAllowScript again. 2420 2420 2421 c har* sync_control_file = "testfiles"2421 const char* sync_control_file = "testfiles" 2422 2422 DIRECTORY_SEPARATOR "syncallowscript.control"; 2423 2423 int fd = open(sync_control_file, … … 2429 2429 TEST_THAT(fd > 0); 2430 2430 2431 c har* control_string = "10\n";2431 const char* control_string = "10\n"; 2432 2432 TEST_THAT(write(fd, control_string, 2433 2433 strlen(control_string)) == … … 2438 2438 // every 10 seconds to see if they are allowed again. 2439 2439 2440 c har* new_test_file = "testfiles"2440 const char* new_test_file = "testfiles" 2441 2441 DIRECTORY_SEPARATOR "TestDir1" 2442 2442 DIRECTORY_SEPARATOR "Added_During_Pause";
Note: See TracChangeset
for help on using the changeset viewer.
