runtime: encapsulate checkpoint progress state
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include "game/stdafx.h"
|
||||
#include "game/SecureCipher.h"
|
||||
#include "libthecore/fdwatch.h"
|
||||
#include "libthecore/signal.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
@@ -309,6 +310,19 @@ void TestFdwatchBackendMetadata()
|
||||
fdwatch_delete(fdw);
|
||||
}
|
||||
|
||||
void TestCheckpointBackendMetadata()
|
||||
{
|
||||
#ifdef OS_WINDOWS
|
||||
Expect(signal_checkpoint_backend() == CHECKPOINT_BACKEND_NONE, "Expected no checkpoint backend on Windows");
|
||||
Expect(std::strcmp(signal_checkpoint_backend_name(signal_checkpoint_backend()), "none") == 0,
|
||||
"Unexpected checkpoint backend name on Windows");
|
||||
#else
|
||||
Expect(signal_checkpoint_backend() == CHECKPOINT_BACKEND_VIRTUAL_TIMER, "Expected virtual timer checkpoint backend");
|
||||
Expect(std::strcmp(signal_checkpoint_backend_name(signal_checkpoint_backend()), "virtual-timer") == 0,
|
||||
"Unexpected checkpoint backend name");
|
||||
#endif
|
||||
}
|
||||
|
||||
void TestFdwatchSlotReuseAfterDelete()
|
||||
{
|
||||
int sockets_a[2] = { -1, -1 };
|
||||
@@ -358,6 +372,7 @@ int main()
|
||||
TestSecureCipherRoundTrip();
|
||||
TestSocketAuthWireFlow();
|
||||
TestFdwatchBackendMetadata();
|
||||
TestCheckpointBackendMetadata();
|
||||
TestFdwatchReadAndOneshotWrite();
|
||||
TestFdwatchSlotReuseAfterDelete();
|
||||
std::cout << "metin smoke tests passed\n";
|
||||
|
||||
Reference in New Issue
Block a user