Hello, I am starting a project using Zig to interact with RocksDB, which has been mostly great, but stuck on a couple of things. First, I am successfully calling Rocks from my executable, but when I run the test step I get errors that it is not linked. I tried adding the same directives in build.zig to the test executable:
tests.linkLibC();
tests.linkSystemLibraryName("rocksdb");
tests.addIncludePath(.{ .path = "/usr/include" });
But the test step still says it can't find rocksdb/c.h and that libc is not linked. I am working around by building the test executable instead:
b.installArtifact(tests);
Which works, but only for tests I define in main.zig. Tests in other files do not get run, even though they are imported and used in main.zig.
The second issue is with C strings. Everything I read says that Zig "strings" are null-terminated and will work with C calls. This has been the case for me when using comptime strings. but I am trying to use a randomly-generated folder name for testing which I create using std.fmt.printAlloc, and RocksDB is giving an error saying the file path is too long. When Rocks prints the path, it appears to not be terminated and contain an entire memory page:
ERRR IO error: While mkdir if missing: /tmp/rockstest-hgkfemsmj7�����������...etc
Any pointers (pun) would be appreciated!

