2021-07-30 06:05:15 -03:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2021, Brian Gianforcaro <bgianf@serenityos.org>
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <LibTest/TestCase.h>
|
|
|
|
|
#include <errno.h>
|
|
|
|
|
#include <sys/mman.h>
|
|
|
|
|
|
|
|
|
|
TEST_CASE(munmap_zero_page)
|
|
|
|
|
{
|
2021-07-30 08:14:51 -03:00
|
|
|
// munmap of the unmapped zero page should always "succeed".
|
2021-07-30 06:05:15 -03:00
|
|
|
auto res = munmap(0x0, 0xF);
|
2021-07-30 08:14:51 -03:00
|
|
|
EXPECT_EQ(res, 0);
|
2021-07-30 06:05:15 -03:00
|
|
|
}
|