From patchwork Thu May 25 19:25:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 9749039 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C6D3D60209 for ; Thu, 25 May 2017 19:27:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B5AD4283BE for ; Thu, 25 May 2017 19:27:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A9006283C3; Thu, 25 May 2017 19:27:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CB91E283BE for ; Thu, 25 May 2017 19:27:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161350AbdEYT1N (ORCPT ); Thu, 25 May 2017 15:27:13 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:34331 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1036634AbdEYT1I (ORCPT ); Thu, 25 May 2017 15:27:08 -0400 Received: by mail-pf0-f194.google.com with SMTP id w69so41051791pfk.1 for ; Thu, 25 May 2017 12:27:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=KXgBWvEK+CpE/LB3udlocCaNDvnfccs6m5fyCj8Haoc=; b=AQYenDZd3rGk7Y18stt1nygex7Bd8ijWUCdkKpv+a254ZyD5eTaFjV4lHZMygf0/ru zkT/zmvc8KFwhA6y2wMWfm6muJktGAtMMj3Xd8958di7Fr6iJa2wjwWt1+NzN0YVSo+4 kcqzar+gDsU3jACP3B12M3J8mXj7AF/w3FUnQVgrNKUbRxRf1G+8Ty07VmSTZjnludTk yM4uGqwE02zcMNGt+Z6ACjlDWctn0QDJcFJN2KPt4cmafJY5536JB7g+DARiST8w2iTI kFVyv9M3cGh0PN8fOpVGafL3q4ABWnvQXu493IX6ewTlVO1Ru4aPyfIDTmo2BruGqtMB NUpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=KXgBWvEK+CpE/LB3udlocCaNDvnfccs6m5fyCj8Haoc=; b=pz5y1uXYqqLPid1TnNjLmeBma0oN0dV8GIX7Fpv0STQ31uGlm/r2/xHBczWzvwfsbH rWhFdvcoWNuqNNBHM1fDjFPNzjz6D2uLKYHrnNUewqPC+jLeFduaexVMdvKGULkjJzXW kttFEaG96wPLC11enWeui+hVyt6K8fFj1NEH9Js3AOFmC2Xhqrr/aIuyIQ/VkHVJZ3LC stfuuRx7EQQiuV5sEEPgJDQpBO63uZqTW15S6U3YajbghWJh+pBqnkARw1RmuQW0mRux 8cUXL7pV+n9Jjh0gbNIc0Z3EixBDEsWYX9VpiPQt3fKXlrgGD6GBfQyb9UgEr3X6n4FF 0G6w== X-Gm-Message-State: AODbwcD+b/ZIQ4Ll2DVTjGvFbRrYR+yqXRhHMfL5iBOzC9t4ZKlcMUPJ pFly4xe+3lVaPg== X-Received: by 10.84.225.17 with SMTP id t17mr52563457plj.92.1495740428085; Thu, 25 May 2017 12:27:08 -0700 (PDT) Received: from ebiggers-linuxstation.kir.corp.google.com ([100.66.174.81]) by smtp.gmail.com with ESMTPSA id f86sm14617917pfj.128.2017.05.25.12.27.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 25 May 2017 12:27:07 -0700 (PDT) From: Eric Biggers To: Theodore Ts'o Cc: fstests@vger.kernel.org, Eric Biggers Subject: [PATCH 7/7] xfstests-bld: optionally build keyctl Date: Thu, 25 May 2017 12:25:49 -0700 Message-Id: <20170525192549.138518-8-ebiggers3@gmail.com> X-Mailer: git-send-email 2.13.0.219.gdb65acc882-goog In-Reply-To: <20170525192549.138518-1-ebiggers3@gmail.com> References: <20170525192549.138518-1-ebiggers3@gmail.com> Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Eric Biggers Add support for optionally including the keyctl program in the xfstests tarball built by xfstests-bld. keyctl is used by the filesystem encryption tests. Although keyctl is already included in the test appliances, including it in the xfstests tarball can be useful in cases where the tarball is being used on its own, without being contained in a dedicated test appliance. Signed-off-by: Eric Biggers --- .gitignore | 1 + Documentation/building-xfstests.md | 4 ++++ Makefile | 1 + build-all | 28 ++++++++++++++++++++++++---- config | 5 +++++ get-all | 1 + 6 files changed, 36 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index db604f8..6831ef0 100644 --- a/.gitignore +++ b/.gitignore @@ -62,6 +62,7 @@ MAKELOG /e2fsprogs-libs/lib/blkid/blkid.h /e2fsprogs-libs/lib/uuid/uuid.h /fio/ +/keyutils/ /popt/.deps/ /popt/Doxyfile /popt/Makefile diff --git a/Documentation/building-xfstests.md b/Documentation/building-xfstests.md index 4ec3042..fc1c783 100644 --- a/Documentation/building-xfstests.md +++ b/Documentation/building-xfstests.md @@ -32,6 +32,10 @@ be free to make local changes or update it with "git pull" as desired. the fio tree have caused test regressions in the past, so it may be preferable to let things be as far as the fio repo is concerned.) +The build also supports some optional repositories which are only +included when their URLs are uncommented in the config file; see the +config file for a full list. + ## Installing the necessary packages to build xfstests In order to build xfstests, a number of prerequisite packages are diff --git a/Makefile b/Makefile index ced32b2..9d505f3 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ # REPOS = fio \ + keyutils \ quota \ stress-ng \ xfsprogs-dev \ diff --git a/build-all b/build-all index b41c51a..c3392ad 100755 --- a/build-all +++ b/build-all @@ -24,6 +24,7 @@ case "$CROSS_COMPILE" in SKIP_QUOTA=yes SKIP_FIO=yes SKIP_DBENCH=yes + SKIP_KEYUTILS=yes ;; esac @@ -43,13 +44,13 @@ function set_skip_all () { SKIP_XFSTESTS=yes SKIP_QUOTA=yes SKIP_KVM_UTILS=yes + SKIP_KEYUTILS=yes SKIP_STRESS_NG=yes } -if test ! -d stress-ng -then - SKIP_STRESS_NG=yes -fi +# Optional components +[ -d keyutils ] || SKIP_KEYUTILS=yes +[ -d stress-ng ] || SKIP_STRESS_NG=yes while [ "$1" != "" ]; do @@ -88,6 +89,10 @@ while [ "$1" != "" ]; do set_skip_all unset SKIP_FIO ;; + --keyutils-only) + set_skip_all + unset SKIP_KEYUTILS + ;; --quota-only) set_skip_all unset SKIP_QUOTA @@ -182,6 +187,21 @@ if test -z "$SKIP_AIO" ; then rm $DESTDIR/lib/libaio.so* fi +if test -z "$SKIP_KEYUTILS" ; then + build_start "keyutils" + (cd keyutils ; + ver=$(git describe --always --dirty); echo "keyutils $ver ($(git log -1 --pretty=%cD))" > ../keyutils.ver ; + + # For now we only care about keyctl, not libkeyutils. Therefore, specify + # NO_SOLIB=1 so that libkeyutils is only built as a static library. Then + # keyctl will be statically linked to it, and we won't have to install + # libkeyutils.so. + make $J NO_SOLIB=1 CFLAGS="$LCF" LDFLAGS="$EXEC_LDFLAGS" keyctl ; + + install -D -m 0755 keyctl $DESTDIR/bin/keyctl ; + ) +fi + if test -z "$SKIP_STRESS_NG" ; then build_start "stress-ng" mkdir -p $DESTDIR/lib diff --git a/config b/config index 0703829..5b21803 100644 --- a/config +++ b/config @@ -7,6 +7,11 @@ XFSPROGS_GIT=git://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git FIO_GIT=git://git.kernel.dk/fio.git QUOTA_GIT=git://git.kernel.org/pub/scm/utils/quota/quota-tools.git +# Optional repositories, uncomment only if needed +# +# KEYUTILS_GIT=git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git +# STRESS_NG_GIT=https://github.com/ColinIanKing/stress-ng + FIO_COMMIT=fio-2.19 QUOTA_COMMIT=e0b6335 XFSPROGS_COMMIT=v4.11.0-rc1 diff --git a/get-all b/get-all index bb1cd4c..45f6c57 100755 --- a/get-all +++ b/get-all @@ -107,6 +107,7 @@ setup_repo xfsprogs-dev XFSPROGS_GIT XFSPROGS_COMMIT true setup_repo xfstests-dev XFSTESTS_GIT XFSTESTS_COMMIT true # optional repositories +setup_repo keyutils KEYUTILS_GIT KEYUTILS_COMMIT false setup_repo stress-ng STRESS_NG_GIT STRESS_NG_COMMIT false # Make sure acl doesn't try regenerate these files because of the