102 Patches: Detours to the Rescue
C reference for DttR maintainers and modders.
Loading...
Searching...
No Matches
pcdogs_fixtures.c
Go to the documentation of this file.
1#include <dttr_test.h>
2
3#include <stdlib.h>
4
7 .id = "en",
8 .filename = "pcdogs_en.exe",
9 .size = 438272,
10 .xxh3 = UINT64_C(0x78b1f7ebc13a1428),
11 },
13 .id = "eu",
14 .filename = "pcdogs_eu.exe",
15 .size = 446464,
16 .xxh3 = UINT64_C(0xb7addc38f431ab95),
17 },
19 .id = "sc",
20 .filename = "pcdogs_sc.exe",
21 .size = 446464,
22 .xxh3 = UINT64_C(0xa4034d351b713639),
23 },
24};
25
26// Return the build-configured PCDOGS fixture directory for signature tests.
27const char *pcdogs_fixture_dir() {
28 const char *const dir = getenv("DTTR_PCDOGS_FIXTURE_DIR");
29 return (dir && dir[0]) ? dir : "fixture";
30}
31
32// Check every expected PCDOGS fixture before enabling binary-backed tests.
40
41// Load each PCDOGS fixture image and pass it to the requested visitor.
42bool pcdogs_for_each_fixture(DTTR_TestPEFixtureVisitor visitor, void *userdata) {
47 visitor,
48 userdata
49 );
50}
bool dttr_test_pe_for_each_fixture(const DTTR_TestBinaryFixture *fixtures, size_t fixture_count, const char *fixture_dir, DTTR_TestPEFixtureVisitor visitor, void *userdata)
Definition binary.c:405
bool dttr_test_fixtures_available(const DTTR_TestBinaryFixture *fixtures, size_t fixture_count, const char *fixture_dir)
Definition binary.c:191
DTTR_TestBinaryFixture DTTR_TestPCDOGSFixture
Definition dttr_test.h:37
@ DTTR_TEST_PCDOGS_EN
Definition dttr_test.h:31
@ DTTR_TEST_PCDOGS_FIXTURE_COUNT
Definition dttr_test.h:34
@ DTTR_TEST_PCDOGS_EU
Definition dttr_test.h:32
@ DTTR_TEST_PCDOGS_SC
Definition dttr_test.h:33
const DTTR_TestPCDOGSFixture DTTR_TEST_PCDOGS_FIXTURES[]
const char * pcdogs_fixture_dir()
Return the fixture directory used by PCDOGS signature tests.
bool pcdogs_fixtures_available()
Report whether all PCDOGS binary fixtures are available for signature tests.
bool pcdogs_for_each_fixture(DTTR_TestPEFixtureVisitor visitor, void *userdata)
Visit each available PCDOGS fixture image for signature and ABI checks.