xfs
[Top] [All Lists]

Re: [PATCH] xfstests: clean up fallocate configuration tests

To: Eric Sandeen <sandeen@xxxxxxxxxxx>
Subject: Re: [PATCH] xfstests: clean up fallocate configuration tests
From: Allison Henderson <achender@xxxxxxxxxxxxxxxxxx>
Date: Tue, 03 May 2011 12:03:11 -0700
Cc: xfs-oss <xfs@xxxxxxxxxxx>
In-reply-to: <4DBF492E.3040400@xxxxxxxxxxx>
References: <4DBF492E.3040400@xxxxxxxxxxx>
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9
On 5/2/2011 5:15 PM, Eric Sandeen wrote:
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@xxxxxxxxxxx>
---

diff --git a/aclocal.m4 b/aclocal.m4
index 70ea0f3..168eb59 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -18,27 +18,14 @@ AC_DEFUN([AC_PACKAGE_WANT_LINUX_FIEMAP_H],

  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])
diff --git a/src/Makefile b/src/Makefile
index 1162ee0..91088bf 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -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


_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs

Thanks Eric,

I tried it out and it looks like it works great. I will back out the changes to the Makefile in my fsx patch.

Allison Henderson

<Prev in Thread] Current Thread [Next in Thread>