diff mbox

[3/3] android-xfstests: move ROOT_FS and ROOT_FS_URL into config.android

Message ID 20170417213327.36520-3-ebiggers3@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Eric Biggers April 17, 2017, 9:33 p.m. UTC
From: Eric Biggers <ebiggers@google.com>

This allows them to be overridden by ~/.config/android-xfstests.  Also
start treating an empty ROOT_FS_URL as meaning that no URL is provided.

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 Documentation/android-xfstests.md | 3 ++-
 kvm-xfstests/android-xfstests     | 9 +++------
 kvm-xfstests/config.android       | 6 ++++++
 3 files changed, 11 insertions(+), 7 deletions(-)

Comments

Theodore Ts'o April 21, 2017, 5:57 a.m. UTC | #1
On Mon, Apr 17, 2017 at 02:33:27PM -0700, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
> 
> This allows them to be overridden by ~/.config/android-xfstests.  Also
> start treating an empty ROOT_FS_URL as meaning that no URL is provided.
> 
> Signed-off-by: Eric Biggers <ebiggers@google.com>

Thanks for the cleanup!  I've applied all three patches to my tree.

       	       		      	      	  - Ted
--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/Documentation/android-xfstests.md b/Documentation/android-xfstests.md
index b309c21..5b37f9e 100644
--- a/Documentation/android-xfstests.md
+++ b/Documentation/android-xfstests.md
@@ -39,7 +39,8 @@  devices.  If you encounter a problem, please submit a fix!
   [building-xfstests](building-xfstests.md).  Then, either put the
   chroot tarball in the default location of
   kvm-xfstests/test-appliance/armhf_root_fs.tar.gz, or specify it with
-  the -I option to android-xfstests.
+  ROOT_FS in your ~/.config/android-xfstests or the -I option to
+  android-xfstests.
 
 ## Procedure
 
diff --git a/kvm-xfstests/android-xfstests b/kvm-xfstests/android-xfstests
index 3489bc2..e33955e 100755
--- a/kvm-xfstests/android-xfstests
+++ b/kvm-xfstests/android-xfstests
@@ -10,12 +10,6 @@  fi
 
 . "$DIR/util/get-config"
 
-# Path to chroot tarball; can be overridden with -I
-ROOT_FS="$DIR/test-appliance/armhf_root_fs.tar.gz"
-
-# Where to download the tarball from (at user's request) if we don't have it
-ROOT_FS_URL="https://www.kernel.org/pub/linux/kernel/people/tytso/kvm-xfstests/armhf_root_fs.tar.gz"
-
 # Chroot directory on device.
 # Note: this will be wiped clean when deploying a new chroot tarball.
 CHROOT_DIR="/data/xfstests-chroot"
@@ -142,6 +136,9 @@  setup_chroot()
     if ! [ -f "$ROOT_FS" ]; then
 	echo "The xfstests chroot tarball does not exist:"
 	echo "        $ROOT_FS"
+	if [ -z "$ROOT_FS_URL" ]; then
+	    exit 1
+	fi
 	ask_yesno "Would you like to download the latest public tarball to that location?"
 	wget -O "$ROOT_FS" "$ROOT_FS_URL"
 	echo "Finished downloading chroot tarball."
diff --git a/kvm-xfstests/config.android b/kvm-xfstests/config.android
index 4b668f8..ed7098c 100644
--- a/kvm-xfstests/config.android
+++ b/kvm-xfstests/config.android
@@ -4,3 +4,9 @@ 
 # Variables set here may be overridden in ~/.config/android-xfstests
 #
 
+# Path to chroot tarball; this can also be set by the -I option
+ROOT_FS="$DIR/test-appliance/armhf_root_fs.tar.gz"
+
+# Where to download the tarball from (at user's request) if we don't have it.
+# If you want to disable this functionality, set this to an empty string.
+ROOT_FS_URL="https://www.kernel.org/pub/linux/kernel/people/tytso/kvm-xfstests/armhf_root_fs.tar.gz"