1.1 --- a/tests/dstest_file_mapping.cc Tue Jun 07 01:14:05 2022 +0200
1.2 +++ b/tests/dstest_file_mapping.cc Tue Jun 07 18:00:28 2022 +0200
1.3 @@ -32,29 +32,6 @@
1.4 #include <mem/memory_utils.h>
1.5
1.6 #include "dataspace_client.h"
1.7 -#include "mapped_file_client.h"
1.8 -
1.9 -
1.10 -
1.11 -/* NOTE: Copied from libfsclient. */
1.12 -
1.13 -static void _update_extent(file_t *file)
1.14 -{
1.15 - /* Handle files ending after or within the region. */
1.16 -
1.17 - if (file->size > file->start_pos)
1.18 - {
1.19 - if (file->size > file->end_pos)
1.20 - file->data_end = file->end_pos - file->start_pos;
1.21 - else
1.22 - file->data_end = file->size - file->start_pos;
1.23 - }
1.24 -
1.25 - /* Handle files ending before the region. */
1.26 -
1.27 - else
1.28 - file->data_end = 0;
1.29 -}
1.30
1.31
1.32
1.33 @@ -91,11 +68,9 @@
1.34 return 1;
1.35 }
1.36
1.37 - /* A region of the file is mapped. */
1.38 + /* A region of the file is mapped but not attached. */
1.39
1.40 - client_MappedFile mapped_file(file.ref);
1.41 -
1.42 - err = mapped_file.mmap(0, page(10), 0, 0, &file.start_pos, &file.end_pos, &file.size);
1.43 + err = file_mmap_only(&file, 0, page(10), 0, 0);
1.44
1.45 if (err)
1.46 {
1.47 @@ -106,7 +81,6 @@
1.48 /* Fix up the file data structure manually. */
1.49
1.50 file.memory = (char *) 0x2000000;
1.51 - _update_extent(&file);
1.52
1.53 /* Explicitly map the file into this address space, without region mapper
1.54 usage. The receive window base must be a multiple of its size. */