2000-03-30 17:15:46 -04:00
|
|
|
test_mmap
|
2001-12-08 14:02:58 -04:00
|
|
|
<type 'mmap.mmap'>
|
2000-03-30 17:15:46 -04:00
|
|
|
Position of foo: 1.0 pages
|
|
|
|
Length of file: 2.0 pages
|
2001-01-24 17:49:57 -04:00
|
|
|
Contents of byte 0: '\x00'
|
|
|
|
Contents of first 3 bytes: '\x00\x00\x00'
|
2000-03-30 17:15:46 -04:00
|
|
|
|
|
|
|
Modifying file's content...
|
|
|
|
Contents of byte 0: '3'
|
2001-01-24 17:49:57 -04:00
|
|
|
Contents of first 3 bytes: '3\x00\x00'
|
|
|
|
Contents of second page: '\x00foobar\x00'
|
2000-03-30 17:15:46 -04:00
|
|
|
Regex match on mmap (page start, length of match): 1.0 6
|
2000-06-18 01:47:08 -03:00
|
|
|
Seek to zeroth byte
|
|
|
|
Seek to 42nd byte
|
|
|
|
Seek to last byte
|
|
|
|
Try to seek to negative position...
|
|
|
|
Try to seek beyond end of mmap...
|
|
|
|
Try to seek to negative position...
|
2000-07-11 07:45:28 -03:00
|
|
|
Attempting resize()
|
2001-11-13 19:11:19 -04:00
|
|
|
Creating 10 byte test data file.
|
|
|
|
Opening mmap with access=ACCESS_READ
|
|
|
|
Ensuring that readonly mmap can't be slice assigned.
|
|
|
|
Ensuring that readonly mmap can't be item assigned.
|
|
|
|
Ensuring that readonly mmap can't be write() to.
|
|
|
|
Ensuring that readonly mmap can't be write_byte() to.
|
|
|
|
Ensuring that readonly mmap can't be resized.
|
2002-09-05 18:48:07 -03:00
|
|
|
Opening mmap with size too big
|
2001-11-13 19:11:19 -04:00
|
|
|
Opening mmap with access=ACCESS_WRITE
|
|
|
|
Modifying write-through memory map.
|
|
|
|
Opening mmap with access=ACCESS_COPY
|
|
|
|
Modifying copy-on-write memory map.
|
|
|
|
Ensuring copy-on-write maps cannot be resized.
|
|
|
|
Ensuring invalid access parameter raises exception.
|
2006-01-11 04:54:45 -04:00
|
|
|
Try opening a bad file descriptor...
|
2005-03-03 07:22:44 -04:00
|
|
|
Ensuring that passing 0 as map length sets map size to current file size.
|
|
|
|
Ensuring that passing 0 as map length sets map size to current file size.
|
2006-02-05 01:45:43 -04:00
|
|
|
anonymous mmap.mmap(-1, PAGESIZE)...
|
2000-03-30 17:15:46 -04:00
|
|
|
Test passed
|