Discussion:
XFS Tests for Btrfs
nick
2014-09-18 20:14:04 UTC
Permalink
Hey Fellow Btrfs Developers,
I am wondering how to run the xfs tests for btrfs as I tried to do it based on a link online
written I believe a few years ago. If someone can help me get set up for testing the btrfs
code using xfs tests that would be great. In addition afterwards I already build kernel 3.17
r5 release candidate and would be glad to run any times you need run to test single drive
config issues.
Thanks Nick
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Qu Wenruo
2014-09-19 01:08:37 UTC
Permalink
Hi,

Xfstests uses several environment variants to setup the test environmen=
t.
You can set it manually using export, or write them into local.conf in=20
xfstests directory.

These environment variants are mandatory:
TEST_DEV: device for normal tests, like all generic tests
TEST_DIR: where TEST_DEV is mounted to.

And somecommon optional environment variants:
SCRATCH_DEV: scratch device for some tests, if you want to test btrfs'=20
multi device related feature, you need
to set SCRATCH_DEV_POOL.
SCRATCH_DEV_POOL: a list for devices mainly for btrfs' muti-device=20
related test.
SCRATCH_MNT: where SCRATCH_DEV/SCRATCH_DEV_POOL is mounted to.

SCRATCH_DEV_POOL should not contain the TEST_DEV.

=46STYP: the filesystem type you want to test.
MKFS_OPTIONS: the mkfs time options. Useful to test mkfs time feature=20
like no-holes.
MOUNT_OPTIONS: the mount time options. Useful to test feature like comp=
ress.

So short guide on how to run xfstests:
1. download the xfstests source, better the git version

2. compile xfstests
make will do everything for you, except you lacks some headers or=20
dependency.
When that happens, follow your distribution's method to install them.

3. setup the environment variants
Manually or into the local.conf is both OK.

4. run tests
You can run all tests by ./check -g auto, or multiple/single test using=
=20
blob/testcase number like:
# ./check generic/311
# ./check btrfs/[0-9][0-9][0-9]

Thanks
Qu

