Artifact d25fd84f291c9dd77897d1957b58090979b138d65f2798c4687c02f12a077603:
- File
src/stamp.h
— part of check-in
[3f905be4f2]
at
2026-11-12 21:17:36
on branch trunk
— Every branch of suit's own code is tested, and the gates that keep it so
make cover fails unless every function, line, region and branch in src/ is run by a test. Every system call goes through a wrapper in platform.c that a test build can make fail, so failed-call branches are tested too. The release binary carries none of that code, and a test checks it.
Also: ensure() for invariants, a wider warning set as errors, the clang static analyzer, a second fuzz target for the stamp reader, a replay binary for saved fuzz inputs, a release build that the speed budget now measures, and make ci for the forge's Linux runner: the suite under gcc's sanitizers, then under a pinned Fil-C.
210 unit checks and 214 shell cases. The no-change run measured 0.56 to 0.60 ms over an empty program with the release build.
The Fil-C run and the Linux build have not been run yet. They run first on the forge's runner.
Decisions recorded: the wardrobe is two repositories, libfossil is used through its C API with suit's own file writer, and where each gate runs. (user: dmestas, size: 716) [annotate] [blame] [check-ins using]
#ifndef SUIT_STAMP_H #define SUIT_STAMP_H #include <stddef.h> constexpr int EXIT_UNCHANGED = 0; constexpr int EXIT_CHANGED = 10; constexpr int EXIT_NO_STAMP = 11; constexpr int EXIT_BAD_STAMP = 12; constexpr size_t STAMP_FILE_MAX = 1048576; constexpr size_t STAMP_PATH_MAX = 4096; // Writes $SUIT_HOME/stamp (default ~/.suit/stamp) atomically. Returns 0 or a // nonzero exit code after reporting on stderr. int stamp_write(int npaths, char *const *paths); // The no-change compare. Reads the stamp, stats each path, and writes only // to stdout and stderr: no file is created or changed and nothing is // allocated. Returns one of the EXIT_ codes, or 1 if it cannot read the stamp. int stamp_run(void); #endif