From patchwork Fri Aug 9 15:58:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Sandeen X-Patchwork-Id: 2842000 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 955229F295 for ; Fri, 9 Aug 2013 15:58:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C2FE5202B9 for ; Fri, 9 Aug 2013 15:58:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2E42F201FA for ; Fri, 9 Aug 2013 15:58:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964814Ab3HIP6c (ORCPT ); Fri, 9 Aug 2013 11:58:32 -0400 Received: from sandeen.net ([63.231.237.45]:38401 "EHLO sandeen.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934068Ab3HIP6b (ORCPT ); Fri, 9 Aug 2013 11:58:31 -0400 Received: from Liberator.local (c-98-240-249-49.hsd1.mn.comcast.net [98.240.249.49]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTPSA id C90376826303; Fri, 9 Aug 2013 10:58:29 -0500 (CDT) Message-ID: <520511A4.1070302@sandeen.net> Date: Fri, 09 Aug 2013 10:58:28 -0500 From: Eric Sandeen User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: Jan Schmidt CC: xfs@oss.sgi.com, sbehrens@giantdisaster.de, linux-btrfs@vger.kernel.org Subject: Re: [PATCH v3 0/2] xfstest btrfs/316: test send / receive References: <1375949833-1104-1-git-send-email-list.xfs@jan-o-sch.net> In-Reply-To: <1375949833-1104-1-git-send-email-list.xfs@jan-o-sch.net> X-Enigmail-Version: 1.5.2 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 8/8/13 3:17 AM, Jan Schmidt wrote: > These two patches add the announced tests for btrfs send / receive. As > requested, the fssum tool is now included. > > One drawback is that I'm unable to edit configure.ac or whatever needs > to be modified in an autotools preferred way. Any hints appreciated, > preferrably hints containing all the modifications required to introduce > something like HAVE_SEEK_HOLE. Here's how I'd fix all that up. I guess the local defines are a little crummy but that's what's done everywhere else. After that, use the autoconf stuff to figure out if the ssl headers are available, and built fssum conditionally on that; libcrypto doesn't actually seem to be required? -Eric --- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/src/fssum.c b/src/fssum.c index ecddb6a..5d4433a 100644 --- a/src/fssum.c +++ b/src/fssum.c @@ -37,6 +37,11 @@ #include #include +#ifndef SEEK_DATA +#define SEEK_DATA 3 +#define SEEK_HOLE 4 +#endif + #define CS_SIZE 16 #define CHUNKS 128 diff --git a/aclocal.m4 b/aclocal.m4 index 5739004..f3412e1 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -44,6 +44,7 @@ m4_include([m4/package_attrdev.m4]) m4_include([m4/package_dmapidev.m4]) m4_include([m4/package_gdbmdev.m4]) m4_include([m4/package_globals.m4]) +m4_include([m4/package_ssldev.m4]) m4_include([m4/package_utilies.m4]) m4_include([m4/package_uuiddev.m4]) m4_include([m4/package_xfslibs.m4]) diff --git a/configure.ac b/configure.ac index bfae106..bd48fd9 100644 --- a/configure.ac +++ b/configure.ac @@ -70,6 +70,7 @@ in AC_PACKAGE_WANT_FALLOCATE AC_PACKAGE_WANT_LINUX_PRCTL_H AC_PACKAGE_WANT_LINUX_FS_H + AC_PACKAGE_WANT_SSL ;; esac diff --git a/include/builddefs.in b/include/builddefs.in index 6519c13..c899cfc 100644 --- a/include/builddefs.in +++ b/include/builddefs.in @@ -65,6 +65,7 @@ HAVE_DMAPI = @have_dmapi@ HAVE_ATTR_LIST = @have_attr_list@ HAVE_FIEMAP = @have_fiemap@ HAVE_FALLOCATE = @have_fallocate@ +HAVE_SSL = @have_ssl@ GCCFLAGS = -funsigned-char -fno-strict-aliasing -Wall diff --git a/m4/Makefile b/m4/Makefile index 6c1d0e4..7c2ecdd 100644 --- a/m4/Makefile +++ b/m4/Makefile @@ -16,6 +16,7 @@ LSRCFILES = \ package_libcdev.m4 \ package_ncurses.m4 \ package_pthread.m4 \ + package_ssl.m4 \ package_types.m4 \ package_utilies.m4 \ package_uuiddev.m4 \ diff --git a/src/Makefile b/src/Makefile index 10a4d3c..228f5ff 100644 --- a/src/Makefile +++ b/src/Makefile @@ -20,14 +20,10 @@ LINUX_TARGETS = xfsctl bstat t_mtab getdevicesize preallo_rw_pattern_reader \ stale_handle pwrite_mmap_blocked t_dir_offset2 seek_sanity_test \ seek_copy_test t_readdir_1 t_readdir_2 fsync-tester -OPT_TARGETS = fssum - SUBDIRS = LLDLIBS = $(LIBATTR) $(LIBHANDLE) $(LIBACL) -OPT_LDLIBS = -lssl -lcrypto - ifeq ($(HAVE_XLOG_ASSIGN_LSN), true) LINUX_TARGETS += loggen endif @@ -40,6 +36,11 @@ ifeq ($(HAVE_FALLOCATE), true) LCFLAGS += -DHAVE_FALLOCATE endif +ifeq ($(HAVE_SSL), true) +LINUX_TARGETS += fssum +LLDLIBS += -lssl +endif + IRIX_TARGETS = open_unlink ifeq ($(PKG_PLATFORM),linux) @@ -64,7 +65,7 @@ CFILES = $(TARGETS:=.c) LDIRT = $(TARGETS) -default: depend $(TARGETS) $(OPT_TARGETS) $(SUBDIRS) +default: depend $(TARGETS) $(SUBDIRS) depend: .dep @@ -74,16 +75,11 @@ $(TARGETS): $(LIBTEST) @echo " [CC] $@" $(Q)$(LTLINK) $@.c -o $@ $(CFLAGS) $(LDFLAGS) $(LDLIBS) $(LIBTEST) -$(OPT_TARGETS): $(LIBTEST) - @echo " [CC] $@" - -$(Q)$(LTLINK) $@.c -o $@ $(CFLAGS) $(LDFLAGS) $(LDLIBS) $(OPT_LDLIBS) $(LIBTEST) - LINKTEST = $(LTLINK) $@.c -o $@ $(CFLAGS) $(LDFLAGS) install: default $(addsuffix -install,$(SUBDIRS)) $(INSTALL) -m 755 -d $(PKG_LIB_DIR)/src $(LTINSTALL) -m 755 $(TARGETS) $(PKG_LIB_DIR)/src - -$(LTINSTALL) -m 755 $(OPT_TARGETS) $(PKG_LIB_DIR)/src $(LTINSTALL) -m 755 fill2attr fill2fs fill2fs_check scaleread.sh $(PKG_LIB_DIR)/src $(LTINSTALL) -m 644 dumpfile $(PKG_LIB_DIR)/src