-------- Original Message --------
Subject: XFS Tests for Btrfs
=46rom: nick <***@gmail.com>
To: <linux-***@vger.kernel.org>
Date: 2014=E5=B9=B409=E6=9C=8819=E6=97=A5 04:14
Post by nick
Hey Fellow Btrfs Developers,
I am wondering how to run the xfs tests for btrfs as I tried to do it=
based on a link online
Post by nick
written I believe a few years ago. If someone can help me get set up =
for testing the btrfs
Post by nick
code using xfs tests that would be great. In addition afterwards I al=
ready build kernel 3.17
Post by nick
r5 release candidate and would be glad to run any times you need run =
to test single drive
Post by nick
config issues.
Thanks Nick
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs=
" in
Post by nick
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" =
in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
nick
2014-09-19 01:17:36 UTC
Permalink
Hi,
=20
Xfstests uses several environment variants to setup the test environm=
ent.
You can set it manually using export, or write them into local.conf i=
n xfstests directory.
=20
TEST_DEV: device for normal tests, like all generic tests
TEST_DIR: where TEST_DEV is mounted to.
=20
SCRATCH_DEV: scratch device for some tests, if you want to test btrfs=
' multi device related feature, you need
to set SCRATCH_DEV_POOL.
SCRATCH_DEV_POOL: a list for devices mainly for btrfs' muti-device re=
lated test.
SCRATCH_MNT: where SCRATCH_DEV/SCRATCH_DEV_POOL is mounted to.
=20
SCRATCH_DEV_POOL should not contain the TEST_DEV.
=20
FSTYP: the filesystem type you want to test.
MKFS_OPTIONS: the mkfs time options. Useful to test mkfs time feature=
like no-holes.
MOUNT_OPTIONS: the mount time options. Useful to test feature like co=
mpress.
=20
1. download the xfstests source, better the git version
=20
2. compile xfstests
make will do everything for you, except you lacks some headers or dep=
endency.
When that happens, follow your distribution's method to install them.
=20
3. setup the environment variants
Manually or into the local.conf is both OK.
=20
4. run tests
You can run all tests by ./check -g auto, or multiple/single test usi=
# ./check generic/311
# ./check btrfs/[0-9][0-9][0-9]
=20
Thanks
Qu
=20
-------- Original Message --------
Subject: XFS Tests for Btrfs
Date: 2014=E5=B9=B409=E6=9C=8819=E6=97=A5 04:14
Post by nick
Hey Fellow Btrfs Developers,
I am wondering how to run the xfs tests for btrfs as I tried to do i=
t based on a link online
Post by nick
written I believe a few years ago. If someone can help me get set up=
for testing the btrfs
Post by nick
code using xfs tests that would be great. In addition afterwards I a=
lready build kernel 3.17
Post by nick
r5 release candidate and would be glad to run any times you need run=
to test single drive
Post by nick
config issues.
Thanks Nick
--=20
To unsubscribe from this list: send the line "unsubscribe linux-btrf=
s" in
Post by nick
More majordomo info at http://vger.kernel.org/majordomo-info.html
=20
The issue I was hitting was my TEST_DIR not being configured properly. =
I will list my variables below.
/dev/sdc1 was my TEST_DEV
/media/nick/x was my TEST_DIR=20
Nick=20
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" =
in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Qu Wenruo
2014-09-19 01:40:35 UTC
Permalink
-------- Original Message --------
Subject: Re: XFS Tests for Btrfs
=46rom: nick <***@gmail.com>
To: Qu Wenruo <***@cn.fujitsu.com>, <linux-***@vger.kernel.org>
Date: 2014=E5=B9=B409=E6=9C=8819=E6=97=A5 09:17
Hi,
Xfstests uses several environment variants to setup the test environ=
ment.
You can set it manually using export, or write them into local.conf =
in xfstests directory.
TEST_DEV: device for normal tests, like all generic tests
TEST_DIR: where TEST_DEV is mounted to.
SCRATCH_DEV: scratch device for some tests, if you want to test btrf=
s' multi device related feature, you need
to set SCRATCH_DEV_POOL.
SCRATCH_DEV_POOL: a list for devices mainly for btrfs' muti-device r=
elated test.
SCRATCH_MNT: where SCRATCH_DEV/SCRATCH_DEV_POOL is mounted to.
SCRATCH_DEV_POOL should not contain the TEST_DEV.
FSTYP: the filesystem type you want to test.
MKFS_OPTIONS: the mkfs time options. Useful to test mkfs time featur=
e like no-holes.
MOUNT_OPTIONS: the mount time options. Useful to test feature like c=
ompress.
1. download the xfstests source, better the git version
2. compile xfstests
make will do everything for you, except you lacks some headers or de=
pendency.
When that happens, follow your distribution's method to install them=
=2E
3. setup the environment variants
Manually or into the local.conf is both OK.
4. run tests
You can run all tests by ./check -g auto, or multiple/single test us=
# ./check generic/311
# ./check btrfs/[0-9][0-9][0-9]
Thanks
Qu
-------- Original Message --------
Subject: XFS Tests for Btrfs
Date: 2014=E5=B9=B409=E6=9C=8819=E6=97=A5 04:14
Post by nick
Hey Fellow Btrfs Developers,
I am wondering how to run the xfs tests for btrfs as I tried to do =
it based on a link online
Post by nick
written I believe a few years ago. If someone can help me get set u=
p for testing the btrfs
Post by nick
code using xfs tests that would be great. In addition afterwards I =
already build kernel 3.17
Post by nick
r5 release candidate and would be glad to run any times you need ru=
n to test single drive
Post by nick
config issues.
Thanks Nick
--=20
To unsubscribe from this list: send the line "unsubscribe linux-btr=
fs" in
Post by nick
More majordomo info at http://vger.kernel.org/majordomo-info.html
The issue I was hitting was my TEST_DIR not being configured properly=
=2E I will list my variables below.
/dev/sdc1 was my TEST_DEV
/media/nick/x was my TEST_DIR
Nick
Did you mkfs on TEST_DEV? Can TEST_DEV be mounted correctly?

