forked from tytso/xfstests-bld
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
85 lines (66 loc) · 3.55 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
The xfstests-bld package makes it easy to build xfstests in a hermetic
build environment (so it is not dependent on possibly out-of-date
distro versions of libaio, xfsprogs, etc.). It also contains scripts
which make it easy to run xfstests in a KVM guest. It is currently
optimized for ext4 testing, but it should be fairly simple to
generalize this for testing other file systems.
If you are using debian testing, it is pretty simple to generate your
own test appliance which uses kvm to run xfstests. If you are using a
different distribution, you can fetch a copy of root_fs.img from
https://www.kernel.org/pub/linux/kernel/people/tytso/kvm-xfstests.
Or you can take a look at the kvm-xfstests/test-appliance/gen-image
and create something which works for your distribution. Please let me
know if create something which works well for other distributions.
1. "make ; make tarball" to generate the xfstests.tar.gz file.
2. cd to kvm-xfstests/test-appliance, and run as root the shell script
"gen-image". This will create the root_fs.img file.
3. build a kernel which does not use modules (at least for all of the
device drivers required for running under kvm). There are sample
kernel configs found in the top-level kernel-configs directory.
Note that if you build a 32-bit i386 kernel, you will need to make
to build the root_fs.img file in 32-bit build chroot. You can use
a 32-bit userspace with a 64-bit kernel; in fact, this is a good
way to sanity check the ioctl compatibility code.
4. Adjust the KERNEL= line in kvm-xfstests/config to point at your
kernel's bzImage file.
5. cd to kvm-xfstests, and run "kvm-xfstests smoke". More details of
how to run kvm-xfstests can be found in kvm-xfstests/README. If
you adjust the DIR= line in kvm-xfstests, it will not be
necessary to be cd'ed into the kvm-xfstests directory before
kicking off the shell script.
When the kvm-xfstests is done, it will print a summary of which tests
passed and failed. It will also save the output of the test in a
log.YYYYMMDDHHSS file. The "get-results" script will parse the log
file and generate the test summary.
Instructions for building a 32-bit test-appliance image in a chroot
-------------------------------------------------------------------
These instructions assumes you are using Debian; it should probably
work for Ubuntu as well.
If you want to build a 64-bit test image, just remove the --arch=i386
in step #3, or if you don't want to use a build-chroot, you should be
able to just use the "./do-all" script all by itself --- or you can
use the manual instructions described in steps #1 and #2 above.
1) Install the necessary packages to build host OS
# sudo apt-get install schroot debootstrap
2) Add the following to /etc/schroot.conf, replacing "tytso" with your
username, and /u1/jessie-root with path where you plan to put your
build chroot
[jessie]
description=Debian jessie
type=directory
directory=/u1/jessie-root
users=tytso,root
root-users=tytso
3) Create the build chroot (again, replace /u1/jessie-root with the
pathname to your build chroot directory):
# cd /u1
# debootstrap --arch=i386 jessie /u1/jessie-root
# schroot -c jessie -u root
(jessie)root@closure:/u1# apt-get install build-essential autoconf autoconf2.64 automake libgdbm-dev libtool-bin qemu-utils gettext e2fslibs-dev git debootstrap
(jessie)root@closure:/u1# exit
4) Copy config to config.custom, and then change the lines which
define SUDO_ENV and BUILD_ENV to:
SUDO_ENV="schroot -c jessie -u root --"
BUILD_ENV="schroot -c jessie --"
5) Kick off the build!
./do-all