#7696·questdb

TestOs ignores a locally built sqllogictest library when the checkout path contains a target directory

Author: bluestreak01Created Sep 30, 2026Updated Sep 30, 2026

Describe the bug

TestOs decides whether to load a locally built sqllogictest library (core/rust/qdb-sqllogictest/target/{release,debug}/libqdbsqllogictest.*) or the precompiled library from core/target/test-classes/io/questdb/bin/<os>-<arch>/. To find the sources root, it takes the precompiled library's path and cuts it at the first /target/:

java
int targetIndex = absolutePathPreCompiled.indexOf("/target/");

(core/src/test/java/io/questdb/test/TestOs.java:95)

When the checkout lives under a directory named target, for example /home/u/target/questdb, the first match is that outer directory, and the sources root resolves to /home/u. The dev library paths then point at /home/u/rust/qdb-sqllogictest/target/..., which does not exist. Their timestamps read as 0, and TestOs silently loads the precompiled library, ignoring the developer's fresh local build.

Tests still run, but against a stale sqllogictest library, with no message saying so.

To reproduce

  1. Check out the repo under a path that contains a target directory, e.g. /tmp/target/questdb.
  2. Build core/rust/qdb-sqllogictest locally so its library is newer than the precompiled one.
  3. Run any AbstractCairoTest subclass: stderr never shows Loading DEV release sqllogictest library.

Expected

TestOs cuts at the target directory of the core module: lastIndexOf("/target/").

QuestDB version

master

Found while working on #7674.