


     munmap_P(LSB.os/mfileLSB-OS (The Open Groumunmap_P(LSB.os/mfiles)



     NAME
	  LSB.os/mfiles/munmap_P - unmap previously mapped addresses
	  testset

     DESCRIPTION
	  Tests	the munmap() function for conformance to System
	  Interfaces and Headers, Issue	5 Page:	munmap().
	  These	tests are for testing the 1003.1b requirements.

     TESTS
     Compliance
	  1    If _POSIX_MAPPED_FILES is defined or the	implementation
	       supports	the munmap() function as defined in System
	       Interfaces and Headers, Issue 5.
		 A successful call to munmap() shall remove the
		 mappings of the pages in the range [addr,addr+len]
		 established by	a prior	call to	mmap() from the
		 address space of the process and return 0.

	  2    If _POSIX_MAPPED_FILES is defined or the	implementation
	       supports	the munmap() function as defined in System
	       Interfaces and Headers, Issue 5.
		 A successful call to int munmap(void *addr, size_t
		 len) shall round len up to the	next multiple of the
		 page size.

	  3    If _POSIX_MAPPED_FILES is defined or the	implementation
	       supports	the munmap() function as defined in System
	       Interfaces and Headers, Issue 5.
		 References to unmapped	pages after a successful call
		 to munmap() and before	any subsequent mapping of the
		 unmapped pages	shall result in	the delivery of	a
		 SIGSEGV signal	to the process.

     Deviance
	  4    If _POSIX_MAPPED_FILES is defined or the	implementation
	       supports	the munmap() function as defined in System
	       Interfaces and Headers, Issue 5.
		 A call	to munmap() when addresses in the range
		 [addr,addr+len] are outside the valid range for the
		 address space of the calling process shall return -1
		 and set errno to EINVAL.

	  5    If _POSIX_MAPPED_FILES is defined or the	implementation
	       supports	the munmap() function as defined in System
	       Interfaces and Headers, Issue 5.
		 A call	to munmap() when len is	0 shall	return -1 and
		 set errno to EINVAL.

	  6    If neither _POSIX_MAPPED_FILES nor
	       _POSIX_SHARED_MEMORY_OBJECTS is defined and the
	       implementation does not support the munmap() function



     Page 1					    (printed 2/21/103)






     munmap_P(LSB.os/mfileLSB-OS (The Open Groumunmap_P(LSB.os/mfiles)



	       as defined in System Interfaces and Headers, Issue 5.
		 A call	to munmap() shall return -1 and	set errno to
		 ENOSYS.

     Untestable	Aspects
	  1    If _POSIX_MAPPED_FILES is defined or the	implementation
	       supports	the munmap() function as defined in System
	       Interfaces and Headers, Issue 5.
		 A call	to munmap() when addr is not a multiple	of the
		 page size may return -1 and set errno to EINVAL.
		 Reason	for omission: The specification	is inadequate
		 for testing as	it does	not specify the	conditions
		 under which this error	will occur.

     RELEASE
	  Release LSB-OS
	  Copyright (c)	1997 X/Open Company Ltd., A member of The Open
	  Group.
	  All rights reserved




































     Page 2					    (printed 2/21/103)



