[Box Backup-commit] COMMIT r2291 - box/trunk/test/bbackupd
boxbackup-dev@fluffy.co.uk
boxbackup-dev@fluffy.co.uk
Fri, 26 Sep 2008 21:18:14 +0100 (BST)
Author: chris
Date: 2008-09-26 21:18:13 +0100 (Fri, 26 Sep 2008)
New Revision: 2291
Modified:
box/trunk/test/bbackupd/testbbackupd.cpp
Log:
Reinstate and fix the intercept tests for SSL keepalives.
Modified: box/trunk/test/bbackupd/testbbackupd.cpp
===================================================================
--- box/trunk/test/bbackupd/testbbackupd.cpp 2008-09-16 22:24:58 UTC (rev 2290)
+++ box/trunk/test/bbackupd/testbbackupd.cpp 2008-09-26 20:18:13 UTC (rev 2291)
@@ -705,11 +705,11 @@
TEST_EQUAL(0, result, "Daemon exit code");
// ensure that no child processes end up running tests!
- TEST_EQUAL(own_pid, getpid(), "Forking test problem");
if (getpid() != own_pid)
{
// abort!
- _exit(1);
+ BOX_INFO("Daemon child finished, exiting now.");
+ _exit(0);
}
TEST_THAT(TestFileExists("testfiles/bbackupd.pid"));
@@ -743,7 +743,7 @@
bool stop_internal_daemon(int pid)
{
- bool killed_server = KillServer(pid, true);
+ bool killed_server = KillServer(pid, false);
TEST_THAT(killed_server);
return killed_server;
}
@@ -892,9 +892,8 @@
TEST_THAT(::system("gzip -d < testfiles/spacetest1.tgz "
"| ( cd testfiles/TestDir1 && tar xf - )") == 0);
#endif
-
-#if 1
-// #ifdef PLATFORM_CLIB_FNS_INTERCEPTION_IMPOSSIBLE
+
+#ifdef PLATFORM_CLIB_FNS_INTERCEPTION_IMPOSSIBLE
printf("\n==== Skipping intercept-based KeepAlive tests "
"on this platform.\n");
#else
@@ -2548,7 +2547,7 @@
TEST_THAT(TestGetFileSize("testfiles/TestDir1/f45.df")
> 1024);
}
-
+
// wait for backup daemon to do it's stuff, and compare again
wait_for_backup_operation();
compareReturnValue = ::system(BBACKUPQUERY " -Wwarning "