Add/Remove mmap tests.
Remove the incorrect tests that use a negative offset for mmap without a fd. Add a small set of tests for mmap. Bug: 15436969 Change-Id: Id537d33cd4cdc26dee6cdfa9bf9cf35754bce335
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
template<int (*mk_fn)(char*)>
|
||||
@@ -39,6 +40,11 @@ class GenericTemporaryFile {
|
||||
unlink(filename);
|
||||
}
|
||||
|
||||
void reopen() {
|
||||
close(fd);
|
||||
fd = open(filename, O_RDWR);
|
||||
}
|
||||
|
||||
int fd;
|
||||
char filename[1024];
|
||||
|
||||
|
Reference in New Issue
Block a user