Thanks,
Qu
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" =
in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
nick
2014-09-19 01:41:52 UTC
Permalink
Post by Qu Wenruo
=20
-------- Original Message --------
Subject: Re: XFS Tests for Btrfs
Date: 2014=E5=B9=B409=E6=9C=8819=E6=97=A5 09:17
Hi,
Xfstests uses several environment variants to setup the test enviro=
nment.
Post by Qu Wenruo
You can set it manually using export, or write them into local.conf=
in xfstests directory.
Post by Qu Wenruo
TEST_DEV: device for normal tests, like all generic tests
TEST_DIR: where TEST_DEV is mounted to.
SCRATCH_DEV: scratch device for some tests, if you want to test btr=
fs' multi device related feature, you need
Post by Qu Wenruo
to set SCRATCH_DEV_POOL.
SCRATCH_DEV_POOL: a list for devices mainly for btrfs' muti-device =
related test.
Post by Qu Wenruo
SCRATCH_MNT: where SCRATCH_DEV/SCRATCH_DEV_POOL is mounted to.
SCRATCH_DEV_POOL should not contain the TEST_DEV.
FSTYP: the filesystem type you want to test.
MKFS_OPTIONS: the mkfs time options. Useful to test mkfs time featu=
re like no-holes.
Post by Qu Wenruo
MOUNT_OPTIONS: the mount time options. Useful to test feature like =
compress.
Post by Qu Wenruo
1. download the xfstests source, better the git version
2. compile xfstests
make will do everything for you, except you lacks some headers or d=
ependency.
Post by Qu Wenruo
When that happens, follow your distribution's method to install the=
m.
Post by Qu Wenruo
3. setup the environment variants
Manually or into the local.conf is both OK.
4. run tests
You can run all tests by ./check -g auto, or multiple/single test u=
# ./check generic/311
# ./check btrfs/[0-9][0-9][0-9]
Thanks
Qu
-------- Original Message --------
Subject: XFS Tests for Btrfs
Date: 2014=E5=B9=B409=E6=9C=8819=E6=97=A5 04:14
Post by nick
Hey Fellow Btrfs Developers,
I am wondering how to run the xfs tests for btrfs as I tried to do=
it based on a link online
Post by Qu Wenruo
Post by nick
written I believe a few years ago. If someone can help me get set =
up for testing the btrfs
Post by Qu Wenruo
Post by nick
code using xfs tests that would be great. In addition afterwards I=
already build kernel 3.17
Post by Qu Wenruo
Post by nick
r5 release candidate and would be glad to run any times you need r=
un to test single drive
Post by Qu Wenruo
Post by nick
config issues.
Thanks Nick
--=20
To unsubscribe from this list: send the line "unsubscribe linux-bt=
rfs" in
Post by Qu Wenruo
Post by nick
More majordomo info at http://vger.kernel.org/majordomo-info.html
The issue I was hitting was my TEST_DIR not being configured properl=
y. I will list my variables below.
Post by Qu Wenruo
/dev/sdc1 was my TEST_DEV
/media/nick/x was my TEST_DIR
Nick
Did you mkfs on TEST_DEV? Can TEST_DEV be mounted correctly?
=20
Thanks,
Qu
I partitioned it using gparted and I can mount it normally but not wit=
h xfstests.
Nick=20
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" =
in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Qu Wenruo
2014-09-19 01:46:36 UTC
Permalink
-------- Original Message --------
Subject: Re: XFS Tests for Btrfs
=46rom: nick <***@gmail.com>
To: Qu Wenruo <***@cn.fujitsu.com>, <linux-***@vger.kernel.org>
Date: 2014=E5=B9=B409=E6=9C=8819=E6=97=A5 09:41
Post by Qu Wenruo
-------- Original Message --------
Subject: Re: XFS Tests for Btrfs
g>
Post by Qu Wenruo
Date: 2014=E5=B9=B409=E6=9C=8819=E6=97=A5 09:17
Hi,
Xfstests uses several environment variants to setup the test envir=
onment.
Post by Qu Wenruo
You can set it manually using export, or write them into local.con=
f in xfstests directory.
Post by Qu Wenruo
TEST_DEV: device for normal tests, like all generic tests
TEST_DIR: where TEST_DEV is mounted to.
SCRATCH_DEV: scratch device for some tests, if you want to test bt=
rfs' multi device related feature, you need
Post by Qu Wenruo
to set SCRATCH_DEV_POOL.
SCRATCH_DEV_POOL: a list for devices mainly for btrfs' muti-device=
related test.
Post by Qu Wenruo
SCRATCH_MNT: where SCRATCH_DEV/SCRATCH_DEV_POOL is mounted to.
SCRATCH_DEV_POOL should not contain the TEST_DEV.
FSTYP: the filesystem type you want to test.
MKFS_OPTIONS: the mkfs time options. Useful to test mkfs time feat=
ure like no-holes.
Post by Qu Wenruo
MOUNT_OPTIONS: the mount time options. Useful to test feature like=
compress.
Post by Qu Wenruo
1. download the xfstests source, better the git version
2. compile xfstests
make will do everything for you, except you lacks some headers or =
dependency.
Post by Qu Wenruo
When that happens, follow your distribution's method to install th=
em.
Post by Qu Wenruo
3. setup the environment variants
Manually or into the local.conf is both OK.
4. run tests
You can run all tests by ./check -g auto, or multiple/single test =
# ./check generic/311
# ./check btrfs/[0-9][0-9][0-9]
Thanks
Qu
-------- Original Message --------
Subject: XFS Tests for Btrfs
Date: 2014=E5=B9=B409=E6=9C=8819=E6=97=A5 04:14
Post by nick
Hey Fellow Btrfs Developers,
I am wondering how to run the xfs tests for btrfs as I tried to d=
o it based on a link online
Post by Qu Wenruo
Post by nick
written I believe a few years ago. If someone can help me get set=
up for testing the btrfs
Post by Qu Wenruo
Post by nick
code using xfs tests that would be great. In addition afterwards =
I already build kernel 3.17
Post by Qu Wenruo
Post by nick
r5 release candidate and would be glad to run any times you need =
run to test single drive
Post by Qu Wenruo
Post by nick
config issues.
Thanks Nick
--=20
To unsubscribe from this list: send the line "unsubscribe linux-b=
trfs" in
Post by Qu Wenruo
Post by nick
More majordomo info at http://vger.kernel.org/majordomo-info.htm=
l
Post by Qu Wenruo
The issue I was hitting was my TEST_DIR not being configured proper=
ly. I will list my variables below.
Post by Qu Wenruo
/dev/sdc1 was my TEST_DEV
/media/nick/x was my TEST_DIR
Nick
Did you mkfs on TEST_DEV? Can TEST_DEV be mounted correctly?
Thanks,
Qu
I partitioned it using gparted and I can mount it normally but not w=
ith xfstests.
Nick
Did you specify the FSTYP? and what's the error prompt and dmesg for th=
e=20
fail of mount?

