From f459aef63d207a8fb5e27bda8eb6361a5cf21097 Mon Sep 17 00:00:00 2001 From: Ben Hillis Date: Tue, 23 Dec 2025 09:26:20 -0800 Subject: [PATCH] virtiofs: enable test case for mapping virtiofs MAP_PRIVATE (#13964) Co-authored-by: Ben Hillis --- test/linux/unit_tests/drvfs.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/linux/unit_tests/drvfs.c b/test/linux/unit_tests/drvfs.c index 47be54d4..0e3d0345 100644 --- a/test/linux/unit_tests/drvfs.c +++ b/test/linux/unit_tests/drvfs.c @@ -3475,6 +3475,10 @@ Return Value: // is what execve uses. // + LxtCheckMapErrno(Mapping = mmap(NULL, 2, PROT_READ, MAP_PRIVATE, Fd, 0)); + LxtCheckMemoryEqual(Mapping, "MZ", 2); + LxtCheckResult(munmap(Mapping, 2)); + if (g_LxtFsInfo.FsType != LxtFsTypeVirtioFs) { LxtCheckMapErrno(Mapping = mmap(NULL, 2, PROT_READ, MAP_SHARED, Fd, 0)); @@ -3482,7 +3486,7 @@ Return Value: } else { - LxtLogInfo("TODO: debug virtiofs handling of app exec links"); + LxtLogInfo("TODO: virtiofs does not support MAP_SHARED"); } ErrorExit: