Files
hakmem/tests/unit/libm_reloc_guard_test.c

15 lines
422 B
C
Raw Normal View History

// tests/unit/libm_reloc_guard_test.c - Box-level test for libm relocation guard
#include <assert.h>
#include <stdlib.h>
#include "box/libm_reloc_guard_box.h"
int main(void) {
// Guard should honor env disable before first evaluation.
setenv("HAKMEM_LIBM_RELOC_GUARD", "0", 1);
assert(libm_reloc_guard_enabled() == 0);
// Should no-op safely even when called.
libm_reloc_guard_run();
return 0;
}