Skip to contentSkip to conversation

XFS Tests for Btrfs

DISCUSSION nick 2 participants 8 messages Sep 18, 2014 – Sep 22, 2014 8 messages not in the archive Btrfs file system

lore
Share & tools
lore

nick

author
#0 lore raw

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

#1 lore raw

Hi,

Xfstests uses several environment variants to setup the test environment. You can set it manually using export, or write them into local.conf in 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' multi device related feature, you need to set SCRATCH_DEV_POOL.
SCRATCH_DEV_POOL: a list for devices mainly for btrfs' muti-device related 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 feature like no-holes.
MOUNT_OPTIONS: the mount time options. Useful to test feature like compress.

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 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 blob/testcase number like:

# ./check generic/311
# ./check btrfs/[0-9][0-9][0-9]

Thanks
Qu

-------- Original Message --------
Subject: XFS Tests for Btrfs
From: nick <[email protected]>
To: <[email protected]>
Date: 2014年09月19日 04:14

Quoted 11 lines

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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

author
#2 lore raw
Quoted 36 lines · Qu Wenruo

Hi,

Xfstests uses several environment variants to setup the test environment. You can set it manually using export, or write them into local.conf in 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' multi device related feature, you need to set SCRATCH_DEV_POOL.
SCRATCH_DEV_POOL: a list for devices mainly for btrfs' muti-device related 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 feature like no-holes.
MOUNT_OPTIONS: the mount time options. Useful to test feature like compress.

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 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 blob/testcase number like:

# ./check generic/311
# ./check btrfs/[0-9][0-9][0-9]
Quoted 20 lines

Thanks
Qu

-------- Original Message --------
Subject: XFS Tests for Btrfs
From: nick <[email protected]>
To: <[email protected]>
Date: 2014年09月19日 04:14

Quoted 11 lines

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

Signature · 3 lines
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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
Nick

#3 lore raw

-------- Original Message --------
Subject: Re: XFS Tests for Btrfs
From: nick <[email protected]>
To: Qu Wenruo <[email protected]>, <[email protected]>
Date: 2014年09月19日 09:17

Quoted 57 lines · Qu Wenruo
Quoted 36 lines

Hi,

Xfstests uses several environment variants to setup the test environment. You can set it manually using export, or write them into local.conf in 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' multi device related feature, you need to set SCRATCH_DEV_POOL.
SCRATCH_DEV_POOL: a list for devices mainly for btrfs' muti-device related 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 feature like no-holes.
MOUNT_OPTIONS: the mount time options. Useful to test feature like compress.

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 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 blob/testcase number like:

# ./check generic/311
# ./check btrfs/[0-9][0-9][0-9]
Quoted 19 lines

Thanks
Qu

-------- Original Message --------
Subject: XFS Tests for Btrfs
From: nick <[email protected]>
To: <[email protected]>
Date: 2014年09月19日 04:14

Quoted 11 lines

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

Signature · 3 lines
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Quoted 4 lines

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
Nick

Did you mkfs on TEST_DEV? Can TEST_DEV be mounted correctly?

Thanks,
Qu

author
#4 lore raw
Quoted 63 lines · Qu Wenruo

-------- Original Message --------
Subject: Re: XFS Tests for Btrfs
From: nick <[email protected]>
To: Qu Wenruo <[email protected]>, <[email protected]>
Date: 2014年09月19日 09:17

Quoted 57 lines · Qu Wenruo
Quoted 55 lines

Hi,

Xfstests uses several environment variants to setup the test environment. You can set it manually using export, or write them into local.conf in 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' multi device related feature, you need to set SCRATCH_DEV_POOL.
SCRATCH_DEV_POOL: a list for devices mainly for btrfs' muti-device related 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 feature like no-holes.
MOUNT_OPTIONS: the mount time options. Useful to test feature like compress.

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 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 blob/testcase number like:

# ./check generic/311
# ./check btrfs/[0-9][0-9][0-9]

Thanks
Qu

-------- Original Message --------
Subject: XFS Tests for Btrfs
From: nick <[email protected]>
To: <[email protected]>
Date: 2014年09月19日 04:14

Quoted 11 lines

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

Signature · 3 lines
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Quoted 8 lines
Quoted 4 lines

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
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. Nick

#5 lore raw

-------- Original Message --------
Subject: Re: XFS Tests for Btrfs
From: nick <[email protected]>
To: Qu Wenruo <[email protected]>, <[email protected]>
Date: 2014年09月19日 09:41

Quoted 67 lines · Qu Wenruo
Quoted 65 lines

-------- Original Message --------
Subject: Re: XFS Tests for Btrfs
From: nick <[email protected]>
To: Qu Wenruo <[email protected]>, <[email protected]>
Date: 2014年09月19日 09:17

Quoted 60 lines · Qu Wenruo
Quoted 36 lines

Hi,

Xfstests uses several environment variants to setup the test environment. You can set it manually using export, or write them into local.conf in 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' multi device related feature, you need to set SCRATCH_DEV_POOL.
SCRATCH_DEV_POOL: a list for devices mainly for btrfs' muti-device related 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 feature like no-holes.
MOUNT_OPTIONS: the mount time options. Useful to test feature like compress.

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 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 blob/testcase number like:

