selftests/fuse: add fuse symlink caching test

This patch adds a simple test that allows to verify that, when resolving a
symlink, user-space is called only the first time when caching is enabled
or, if caching is disabled, every time the symlink resolution is requested.

Signed-off-by: Luis Henriques <luis@igalia.com>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
This commit is contained in:
Luis Henriques 2026-10-01 17:49:15 +01:00 committed by Miklos Szeredi
parent 29a41bdca2
commit 3e14f079d7
2 changed files with 3 additions and 0 deletions

View File

@ -4,3 +4,4 @@ fusectl_test
test_syncfs test_syncfs
write_extend_eof_test write_extend_eof_test
fuse_acl_cache_test fuse_acl_cache_test
fuse_symlink_cache_test

View File

@ -5,6 +5,7 @@ CFLAGS += -Wall -O2 -g $(KHDR_INCLUDES)
TEST_GEN_PROGS := fusectl_test test_syncfs TEST_GEN_PROGS := fusectl_test test_syncfs
TEST_GEN_PROGS += write_extend_eof_test TEST_GEN_PROGS += write_extend_eof_test
TEST_GEN_PROGS += fuse_acl_cache_test TEST_GEN_PROGS += fuse_acl_cache_test
TEST_GEN_PROGS += fuse_symlink_cache_test
TEST_GEN_FILES := fuse_mnt TEST_GEN_FILES := fuse_mnt
include ../../lib.mk include ../../lib.mk
@ -28,5 +29,6 @@ $(OUTPUT)/fuse_mnt: CFLAGS += $(VAR_CFLAGS)
$(OUTPUT)/fuse_mnt: LDLIBS += $(VAR_LDLIBS) $(OUTPUT)/fuse_mnt: LDLIBS += $(VAR_LDLIBS)
$(OUTPUT)/fuse_acl_cache_test: fuse_common.c fuse_acl_cache_test.c $(OUTPUT)/fuse_acl_cache_test: fuse_common.c fuse_acl_cache_test.c
$(OUTPUT)/fuse_symlink_cache_test: fuse_common.c fuse_symlink_cache_test.c
EXTRA_CLEAN := fuse_common.o EXTRA_CLEAN := fuse_common.o