Thanks,
Qu
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" =
in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
nick
2014-09-19 01:56:25 UTC
Permalink
Post by Qu Wenruo
=20
-------- Original Message --------
Subject: Re: XFS Tests for Btrfs
Date: 2014=E5=B9=B409=E6=9C=8819=E6=97=A5 09:41
Post by Qu Wenruo
-------- Original Message --------
Subject: Re: XFS Tests for Btrfs
rg>
Post by Qu Wenruo
Post by Qu Wenruo
Date: 2014=E5=B9=B409=E6=9C=8819=E6=97=A5 09:17
Hi,
Xfstests uses several environment variants to setup the test envi=
ronment.
Post by Qu Wenruo
Post by Qu Wenruo
You can set it manually using export, or write them into local.co=
nf in xfstests directory.
Post by Qu Wenruo
Post by Qu Wenruo
TEST_DEV: device for normal tests, like all generic tests
TEST_DIR: where TEST_DEV is mounted to.
SCRATCH_DEV: scratch device for some tests, if you want to test b=
trfs' multi device related feature, you need
Post by Qu Wenruo
Post by Qu Wenruo
to set SCRATCH_DEV_POOL.
SCRATCH_DEV_POOL: a list for devices mainly for btrfs' muti-devic=
e related test.
Post by Qu Wenruo
Post by Qu Wenruo
SCRATCH_MNT: where SCRATCH_DEV/SCRATCH_DEV_POOL is mounted to.
SCRATCH_DEV_POOL should not contain the TEST_DEV.
FSTYP: the filesystem type you want to test.
MKFS_OPTIONS: the mkfs time options. Useful to test mkfs time fea=
ture like no-holes.
Post by Qu Wenruo
Post by Qu Wenruo
MOUNT_OPTIONS: the mount time options. Useful to test feature lik=
e compress.
Post by Qu Wenruo
Post by Qu Wenruo
1. download the xfstests source, better the git version
2. compile xfstests
make will do everything for you, except you lacks some headers or=
dependency.
Post by Qu Wenruo
Post by Qu Wenruo
When that happens, follow your distribution's method to install t=
hem.
Post by Qu Wenruo
Post by Qu Wenruo
3. setup the environment variants
Manually or into the local.conf is both OK.
4. run tests
You can run all tests by ./check -g auto, or multiple/single test=
# ./check generic/311
# ./check btrfs/[0-9][0-9][0-9]
Thanks
Qu
-------- Original Message --------
Subject: XFS Tests for Btrfs
Date: 2014=E5=B9=B409=E6=9C=8819=E6=97=A5 04:14
Post by nick
Hey Fellow Btrfs Developers,
I am wondering how to run the xfs tests for btrfs as I tried to =
do it based on a link online
Post by Qu Wenruo
Post by Qu Wenruo
Post by nick
written I believe a few years ago. If someone can help me get se=
t up for testing the btrfs
Post by Qu Wenruo
Post by Qu Wenruo
Post by nick
code using xfs tests that would be great. In addition afterwards=
I already build kernel 3.17
Post by Qu Wenruo
Post by Qu Wenruo
Post by nick
r5 release candidate and would be glad to run any times you need=
run to test single drive
Post by Qu Wenruo
Post by Qu Wenruo
Post by nick
config issues.
Thanks Nick
--=20
To unsubscribe from this list: send the line "unsubscribe linux-=
btrfs" in
Post by Qu Wenruo
Post by Qu Wenruo
Post by nick
More majordomo info at http://vger.kernel.org/majordomo-info.ht=
ml
Post by Qu Wenruo
Post by Qu Wenruo
The issue I was hitting was my TEST_DIR not being configured prope=
rly. I will list my variables below.
Post by Qu Wenruo
Post by Qu Wenruo
/dev/sdc1 was my TEST_DEV
/media/nick/x was my TEST_DIR
Nick
Did you mkfs on TEST_DEV? Can TEST_DEV be mounted correctly?
Thanks,
Qu
I partitioned it using gparted and I can mount it normally but not =
with xfstests.
Post by Qu Wenruo
Nick
Did you specify the FSTYP? and what's the error prompt and dmesg for =
the fail of mount?
Post by Qu Wenruo
=20
Thanks,
Qu
I also tried creating a directory in /media/nick and got this when it t=
ried to mount,
+$TEST_DEV is mounted but not on $TEST_DIR - aborting for all tests tha=
t were going to
be run.
Nick=20
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" =
in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
nick
2014-09-22 10:07:01 UTC
Permalink
Post by Qu Wenruo
=20
-------- Original Message --------
Subject: Re: XFS Tests for Btrfs
Date: 2014=E5=B9=B409=E6=9C=8819=E6=97=A5 18:49
Post by Qu Wenruo
-------- Original Message --------
Subject: Re: XFS Tests for Btrfs
Date: 2014=E5=B9=B409=E6=9C=8819=E6=97=A5 10:40
[snip]
Sorry Qu,ur local _scratch_mkfs routine ...
Error: unable to open /dev/sdc: Device or resource busy
check: failed to mkfs $SCRATCH_DEV using specified options
Passed all 0 tests
Is happening to me now. How do I fix this ?
Nick
Full local.conf please.
Also lsblk output is needed.
Thanks,
Qu
Thank for the Help Qu,
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 111.8G 0 disk
=E2=94=94=E2=94=80sda1 8:1 0 111.8G 0 part /
sdb 8:16 0 465.8G 0 disk
=E2=94=9C=E2=94=80sdb1 8:17 0 7.6G 0 part [SWAP]
=E2=94=94=E2=94=80sdb2 8:18 0 458.1G 0 part /home
sdc 8:32 0 931.5G 0 disk
=E2=94=94=E2=94=80sdc1 8:33 0 931.5G 0 part
sr0 11:0 1 1024M 0 rom
# Ideally define at least these 4 to match your environment
# The first 2 are required.
# See README for other variables which can be set.
#
# Note: SCRATCH_DEV >will< get overwritten!
export TEST_DEV=3D/dev/sdX1
export TEST_DIR=3D/mnt/test
export SCRATCH_DEV=3D/dev/sdX2
export SCRATCH_MNT=3D/mnt/scratch.
I am new to this so sorry for the troubles.
Nick
sdc
sdc5 40G <- Use as TEST_DEV
sdc6 15G
sdc7 15G
sdc8 15G
sdc9 15G
then
# mkfs.btrfs -f /dev/sdc5
# mkfs.btrfs -f /dev/sdc[6-9]
# mkdir -p /mnt/test
# mkdir -p /mnt/scratch
export FSTYP=3Dbtrfs
export TEST_DEV=3D/dev/sdc5
export TEST_MNT=3D/mnt/test
export SCRATCH_DEV_POOL=3D"/dev/sdc6 /dev/sdc7 /dev/sdc8 /dev/sdc9"
export SCRATCH_MNT=3D/mnt/scratch
Then, you should be able to run ./check -g auto.
Thanks,
Qu
I got three failing tests now, would you like me to post the logs.
Nick
There are some tests that are already known to fail but not bugs or a=
lready fixed.
Post by Qu Wenruo
=20
As far as I can tell, if using 3.17-rc1,
btrfs/010, btrfs/047, btrfs/054 are always failure under all mount op=
tions.
Post by Qu Wenruo
btrfs/010 is somewhat outdated, since kernel now disables defrage wit=
h subvolume, so it will never pass.
Post by Qu Wenruo
btrfs/047 and btrfs/054, as you can see in the comments of these test=
s, it's already fixed.
Post by Qu Wenruo
Maybe next release or later RCs.
=20
Generic/015 and generic/027 will sometims fail using nodatasum/nodata=
cow/compress=3Dlzo mount options
Post by Qu Wenruo
Also generic/275 will sometimes fail with compress=3Dlzo, none of the=
m is bug.
Post by Qu Wenruo
Some btrfs features or designs make them not pass.
=20
Geneirc/018 will always fails with nodatacow mount option, but the pa=
tch is already sent.
Post by Qu Wenruo
=20
So if you encounters other bugs, I'll be happen to see the failed tes=
t number and test log.
Post by Qu Wenruo
=20
BTW, as I mentioned, different mount options may cause different test=
results,
Post by Qu Wenruo
so it's high recommended to run xfstest against all supported mount o=
ptions.
Post by Qu Wenruo
=20
Thanks,
Qu
=20
=20
Qu,
I will run the tests later and see if any of them are failing beside th=
e ones you mentioned.
Nick
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" =
in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Loading...