[RFC] ktest: update ndctl and xfstests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This makes them part of the root image.  I didn't see any existing code
for automatically installing these things.  There's no attempt to check
and magically install dependencies ... but I do skip rebuilding them if
they haven't been updated since last git pull.

diff --git a/root_image b/root_image
index 42f9293..6861949 100755
--- a/root_image
+++ b/root_image
@@ -195,12 +195,50 @@ ZZ
     sed -i s/$/-kvm/ "$MNT/etc/hostname"
 }
 
+update_git()
+{
+    if [ -d $1 ]; then
+	cd $1
+	git fetch
+	if cmp -n40 -s .git/FETCH_HEAD .git/refs/heads/master; then
+	    cd ..
+	    exit 0;
+	fi
+	git merge FETCH_HEAD
+    else
+	git clone $2
+	cd $1
+    fi
+    case $1 in
+	ndctl)
+	    ./autogen.sh
+	    ./configure CFLAGS='-g -O2' --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib
+	    ;;
+    esac
+    make
+    make DESTDIR=$MNT install
+    case $1 in
+	xfstests-dev)
+# need to make these not fail if the user already exists -- help?
+#	    _chroot "$MNT" useradd fsgqa
+#	    _chroot "$MNT" groupadd fsgqa
+#	    _chroot "$MNT" useradd 123456-fsgqa
+	    ;;
+    esac
+    cd ..
+}
+
 update_packages()
 {
     _chroot "$MNT" apt update
     _chroot "$MNT" apt upgrade -y
     _chroot "$MNT" apt install -y "${PACKAGES[@]}"
     rm -f "$MNT/var/cache/apt/archives/*.deb"
+
+    # ndctl is not yet available as a Debian package
+    update_git ndctl https://github.com/pmem/ndctl.git
+    # we want the latest version of xfstests from git
+    update_git xfstests-dev
 }
 
 trim_image()



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux