public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: xfs-oss <xfs@oss.sgi.com>
Cc: Allison Henderson <achender@linux.vnet.ibm.com>
Subject: [PATCH] xfstests: clean up fallocate configuration tests
Date: Mon, 02 May 2011 19:15:42 -0500	[thread overview]
Message-ID: <4DBF492E.3040400@sandeen.net> (raw)

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>
---

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@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

             reply	other threads:[~2011-05-03  0:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-03  0:15 Eric Sandeen [this message]
2011-05-03 17:38 ` [PATCH] xfstests: clean up fallocate configuration tests Alex Elder
2011-05-03 19:03 ` Allison Henderson
2011-05-04 13:48   ` Eric Sandeen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DBF492E.3040400@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=achender@linux.vnet.ibm.com \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox