TestMunMap.cpp 342 B

12345678910111213141516
  1. /*
  2. * Copyright (c) 2021, Brian Gianforcaro <bgianf@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include <LibTest/TestCase.h>
  7. #include <errno.h>
  8. #include <sys/mman.h>
  9. TEST_CASE(munmap_zero_page)
  10. {
  11. // munmap of the unmapped zero page should always "succeed".
  12. auto res = munmap(0x0, 0xF);
  13. EXPECT_EQ(res, 0);
  14. }