* fstests: fix build issues
@ 2021-10-10 23:06 Dave Chinner
2021-10-10 23:06 ` [PATCH 1/2] fstests: autoconf has deprecated a bunch of macros Dave Chinner
2021-10-10 23:06 ` [PATCH 2/2] fstests: groupfile generation needs force overwrite Dave Chinner
0 siblings, 2 replies; 5+ messages in thread
From: Dave Chinner @ 2021-10-10 23:06 UTC (permalink / raw)
To: fstests
Hi folks,
With Debian unstable moving all it's userspace forwards after the
recent release, fstests inew issues a bunch of warnings when running
autoconf. Update the autoconf scripts so that they don't make a
bunch of noise anymore.
Also, when building with different users, the group file build can
fail to overwrite the group files, resulting in build failures. Fix
that, too.
Cheers,
Dave.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] fstests: autoconf has deprecated a bunch of macros
2021-10-10 23:06 fstests: fix build issues Dave Chinner
@ 2021-10-10 23:06 ` Dave Chinner
2021-10-11 16:53 ` Darrick J. Wong
2021-10-10 23:06 ` [PATCH 2/2] fstests: groupfile generation needs force overwrite Dave Chinner
1 sibling, 1 reply; 5+ messages in thread
From: Dave Chinner @ 2021-10-10 23:06 UTC (permalink / raw)
To: fstests
From: Dave Chinner <dchinner@redhat.com>
Latest debian unstable environment results in these build warnings:
autoconf
configure.ac:8: warning: The macro `AC_HEADER_STDC' is obsolete.
configure.ac:8: You should run autoupdate.
./lib/autoconf/headers.m4:704: AC_HEADER_STDC is expanded from...
configure.ac:8: the top level
configure.ac:50: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:50: You should run autoupdate.
./lib/autoconf/general.m4:2920: AC_TRY_LINK is expanded from...
m4/package_xfslibs.m4:95: AC_PACKAGE_NEED_XFSCTL_MACRO is expanded from...
configure.ac:50: the top level
configure.ac:63: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:63: You should run autoupdate.
./lib/autoconf/general.m4:2920: AC_TRY_LINK is expanded from...
acinclude.m4:19: AC_PACKAGE_WANT_FALLOCATE is expanded from...
configure.ac:63: the top level
configure.ac:64: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:64: You should run autoupdate.
./lib/autoconf/general.m4:2920: AC_TRY_LINK is expanded from...
acinclude.m4:32: AC_PACKAGE_WANT_OPEN_BY_HANDLE_AT is expanded from...
configure.ac:64: the top level
configure.ac:69: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:69: You should run autoupdate.
./lib/autoconf/general.m4:2920: AC_TRY_LINK is expanded from...
m4/package_libcdev.m4:106: AC_HAVE_COPY_FILE_RANGE is expanded from...
configure.ac:69: the top level
configure.ac:107: warning: The macro `AC_CONFIG_HEADER' is obsolete.
configure.ac:107: You should run autoupdate.
./lib/autoconf/status.m4:719: AC_CONFIG_HEADER is expanded from...
configure.ac:107: the top level
So, run autoupdate and then fix all the warnings.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
acinclude.m4 | 16 ++++-------
configure.ac | 9 +++----
m4/package_libcdev.m4 | 63 +++++++++++++++++++------------------------
m4/package_ncurses.m4 | 7 ++---
m4/package_xfslibs.m4 | 7 ++---
5 files changed, 41 insertions(+), 61 deletions(-)
diff --git a/acinclude.m4 b/acinclude.m4
index a605c01c..fd92f0d5 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -18,28 +18,22 @@ AC_DEFUN([AC_PACKAGE_WANT_LINUX_FS_H],
AC_DEFUN([AC_PACKAGE_WANT_FALLOCATE],
[ AC_MSG_CHECKING([for fallocate])
- AC_TRY_LINK([
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#define _GNU_SOURCE
#define _FILE_OFFSET_BITS 64
#include <fcntl.h>
-#include <linux/falloc.h> ],
- [ fallocate(0, 0, 0, 0); ],
- [ have_fallocate=true; AC_MSG_RESULT(yes) ],
- [ have_fallocate=false; 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)
])
AC_DEFUN([AC_PACKAGE_WANT_OPEN_BY_HANDLE_AT],
[ AC_MSG_CHECKING([for open_by_handle_at])
- AC_TRY_LINK([
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#define _GNU_SOURCE
#include <fcntl.h>
- ],
- [
+ ]], [[
struct file_handle fh;
open_by_handle_at(0, &fh, 0);
- ],
- [ have_open_by_handle_at=true; AC_MSG_RESULT(yes) ],
- [ have_open_by_handle_at=false; AC_MSG_RESULT(no) ])
+ ]])],[ have_open_by_handle_at=true; AC_MSG_RESULT(yes) ],[ have_open_by_handle_at=false; AC_MSG_RESULT(no) ])
AC_SUBST(have_open_by_handle_at)
])
diff --git a/configure.ac b/configure.ac
index 6e5ab397..cbf83779 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,12 +1,11 @@
-AC_INIT([xfstests], [1.1.1])
+AC_INIT([xfstests],[1.1.2])
AC_CONFIG_MACRO_DIR([m4])
LT_INIT
AC_CONFIG_SRCDIR([src/xfsctl.c])
AC_PACKAGE_GLOBALS(xfstests)
AC_PACKAGE_UTILITIES(xfstests)
-AC_HEADER_STDC
- AC_CHECK_HEADERS([ assert.h \
+AC_CHECK_HEADERS([ assert.h \
bstring.h \
libgen.h \
dirent.h \
@@ -34,7 +33,7 @@ AC_HEADER_STDC
btrfs/ioctl.h \
cifs/ioctl.h \
sys/mman.h \
- ])
+])
AC_CHECK_HEADERS([xfs/xfs_log_format.h],,,[
#define _GNU_SOURCE
@@ -104,6 +103,6 @@ AC_CHECK_MEMBERS([struct btrfs_ioctl_vol_args_v2.subvolid], [], [], [[
#include <linux/btrfs.h>
]])
-AC_CONFIG_HEADER(include/config.h)
+AC_CONFIG_HEADERS([include/config.h])
AC_CONFIG_FILES([include/builddefs])
AC_OUTPUT
diff --git a/m4/package_libcdev.m4 b/m4/package_libcdev.m4
index 14e67e18..5c76c0f7 100644
--- a/m4/package_libcdev.m4
+++ b/m4/package_libcdev.m4
@@ -3,15 +3,14 @@
#
AC_DEFUN([AC_HAVE_FADVISE],
[ AC_MSG_CHECKING([for fadvise ])
- AC_TRY_COMPILE([
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#define _GNU_SOURCE
#define _FILE_OFFSET_BITS 64
#include <fcntl.h>
- ], [
+ ]], [[
posix_fadvise(0, 1, 0, POSIX_FADV_NORMAL);
- ], have_fadvise=yes
- AC_MSG_RESULT(yes),
- AC_MSG_RESULT(no))
+ ]])],[have_fadvise=yes
+ AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
AC_SUBST(have_fadvise)
])
@@ -20,15 +19,14 @@ AC_DEFUN([AC_HAVE_FADVISE],
#
AC_DEFUN([AC_HAVE_MADVISE],
[ AC_MSG_CHECKING([for madvise ])
- AC_TRY_COMPILE([
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#define _GNU_SOURCE
#define _FILE_OFFSET_BITS 64
#include <sys/mman.h>
- ], [
+ ]], [[
posix_madvise(0, 0, MADV_NORMAL);
- ], have_madvise=yes
- AC_MSG_RESULT(yes),
- AC_MSG_RESULT(no))
+ ]])],[have_madvise=yes
+ AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
AC_SUBST(have_madvise)
])
@@ -37,15 +35,14 @@ AC_DEFUN([AC_HAVE_MADVISE],
#
AC_DEFUN([AC_HAVE_MINCORE],
[ AC_MSG_CHECKING([for mincore ])
- AC_TRY_COMPILE([
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#define _GNU_SOURCE
#define _FILE_OFFSET_BITS 64
#include <sys/mman.h>
- ], [
+ ]], [[
mincore(0, 0, 0);
- ], have_mincore=yes
- AC_MSG_RESULT(yes),
- AC_MSG_RESULT(no))
+ ]])],[have_mincore=yes
+ AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
AC_SUBST(have_mincore)
])
@@ -54,15 +51,14 @@ AC_DEFUN([AC_HAVE_MINCORE],
#
AC_DEFUN([AC_HAVE_SENDFILE],
[ AC_MSG_CHECKING([for sendfile ])
- AC_TRY_COMPILE([
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#define _GNU_SOURCE
#define _FILE_OFFSET_BITS 64
#include <sys/sendfile.h>
- ], [
+ ]], [[
sendfile(0, 0, 0, 0);
- ], have_sendfile=yes
- AC_MSG_RESULT(yes),
- AC_MSG_RESULT(no))
+ ]])],[have_sendfile=yes
+ AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
AC_SUBST(have_sendfile)
])
@@ -71,14 +67,13 @@ AC_DEFUN([AC_HAVE_SENDFILE],
#
AC_DEFUN([AC_HAVE_GETMNTENT],
[ AC_MSG_CHECKING([for getmntent ])
- AC_TRY_COMPILE([
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <stdio.h>
#include <mntent.h>
- ], [
+ ]], [[
getmntent(0);
- ], have_getmntent=yes
- AC_MSG_RESULT(yes),
- AC_MSG_RESULT(no))
+ ]])],[have_getmntent=yes
+ AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
AC_SUBST(have_getmntent)
])
@@ -87,15 +82,14 @@ AC_DEFUN([AC_HAVE_GETMNTENT],
#
AC_DEFUN([AC_HAVE_GETMNTINFO],
[ AC_MSG_CHECKING([for getmntinfo ])
- AC_TRY_COMPILE([
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <sys/param.h>
#include <sys/ucred.h>
#include <sys/mount.h>
- ], [
+ ]], [[
getmntinfo(0, 0);
- ], have_getmntinfo=yes
- AC_MSG_RESULT(yes),
- AC_MSG_RESULT(no))
+ ]])],[have_getmntinfo=yes
+ AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
AC_SUBST(have_getmntinfo)
])
@@ -105,15 +99,14 @@ AC_DEFUN([AC_HAVE_GETMNTINFO],
#
AC_DEFUN([AC_HAVE_COPY_FILE_RANGE],
[ AC_MSG_CHECKING([for copy_file_range])
- AC_TRY_LINK([
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#define _GNU_SOURCE
#include <sys/syscall.h>
#include <unistd.h>
- ], [
+ ]], [[
syscall(__NR_copy_file_range, 0, 0, 0, 0, 0, 0);
- ], have_copy_file_range=yes
- AC_MSG_RESULT(yes),
- AC_MSG_RESULT(no))
+ ]])],[have_copy_file_range=yes
+ AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
AC_SUBST(have_copy_file_range)
])
diff --git a/m4/package_ncurses.m4 b/m4/package_ncurses.m4
index 83a2c382..b220dd64 100644
--- a/m4/package_ncurses.m4
+++ b/m4/package_ncurses.m4
@@ -19,12 +19,9 @@ AC_DEFUN([AC_PACKAGE_WANT_WORKING_LIBNCURSES],
libcurses="-lncurses"
LIBS="$LIBS $libcurses"
CFLAGS="$CFLAGS -D_GNU_SOURCE"
- AC_TRY_LINK([
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <ncurses.h>
-#include <signal.h>],
- [wgetch(stdscr);],
- [enable_curses=yes; AC_MSG_RESULT([ok])],
- [enable_curses=no; libcurses=""; AC_MSG_RESULT([disabling curses])])
+#include <signal.h>]], [[wgetch(stdscr);]])],[enable_curses=yes; AC_MSG_RESULT([ok])],[enable_curses=no; libcurses=""; AC_MSG_RESULT([disabling curses])])
AC_SUBST(enable_curses)
AC_SUBST(libcurses)
])
diff --git a/m4/package_xfslibs.m4 b/m4/package_xfslibs.m4
index 9be56e11..0746cd1d 100644
--- a/m4/package_xfslibs.m4
+++ b/m4/package_xfslibs.m4
@@ -94,13 +94,10 @@ AC_DEFUN([AC_PACKAGE_NEED_ATTRLIST_LIBHANDLE],
AC_DEFUN([AC_PACKAGE_NEED_XFSCTL_MACRO],
[ AC_MSG_CHECKING([xfsctl from xfs/xfs.h])
- AC_TRY_LINK([
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#define _GNU_SOURCE
#define _FILE_OFFSET_BITS 64
-#include <xfs/xfs.h> ],
- [ int x = xfsctl(0, 0, 0, 0); ],
- [ echo ok ],
- [ echo
+#include <xfs/xfs.h> ]], [[ int x = xfsctl(0, 0, 0, 0); ]])],[ echo ok ],[ echo
echo 'FATAL ERROR: cannot find required macros in the XFS headers.'
echo 'Upgrade your XFS programs (xfsprogs) development package.'
echo 'Alternatively, run "make install-dev" from the xfsprogs source.'
--
2.33.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] fstests: groupfile generation needs force overwrite
2021-10-10 23:06 fstests: fix build issues Dave Chinner
2021-10-10 23:06 ` [PATCH 1/2] fstests: autoconf has deprecated a bunch of macros Dave Chinner
@ 2021-10-10 23:06 ` Dave Chinner
2021-10-11 16:36 ` Darrick J. Wong
1 sibling, 1 reply; 5+ messages in thread
From: Dave Chinner @ 2021-10-10 23:06 UTC (permalink / raw)
To: fstests
From: Dave Chinner <dchinner@redhat.com>
Having built fstests as root as part of a run script, I get failures
then trying to run it as a user because of the group list
generation. The issue occurs because the group list files are owned
by root, and so I get an interactive prompt to overwrite them such
as:
Building btrfs
[GROUP] /home/dave/src/xfstests-dev/tests/btrfs/group.list
mv: replace 'group.list', overriding mode 0644 (rw-r--r--)? y
Building ceph
[GROUP] /home/dave/src/xfstests-dev/tests/ceph/group.list
mv: replace 'group.list', overriding mode 0644 (rw-r--r--)? y
Building cifs
[GROUP] /home/dave/src/xfstests-dev/tests/cifs/group.list
mv: replace 'group.list', overriding mode 0644 (rw-r--r--)? y
Building ext4
[GROUP] /home/dave/src/xfstests-dev/tests/ext4/group.list
...
Use 'mv -f' to ignore such trivial issues so that the new group
lists are written correctly.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
tools/mkgroupfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/mkgroupfile b/tools/mkgroupfile
index 634ec92c..3844e57d 100755
--- a/tools/mkgroupfile
+++ b/tools/mkgroupfile
@@ -24,7 +24,7 @@ cleanup() {
test -z "$ngroupfile" && return
if [ $ret -eq 0 ]; then
- mv "$ngroupfile" "$groupfile"
+ mv -f "$ngroupfile" "$groupfile"
else
rm -f "$ngroupfile"
fi
--
2.33.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] fstests: groupfile generation needs force overwrite
2021-10-10 23:06 ` [PATCH 2/2] fstests: groupfile generation needs force overwrite Dave Chinner
@ 2021-10-11 16:36 ` Darrick J. Wong
0 siblings, 0 replies; 5+ messages in thread
From: Darrick J. Wong @ 2021-10-11 16:36 UTC (permalink / raw)
To: Dave Chinner; +Cc: fstests
On Mon, Oct 11, 2021 at 10:06:59AM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
>
> Having built fstests as root as part of a run script, I get failures
> then trying to run it as a user because of the group list
> generation. The issue occurs because the group list files are owned
> by root, and so I get an interactive prompt to overwrite them such
> as:
>
> Building btrfs
> [GROUP] /home/dave/src/xfstests-dev/tests/btrfs/group.list
> mv: replace 'group.list', overriding mode 0644 (rw-r--r--)? y
> Building ceph
> [GROUP] /home/dave/src/xfstests-dev/tests/ceph/group.list
> mv: replace 'group.list', overriding mode 0644 (rw-r--r--)? y
> Building cifs
> [GROUP] /home/dave/src/xfstests-dev/tests/cifs/group.list
> mv: replace 'group.list', overriding mode 0644 (rw-r--r--)? y
> Building ext4
> [GROUP] /home/dave/src/xfstests-dev/tests/ext4/group.list
> ...
>
> Use 'mv -f' to ignore such trivial issues so that the new group
> lists are written correctly.
>
> Signed-off-by: Dave Chinner <dchinner@redhat.com>
Oops, sorry I didn't catch this.
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
--D
> ---
> tools/mkgroupfile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/mkgroupfile b/tools/mkgroupfile
> index 634ec92c..3844e57d 100755
> --- a/tools/mkgroupfile
> +++ b/tools/mkgroupfile
> @@ -24,7 +24,7 @@ cleanup() {
> test -z "$ngroupfile" && return
>
> if [ $ret -eq 0 ]; then
> - mv "$ngroupfile" "$groupfile"
> + mv -f "$ngroupfile" "$groupfile"
> else
> rm -f "$ngroupfile"
> fi
> --
> 2.33.0
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] fstests: autoconf has deprecated a bunch of macros
2021-10-10 23:06 ` [PATCH 1/2] fstests: autoconf has deprecated a bunch of macros Dave Chinner
@ 2021-10-11 16:53 ` Darrick J. Wong
0 siblings, 0 replies; 5+ messages in thread
From: Darrick J. Wong @ 2021-10-11 16:53 UTC (permalink / raw)
To: Dave Chinner; +Cc: fstests
On Mon, Oct 11, 2021 at 10:06:58AM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
>
> Latest debian unstable environment results in these build warnings:
>
> autoconf
> configure.ac:8: warning: The macro `AC_HEADER_STDC' is obsolete.
> configure.ac:8: You should run autoupdate.
> ./lib/autoconf/headers.m4:704: AC_HEADER_STDC is expanded from...
> configure.ac:8: the top level
> configure.ac:50: warning: The macro `AC_TRY_LINK' is obsolete.
> configure.ac:50: You should run autoupdate.
> ./lib/autoconf/general.m4:2920: AC_TRY_LINK is expanded from...
> m4/package_xfslibs.m4:95: AC_PACKAGE_NEED_XFSCTL_MACRO is expanded from...
> configure.ac:50: the top level
> configure.ac:63: warning: The macro `AC_TRY_LINK' is obsolete.
> configure.ac:63: You should run autoupdate.
> ./lib/autoconf/general.m4:2920: AC_TRY_LINK is expanded from...
> acinclude.m4:19: AC_PACKAGE_WANT_FALLOCATE is expanded from...
> configure.ac:63: the top level
> configure.ac:64: warning: The macro `AC_TRY_LINK' is obsolete.
> configure.ac:64: You should run autoupdate.
> ./lib/autoconf/general.m4:2920: AC_TRY_LINK is expanded from...
> acinclude.m4:32: AC_PACKAGE_WANT_OPEN_BY_HANDLE_AT is expanded from...
> configure.ac:64: the top level
> configure.ac:69: warning: The macro `AC_TRY_LINK' is obsolete.
> configure.ac:69: You should run autoupdate.
> ./lib/autoconf/general.m4:2920: AC_TRY_LINK is expanded from...
> m4/package_libcdev.m4:106: AC_HAVE_COPY_FILE_RANGE is expanded from...
> configure.ac:69: the top level
> configure.ac:107: warning: The macro `AC_CONFIG_HEADER' is obsolete.
> configure.ac:107: You should run autoupdate.
> ./lib/autoconf/status.m4:719: AC_CONFIG_HEADER is expanded from...
> configure.ac:107: the top level
>
> So, run autoupdate and then fix all the warnings.
>
> Signed-off-by: Dave Chinner <dchinner@redhat.com>
Much as I hate autoconf, this actually does look correct now that I've
sifted through the latest documentation. Surprisingly it even works on
Ubuntu 20.04...
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
--D
> ---
> acinclude.m4 | 16 ++++-------
> configure.ac | 9 +++----
> m4/package_libcdev.m4 | 63 +++++++++++++++++++------------------------
> m4/package_ncurses.m4 | 7 ++---
> m4/package_xfslibs.m4 | 7 ++---
> 5 files changed, 41 insertions(+), 61 deletions(-)
>
> diff --git a/acinclude.m4 b/acinclude.m4
> index a605c01c..fd92f0d5 100644
> --- a/acinclude.m4
> +++ b/acinclude.m4
> @@ -18,28 +18,22 @@ AC_DEFUN([AC_PACKAGE_WANT_LINUX_FS_H],
>
> AC_DEFUN([AC_PACKAGE_WANT_FALLOCATE],
> [ AC_MSG_CHECKING([for fallocate])
> - AC_TRY_LINK([
> + AC_LINK_IFELSE([AC_LANG_PROGRAM([[
> #define _GNU_SOURCE
> #define _FILE_OFFSET_BITS 64
> #include <fcntl.h>
> -#include <linux/falloc.h> ],
> - [ fallocate(0, 0, 0, 0); ],
> - [ have_fallocate=true; AC_MSG_RESULT(yes) ],
> - [ have_fallocate=false; 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)
> ])
>
> AC_DEFUN([AC_PACKAGE_WANT_OPEN_BY_HANDLE_AT],
> [ AC_MSG_CHECKING([for open_by_handle_at])
> - AC_TRY_LINK([
> + AC_LINK_IFELSE([AC_LANG_PROGRAM([[
> #define _GNU_SOURCE
> #include <fcntl.h>
> - ],
> - [
> + ]], [[
> struct file_handle fh;
> open_by_handle_at(0, &fh, 0);
> - ],
> - [ have_open_by_handle_at=true; AC_MSG_RESULT(yes) ],
> - [ have_open_by_handle_at=false; AC_MSG_RESULT(no) ])
> + ]])],[ have_open_by_handle_at=true; AC_MSG_RESULT(yes) ],[ have_open_by_handle_at=false; AC_MSG_RESULT(no) ])
> AC_SUBST(have_open_by_handle_at)
> ])
> diff --git a/configure.ac b/configure.ac
> index 6e5ab397..cbf83779 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1,12 +1,11 @@
> -AC_INIT([xfstests], [1.1.1])
> +AC_INIT([xfstests],[1.1.2])
> AC_CONFIG_MACRO_DIR([m4])
> LT_INIT
> AC_CONFIG_SRCDIR([src/xfsctl.c])
> AC_PACKAGE_GLOBALS(xfstests)
> AC_PACKAGE_UTILITIES(xfstests)
>
> -AC_HEADER_STDC
> - AC_CHECK_HEADERS([ assert.h \
> +AC_CHECK_HEADERS([ assert.h \
> bstring.h \
> libgen.h \
> dirent.h \
> @@ -34,7 +33,7 @@ AC_HEADER_STDC
> btrfs/ioctl.h \
> cifs/ioctl.h \
> sys/mman.h \
> - ])
> +])
>
> AC_CHECK_HEADERS([xfs/xfs_log_format.h],,,[
> #define _GNU_SOURCE
> @@ -104,6 +103,6 @@ AC_CHECK_MEMBERS([struct btrfs_ioctl_vol_args_v2.subvolid], [], [], [[
> #include <linux/btrfs.h>
> ]])
>
> -AC_CONFIG_HEADER(include/config.h)
> +AC_CONFIG_HEADERS([include/config.h])
> AC_CONFIG_FILES([include/builddefs])
> AC_OUTPUT
> diff --git a/m4/package_libcdev.m4 b/m4/package_libcdev.m4
> index 14e67e18..5c76c0f7 100644
> --- a/m4/package_libcdev.m4
> +++ b/m4/package_libcdev.m4
> @@ -3,15 +3,14 @@
> #
> AC_DEFUN([AC_HAVE_FADVISE],
> [ AC_MSG_CHECKING([for fadvise ])
> - AC_TRY_COMPILE([
> + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
> #define _GNU_SOURCE
> #define _FILE_OFFSET_BITS 64
> #include <fcntl.h>
> - ], [
> + ]], [[
> posix_fadvise(0, 1, 0, POSIX_FADV_NORMAL);
> - ], have_fadvise=yes
> - AC_MSG_RESULT(yes),
> - AC_MSG_RESULT(no))
> + ]])],[have_fadvise=yes
> + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
> AC_SUBST(have_fadvise)
> ])
>
> @@ -20,15 +19,14 @@ AC_DEFUN([AC_HAVE_FADVISE],
> #
> AC_DEFUN([AC_HAVE_MADVISE],
> [ AC_MSG_CHECKING([for madvise ])
> - AC_TRY_COMPILE([
> + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
> #define _GNU_SOURCE
> #define _FILE_OFFSET_BITS 64
> #include <sys/mman.h>
> - ], [
> + ]], [[
> posix_madvise(0, 0, MADV_NORMAL);
> - ], have_madvise=yes
> - AC_MSG_RESULT(yes),
> - AC_MSG_RESULT(no))
> + ]])],[have_madvise=yes
> + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
> AC_SUBST(have_madvise)
> ])
>
> @@ -37,15 +35,14 @@ AC_DEFUN([AC_HAVE_MADVISE],
> #
> AC_DEFUN([AC_HAVE_MINCORE],
> [ AC_MSG_CHECKING([for mincore ])
> - AC_TRY_COMPILE([
> + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
> #define _GNU_SOURCE
> #define _FILE_OFFSET_BITS 64
> #include <sys/mman.h>
> - ], [
> + ]], [[
> mincore(0, 0, 0);
> - ], have_mincore=yes
> - AC_MSG_RESULT(yes),
> - AC_MSG_RESULT(no))
> + ]])],[have_mincore=yes
> + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
> AC_SUBST(have_mincore)
> ])
>
> @@ -54,15 +51,14 @@ AC_DEFUN([AC_HAVE_MINCORE],
> #
> AC_DEFUN([AC_HAVE_SENDFILE],
> [ AC_MSG_CHECKING([for sendfile ])
> - AC_TRY_COMPILE([
> + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
> #define _GNU_SOURCE
> #define _FILE_OFFSET_BITS 64
> #include <sys/sendfile.h>
> - ], [
> + ]], [[
> sendfile(0, 0, 0, 0);
> - ], have_sendfile=yes
> - AC_MSG_RESULT(yes),
> - AC_MSG_RESULT(no))
> + ]])],[have_sendfile=yes
> + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
> AC_SUBST(have_sendfile)
> ])
>
> @@ -71,14 +67,13 @@ AC_DEFUN([AC_HAVE_SENDFILE],
> #
> AC_DEFUN([AC_HAVE_GETMNTENT],
> [ AC_MSG_CHECKING([for getmntent ])
> - AC_TRY_COMPILE([
> + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
> #include <stdio.h>
> #include <mntent.h>
> - ], [
> + ]], [[
> getmntent(0);
> - ], have_getmntent=yes
> - AC_MSG_RESULT(yes),
> - AC_MSG_RESULT(no))
> + ]])],[have_getmntent=yes
> + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
> AC_SUBST(have_getmntent)
> ])
>
> @@ -87,15 +82,14 @@ AC_DEFUN([AC_HAVE_GETMNTENT],
> #
> AC_DEFUN([AC_HAVE_GETMNTINFO],
> [ AC_MSG_CHECKING([for getmntinfo ])
> - AC_TRY_COMPILE([
> + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
> #include <sys/param.h>
> #include <sys/ucred.h>
> #include <sys/mount.h>
> - ], [
> + ]], [[
> getmntinfo(0, 0);
> - ], have_getmntinfo=yes
> - AC_MSG_RESULT(yes),
> - AC_MSG_RESULT(no))
> + ]])],[have_getmntinfo=yes
> + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
> AC_SUBST(have_getmntinfo)
> ])
>
> @@ -105,15 +99,14 @@ AC_DEFUN([AC_HAVE_GETMNTINFO],
> #
> AC_DEFUN([AC_HAVE_COPY_FILE_RANGE],
> [ AC_MSG_CHECKING([for copy_file_range])
> - AC_TRY_LINK([
> + AC_LINK_IFELSE([AC_LANG_PROGRAM([[
> #define _GNU_SOURCE
> #include <sys/syscall.h>
> #include <unistd.h>
> - ], [
> + ]], [[
> syscall(__NR_copy_file_range, 0, 0, 0, 0, 0, 0);
> - ], have_copy_file_range=yes
> - AC_MSG_RESULT(yes),
> - AC_MSG_RESULT(no))
> + ]])],[have_copy_file_range=yes
> + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
> AC_SUBST(have_copy_file_range)
> ])
>
> diff --git a/m4/package_ncurses.m4 b/m4/package_ncurses.m4
> index 83a2c382..b220dd64 100644
> --- a/m4/package_ncurses.m4
> +++ b/m4/package_ncurses.m4
> @@ -19,12 +19,9 @@ AC_DEFUN([AC_PACKAGE_WANT_WORKING_LIBNCURSES],
> libcurses="-lncurses"
> LIBS="$LIBS $libcurses"
> CFLAGS="$CFLAGS -D_GNU_SOURCE"
> - AC_TRY_LINK([
> + AC_LINK_IFELSE([AC_LANG_PROGRAM([[
> #include <ncurses.h>
> -#include <signal.h>],
> - [wgetch(stdscr);],
> - [enable_curses=yes; AC_MSG_RESULT([ok])],
> - [enable_curses=no; libcurses=""; AC_MSG_RESULT([disabling curses])])
> +#include <signal.h>]], [[wgetch(stdscr);]])],[enable_curses=yes; AC_MSG_RESULT([ok])],[enable_curses=no; libcurses=""; AC_MSG_RESULT([disabling curses])])
> AC_SUBST(enable_curses)
> AC_SUBST(libcurses)
> ])
> diff --git a/m4/package_xfslibs.m4 b/m4/package_xfslibs.m4
> index 9be56e11..0746cd1d 100644
> --- a/m4/package_xfslibs.m4
> +++ b/m4/package_xfslibs.m4
> @@ -94,13 +94,10 @@ AC_DEFUN([AC_PACKAGE_NEED_ATTRLIST_LIBHANDLE],
>
> AC_DEFUN([AC_PACKAGE_NEED_XFSCTL_MACRO],
> [ AC_MSG_CHECKING([xfsctl from xfs/xfs.h])
> - AC_TRY_LINK([
> + AC_LINK_IFELSE([AC_LANG_PROGRAM([[
> #define _GNU_SOURCE
> #define _FILE_OFFSET_BITS 64
> -#include <xfs/xfs.h> ],
> - [ int x = xfsctl(0, 0, 0, 0); ],
> - [ echo ok ],
> - [ echo
> +#include <xfs/xfs.h> ]], [[ int x = xfsctl(0, 0, 0, 0); ]])],[ echo ok ],[ echo
> echo 'FATAL ERROR: cannot find required macros in the XFS headers.'
> echo 'Upgrade your XFS programs (xfsprogs) development package.'
> echo 'Alternatively, run "make install-dev" from the xfsprogs source.'
> --
> 2.33.0
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-10-11 16:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-10 23:06 fstests: fix build issues Dave Chinner
2021-10-10 23:06 ` [PATCH 1/2] fstests: autoconf has deprecated a bunch of macros Dave Chinner
2021-10-11 16:53 ` Darrick J. Wong
2021-10-10 23:06 ` [PATCH 2/2] fstests: groupfile generation needs force overwrite Dave Chinner
2021-10-11 16:36 ` Darrick J. Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).