criu/test/libfault/Makefile
Radostin Stoyanov 1da29f27f6 zdtm: add support for LD_PRELOAD tests
This commit adds a `--preload-libfault` option to ZDTM's run command.
This option runs CRIU with LD_PRELOAD to intercept libc functions
such as pread(). This method allows to simulate special cases,
for example, when a successful call to pread() transfers fewer
bytes than requested.

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2024-09-11 16:02:11 -07:00

21 lines
238 B
Makefile

CC = gcc
CFLAGS = -c -fPIC -ldl
SRC = libfault.c
OBJ = $(SRC:.c=.o)
LIB = libfault.so
.PHONY: all clean run
all: $(LIB)
$(LIB): $(OBJ)
$(CC) -shared -o $(LIB) $(OBJ)
$(OBJ): $(SRC)
$(CC) $(CFLAGS) $<
clean:
rm -f $(OBJ) $(LIB)