Skip to content

Commit f459aef

Browse files
benhillisBen Hillis
andauthored
virtiofs: enable test case for mapping virtiofs MAP_PRIVATE (#13964)
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
1 parent f3125bb commit f459aef

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/linux/unit_tests/drvfs.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3475,14 +3475,18 @@ Return Value:
34753475
// is what execve uses.
34763476
//
34773477

3478+
LxtCheckMapErrno(Mapping = mmap(NULL, 2, PROT_READ, MAP_PRIVATE, Fd, 0));
3479+
LxtCheckMemoryEqual(Mapping, "MZ", 2);
3480+
LxtCheckResult(munmap(Mapping, 2));
3481+
34783482
if (g_LxtFsInfo.FsType != LxtFsTypeVirtioFs)
34793483
{
34803484
LxtCheckMapErrno(Mapping = mmap(NULL, 2, PROT_READ, MAP_SHARED, Fd, 0));
34813485
LxtCheckMemoryEqual(Mapping, "MZ", 2);
34823486
}
34833487
else
34843488
{
3485-
LxtLogInfo("TODO: debug virtiofs handling of app exec links");
3489+
LxtLogInfo("TODO: virtiofs does not support MAP_SHARED");
34863490
}
34873491

34883492
ErrorExit:

0 commit comments

Comments
 (0)