# ./check generic/311
# ./check btrfs/[0-9][0-9][0-9]
Quoted 19 lines

Thanks
Qu

-------- Original Message --------
Subject: XFS Tests for Btrfs
From: nick <[email protected]>
To: <[email protected]>
Date: 2014年09月19日 04:14

Quoted 11 lines

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

Signature · 3 lines
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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
Nick

Quoted 6 lines
Quoted 4 lines

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. Nick

Did you specify the FSTYP? and what's the error prompt and dmesg for the fail of mount?

Thanks,
Qu

author
#6 lore raw
Quoted 75 lines · Qu Wenruo

-------- Original Message --------
Subject: Re: XFS Tests for Btrfs
From: nick <[email protected]>
To: Qu Wenruo <[email protected]>, <[email protected]>
Date: 2014年09月19日 09:41

Quoted 69 lines · Qu Wenruo
Quoted 67 lines

-------- Original Message --------
Subject: Re: XFS Tests for Btrfs
From: nick <[email protected]>
To: Qu Wenruo <[email protected]>, <[email protected]>
Date: 2014年09月19日 09:17

Quoted 56 lines · Qu Wenruo
Quoted 36 lines

Hi,

Xfstests uses several environment variants to setup the test environment. You can set it manually using export, or write them into local.conf in 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' multi device related feature, you need to set SCRATCH_DEV_POOL.
SCRATCH_DEV_POOL: a list for devices mainly for btrfs' muti-device related 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 feature like no-holes.
MOUNT_OPTIONS: the mount time options. Useful to test feature like compress.

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 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 blob/testcase number like:

# ./check generic/311
# ./check btrfs/[0-9][0-9][0-9]
Quoted 19 lines

Thanks
Qu

-------- Original Message --------
Subject: XFS Tests for Btrfs
From: nick <[email protected]>
To: <[email protected]>
Date: 2014年09月19日 04:14

Quoted 11 lines

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

Signature · 3 lines
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Quoted 4 lines

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
Nick

Did you mkfs on TEST_DEV? Can TEST_DEV be mounted correctly?

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

Thanks,
Qu

I partitioned it using gparted and I can mount it normally but not with xfstests. Nick

Did you specify the FSTYP? and what's the error prompt and dmesg for the fail of mount?

Thanks,
Qu

I also tried creating a directory in /media/nick and got this when it tried to mount, +$TEST_DEV is mounted but not on $TEST_DIR - aborting for all tests that were going to be run.
Nick

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

author
#15 lore raw
Quoted 92 lines · Qu Wenruo

-------- Original Message --------
Subject: Re: XFS Tests for Btrfs
From: nick <[email protected]>
To: Qu Wenruo <[email protected]>
Date: 2014年09月19日 18:49

Quoted 66 lines · Qu Wenruo
Quoted 64 lines

-------- Original Message --------
Subject: Re: XFS Tests for Btrfs
From: nick <[email protected]>
To: Qu Wenruo <[email protected]>
Date: 2014年09月19日 10:40

Quoted 31 lines

[snip]

Quoted 7 lines
Quoted 7 lines

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

Quoted 6 lines

Full local.conf please.

Also lsblk output is needed.

Thanks,
Qu

Thank for the Help Qu,
Here is the output of lsblk:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 111.8G 0 disk

└─sda1   8:1    0 111.8G  0 part /
sdb      8:16   0 465.8G  0 disk
├─sdb1   8:17   0   7.6G  0 part [SWAP]
└─sdb2   8:18   0 458.1G  0 part /home
sdc      8:32   0 931.5G  0 disk
└─sdc1   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!

Quoted 6 lines

export TEST_DEV=/dev/sdX1
export TEST_DIR=/mnt/test
export SCRATCH_DEV=/dev/sdX2
export SCRATCH_MNT=/mnt/scratch.
I am new to this so sorry for the troubles.
Nick

Part your /dev/sdc into the following layout:
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

then write your local.conf like the following:
export FSTYP=btrfs
export TEST_DEV=/dev/sdc5
export TEST_MNT=/mnt/test
export SCRATCH_DEV_POOL="/dev/sdc6 /dev/sdc7 /dev/sdc8 /dev/sdc9" export SCRATCH_MNT=/mnt/scratch

Quoted 6 lines
Quoted 4 lines

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 already fixed.

As far as I can tell, if using 3.17-rc1,
btrfs/010, btrfs/047, btrfs/054 are always failure under all mount options.
btrfs/010 is somewhat outdated, since kernel now disables defrage with subvolume, so it will never pass. btrfs/047 and btrfs/054, as you can see in the comments of these tests, it's already fixed. Maybe next release or later RCs.

Generic/015 and generic/027 will sometims fail using nodatasum/nodatacow/compress=lzo mount options Also generic/275 will sometimes fail with compress=lzo, none of them is bug.
Some btrfs features or designs make them not pass.

Geneirc/018 will always fails with nodatacow mount option, but the patch is already sent.

Quoted 9 lines

So if you encounters other bugs, I'll be happen to see the failed test number and test log.

BTW, as I mentioned, different mount options may cause different test results, so it's high recommended to run xfstest against all supported mount options.

Thanks,
Qu

Qu,
I will run the tests later and see if any of them are failing beside the ones you mentioned. Nick