xfstests: clean up fallocate configuration tests
authorEric Sandeen <sandeen@sandeen.net>
Wed, 4 May 2011 13:47:22 +0000 (08:47 -0500)
committerEric Sandeen <sandeen@sandeen.net>
Wed, 4 May 2011 13:47:22 +0000 (08:47 -0500)
When I added fallocate support to fsx I inadvertently added
a duplicate fallocate test.

Consolidate them both into one test (the link test, not the
compile test) and make all tests use "true" rather than "yes"
to be more consistent with other tests.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Alex Elder <aelder@sgi.com>
aclocal.m4
src/Makefile

index 70ea0f39ad38e89bc8b44b18f19c92d817ff39c2..168eb59e20b037fd5f79e33875dafc6638326a33 100644 (file)
@@ -16,29 +16,16 @@ AC_DEFUN([AC_PACKAGE_WANT_LINUX_FIEMAP_H],
     AC_SUBST(have_fiemap)
   ])
 
-AC_DEFUN([AC_PACKAGE_WANT_FALLOCATE],
-  [ AC_MSG_CHECKING([for fallocate])
-    AC_TRY_COMPILE([
-#include <linux/falloc.h>
-    ], [
-         fallocate(0, 0, 0, 0);
-    ], have_fallocate=true
-       AC_MSG_RESULT(true),
-       AC_MSG_RESULT(false))
-    AC_SUBST(have_fallocate)
-  ])
 AC_DEFUN([AC_PACKAGE_WANT_FALLOCATE],
   [ AC_MSG_CHECKING([for fallocate])
     AC_TRY_LINK([
 #define _GNU_SOURCE
 #define _FILE_OFFSET_BITS 64
 #include <fcntl.h>
-#include <linux/falloc.h>
-    ], [
-         fallocate(0, 0, 0, 0);
-    ], have_fallocate=yes
-       AC_MSG_RESULT(yes),
-       AC_MSG_RESULT(no))
+#include <linux/falloc.h> ],
+      [ fallocate(0, 0, 0, 0); ],
+      [ have_fallocate=true; AC_MSG_RESULT(yes) ],
+      [ have_fallocate=false; AC_MSG_RESULT(no) ])
     AC_SUBST(have_fallocate)
   ])
 m4_include([m4/multilib.m4])
index 1162ee08dfa1474faeca10d45ca338ffaff22356..91088bf4cabb7710d0eb99b8bb61710b7663def4 100644 (file)
@@ -31,7 +31,7 @@ ifeq ($(HAVE_FIEMAP), true)
 LINUX_TARGETS += fiemap-tester
 endif
 
-ifeq ($(HAVE_FALLOCATE),yes)
+ifeq ($(HAVE_FALLOCATE), true)
 LCFLAGS += -DHAVE_FALLOCATE
 endif