diff options
Diffstat (limited to 'tools/testing/selftests/mm/map_populate.c')
| -rw-r--r-- | tools/testing/selftests/mm/map_populate.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/testing/selftests/mm/map_populate.c b/tools/testing/selftests/mm/map_populate.c index 5c8a53869b1b..712327f4e932 100644 --- a/tools/testing/selftests/mm/map_populate.c +++ b/tools/testing/selftests/mm/map_populate.c @@ -16,7 +16,9 @@ #include <stdlib.h> #include <string.h> #include <unistd.h> -#include "../kselftest.h" +#include "kselftest.h" + +#include "vm_util.h" #define MMAP_SZ 4096 @@ -87,6 +89,9 @@ int main(int argc, char **argv) BUG_ON(!ftmp, "tmpfile()"); ret = ftruncate(fileno(ftmp), MMAP_SZ); + if (ret < 0 && errno == ENOENT) { + skip_test_dodgy_fs("ftruncate()"); + } BUG_ON(ret, "ftruncate()"); smap = mmap(0, MMAP_SZ, PROT_READ | PROT_WRITE, |
