[LTP] [PATCH 1/3] syscalls: munmap01: Convert to new API
Andrea Cervesato
andrea.cervesato@suse.com
Fri Jul 4 14:07:08 CEST 2025
On 7/3/25 8:39 PM, Ricardo B. Marlière via ltp wrote:
> +static void cleanup(void)
> {
> - tst_resm(TPASS, "Functionality of munmap() successful");
> -
> - /* Invoke test cleanup function and exit */
> - cleanup();
> -
> - tst_exit();
> + if (fd)
> + SAFE_CLOSE(fd);
> }
Also remember that test can be run with -i0, so if you don't unmap
memory in the cleanup() function, that will remain allocated in the system.
- Andrea
More information about the ltp
mailing list