mirror of
https://github.com/torvalds/linux.git
synced 2026-04-25 10:02:31 -04:00
fs_bench benchmarks the performance of Landlock's path walk by exercising it in a scenario that amplifies Landlock's overhead: * Create a large number of nested directories * Enforce a Landlock policy in which a rule is associated with each of these subdirectories * Benchmark openat() applied to the deepest directory, forcing Landlock to walk the entire path. Signed-off-by: Günther Noack <gnoack3000@gmail.com> Link: https://lore.kernel.org/r/20260206151154.97915-3-gnoack3000@gmail.com [mic: Fix missing mode with O_CREAT, improve text consistency, sort includes] Signed-off-by: Mickaël Salaün <mic@digikod.net>
29 lines
599 B
Makefile
29 lines
599 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
# First run: make -C ../../../.. headers_install
|
|
|
|
CFLAGS += -Wall -O2 $(KHDR_INCLUDES)
|
|
|
|
LOCAL_HDRS += $(wildcard *.h)
|
|
|
|
src_test := $(wildcard *_test.c)
|
|
|
|
TEST_GEN_PROGS := $(src_test:.c=)
|
|
TEST_GEN_PROGS += fs_bench
|
|
|
|
TEST_GEN_PROGS_EXTENDED := \
|
|
true \
|
|
sandbox-and-launch \
|
|
wait-pipe \
|
|
wait-pipe-sandbox
|
|
|
|
# Short targets:
|
|
$(TEST_GEN_PROGS): LDLIBS += -lcap -lpthread
|
|
$(TEST_GEN_PROGS_EXTENDED): LDFLAGS += -static
|
|
|
|
include ../lib.mk
|
|
|
|
# Targets with $(OUTPUT)/ prefix:
|
|
$(TEST_GEN_PROGS): LDLIBS += -lcap -lpthread
|
|
$(TEST_GEN_PROGS_EXTENDED): LDFLAGS += -static
|