Lind-Project / RawPOSIX

Rust POSIX-compliant interface
Apache License 2.0
0 stars 0 forks source link

fix: test case `ut_lind_fs_mmap_zerolen` #70

Closed ChinmayShringi closed 1 month ago

ChinmayShringi commented 1 month ago

Description

Fixes # (issue)

This PR updates the ut_lind_fs_mmap_zerolen test to correctly handle the case where mmap_syscall is passed a length of 0. Passing 0 as the length to mmap should result in an invalid argument error (EINVAL). Previously, the test directly compared the result of mmap_syscall with -(Errno::EINVAL as i32), which was incorrect. Now, the test checks for mmap_syscall returning -1 and verifies that errno is set to EINVAL.

Changes:

Type of change

How Has This Been Tested?

Checklist: