Files
sliverarmory-reflektor/integration/sharedlib_load_recursive_assert_freebsd_test.go
moloch-- c7ee9636e9 feat: add FreeBSD amd64 and arm64 support
Enable BOF and ELF shared-library loading on FreeBSD, including recursive dependency handling and exact symbol-version resolution.

Add strict no-skip FreeBSD 15.1 QEMU coverage, a 25-object semantic BOF corpus per architecture, platform documentation, and the verified Sliver compile exception.
2026-08-23 19:00:58 -07:00

31 lines
778 B
Go

//go:build freebsd && (amd64 || arm64)
package reflektor_test
import (
"bytes"
"os"
"os/exec"
"path/filepath"
"strconv"
"testing"
)
func assertRecursiveDependenciesNotNativeLoaded(t *testing.T, graphDir string) {
t.Helper()
absDir, err := filepath.Abs(graphDir)
if err != nil {
t.Fatalf("resolve recursive graph directory: %v", err)
}
if evaluated, err := filepath.EvalSymlinks(absDir); err == nil {
absDir = evaluated
}
output, err := exec.Command("procstat", "-v", strconv.Itoa(os.Getpid())).CombinedOutput()
if err != nil {
t.Fatalf("procstat -v current process: %v\n%s", err, output)
}
if bytes.Contains(output, []byte(absDir)) {
t.Fatalf("recursive dependency graph appears in procstat output as an OS file mapping: %s\n%s", absDir, output)
}
}