summaryrefslogtreecommitdiff
path: root/src/testsearch.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testsearch.c')
-rw-r--r--src/testsearch.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/testsearch.c b/src/testsearch.c
index 380dfba..3d560ac 100644
--- a/src/testsearch.c
+++ b/src/testsearch.c
@@ -53,8 +53,19 @@ TestSearch(void)
for (u = 0; u < 20; u++)
{
GenerateRandomLegalPosition(&pos);
+ // Log the exact FEN before searching it -- a crash partway
+ // through this loop otherwise gives no way to reproduce which
+ // of the 20 random positions triggered it (this cost real
+ // debugging time chasing an intermittent failure whose
+ // position was never captured -- see board_representation/
+ // MOVEGEN_MIGRATION.md section 6b).
+ {
+ char *pszFen = PositionToFen(&pos);
+ Trace("TestSearch position %lu/20: %s\n", u + 1,
+ pszFen ? pszFen : "(PositionToFen failed)");
+ }
InitializeSearcherContext(&pos, ctx);
-
+
g_MoveTimer.bvFlags = 0;
g_Options.fPondering = FALSE;
g_Options.fThinking = TRUE;