From: Evgeny Vereshchagin Date: Wed, 10 May 2017 08:47:39 +0000 (+0000) Subject: test-sigbus: use posix_fallocate rather than fallocate X-Git-Tag: v234~210^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aab7037de426729ad582e7b2c9e67c943e17a540;p=platform%2Fupstream%2Fsystemd.git test-sigbus: use posix_fallocate rather than fallocate Some filesystems do not support fallocate, so we need to fall back on something like posix_fallocate. Closes #5833 --- diff --git a/src/test/test-sigbus.c b/src/test/test-sigbus.c index 02b8e24..2c8fc1c 100644 --- a/src/test/test-sigbus.c +++ b/src/test/test-sigbus.c @@ -38,7 +38,7 @@ int main(int argc, char *argv[]) { assert_se((fd = mkostemp(template, O_RDWR|O_CREAT|O_EXCL)) >= 0); assert_se(unlink(template) >= 0); - assert_se(fallocate(fd, 0, 0, page_size() * 8) >= 0); + assert_se(posix_fallocate(fd, 0, page_size() * 8) >= 0); p = mmap(NULL, page_size() * 16, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); assert_se(p != MAP_FAILED);