Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update migration tests #5315

Merged
merged 1 commit into from
Oct 31, 2016
Merged

Update migration tests #5315

merged 1 commit into from
Oct 31, 2016

Conversation

legend-hua
Copy link
Contributor

Due to the instability of the migration tests, the test will skip.

Test: /usr/share/zfs/zfs-tests/tests/functional/migration/setup (run as root) [00:00] [SKIP]
03:08:56.97 lsblk: /dev/mapper/loop0: not a block device
03:08:56.97 lsblk: /dev/mapper/loop0: not a block device
03:08:56.97 lsblk: /dev/mapper/loop0: not a block device
03:08:56.98 lsblk: /dev/mapper/loop1: not a block device
03:08:56.98 lsblk: /dev/mapper/loop1: not a block device
03:08:56.99 Only partitionable physical disks can be used
Test: /usr/share/zfs/zfs-tests/tests/functional/migration/migration_001_pos (run as root) [00:00] [SKIP]
Test: /usr/share/zfs/zfs-tests/tests/functional/migration/migration_002_pos (run as root) [00:00] [SKIP]
Test: /usr/share/zfs/zfs-tests/tests/functional/migration/migration_003_pos (run as root) [00:00] [SKIP]
Test: /usr/share/zfs/zfs-tests/tests/functional/migration/migration_004_pos (run as root) [00:00] [SKIP]
Test: /usr/share/zfs/zfs-tests/tests/functional/migration/migration_005_pos (run as root) [00:00] [SKIP]
Test: /usr/share/zfs/zfs-tests/tests/functional/migration/migration_006_pos (run as root) [00:00] [SKIP]
Test: /usr/share/zfs/zfs-tests/tests/functional/migration/migration_007_pos (run as root) [00:00] [SKIP]
Test: /usr/share/zfs/zfs-tests/tests/functional/migration/migration_008_pos (run as root) [00:00] [SKIP]
Test: /usr/share/zfs/zfs-tests/tests/functional/migration/migration_009_pos (run as root) [00:00] [SKIP]
Test: /usr/share/zfs/zfs-tests/tests/functional/migration/migration_010_pos (run as root) [00:00] [SKIP]
Test: /usr/share/zfs/zfs-tests/tests/functional/migration/migration_011_pos (run as root) [00:00] [SKIP]
Test: /usr/share/zfs/zfs-tests/tests/functional/migration/migration_012_pos (run as root) [00:00] [SKIP]
Test: /usr/share/zfs/zfs-tests/tests/functional/migration/cleanup (run as root) [00:00] [PASS]
03:08:57.02 lsblk: /dev/mapper/loop0: not a block device
03:08:57.02 lsblk: /dev/mapper/loop0: not a block device
03:08:57.03 lsblk: /dev/mapper/loop0: not a block device
03:08:57.03 lsblk: /dev/mapper/loop1: not a block device
03:08:57.03 lsblk: /dev/mapper/loop1: not a block device
03:08:57.05 NOTE: Pool does not exist. (testpool.26868)
03:08:57.05 lsblk: /dev/mapper/loop0: not a block device
03:08:57.13 SUCCESS: /sbin/zpool create -f foopool3915 loop0 loop1
03:08:57.16 SUCCESS: cleanup_devices loop0 loop1

The migration tests focus on migrating test file from fs to ZFS fs.
We can use linux native fs instead of UFS fs, so that reducing complexity
of setup.

@mention-bot
Copy link

@legend-hua, thanks for your PR! By analyzing the history of the files in this pull request, we identified @behlendorf and @sydneyvanda to be potential reviewers.

@@ -64,10 +45,4 @@ log_must $ZFS set mountpoint=$TESTDIR $TESTPOOL/$TESTFS
$RM -rf $NONZFS_TESTDIR || log_unresolved Could not remove $NONZFS_TESTDIR
$MKDIR -p $NONZFS_TESTDIR || log_unresolved Could not create $NONZFS_TESTDIR

$ECHO "y" | $NEWFS -v ${DEV_DSKDIR}/$NONZFSSIDE_DISK
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For Linux $NEWFS is defined to be /sbin/mke2fs so this should work and create a Linux filesystem which can be used in place of UFS for the test. Maybe the path is wrong here and that's why it's failing. But there shouldn't be and reason to remove this code and with minimal modification should work for Linux.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@behlendorf We have two linux which centos 6.1 and customize linux. I want that the migration tests can be run on my environment, so that only considering the native linux.
Thanks for your advice, I try to fix it

@@ -34,12 +34,12 @@

#
# DESCRIPTION:
# Migrating test file from ZFS fs to UFS fs using tar.
# Migrating test file from ZFS fs to Linux native fs using tar.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$NEWFS_DEFAULT_FS is defined to be FS type which should be used.

Due to the instability of the migration tests, the test will skip.
The migration tests focus on migrating test file from fs to ZFS fs.
We can create zpool and ext2 directly by loop device, rather than
by set_partition

Signed-off-by: legend-hua liu.hua130@zte.com.cn
@behlendorf
Copy link
Contributor

behlendorf commented Oct 21, 2016

@sydneyvanda @jsalinasintel could you review this. I believe the goal here is to get these tests running on CentOS 6 where they're usually skipped.

@sydneyvanda
Copy link
Contributor

@legend-hua @behlendorf @jsalinasintel - this looks good to me. I tested this patch on CentOS 6.8 and worked fine. I also added a fix for the incorrect error messages "lsblk: /dev/mapper/loop0: not a block device" as seen above in #5350.

@legend-hua
Copy link
Contributor Author

legend-hua commented Oct 30, 2016

@sydneyvanda
Thanks for your review. The error messages "lsblk: /dev/mapper/loop0: not a block device", which it may be caused by different linux or lsblk versions. Whether is loop device depends on the flag "TYPE" in is_loop_device function, but there aren't flag "TYPE" on the early linux version. So I fix it on my environment by specifying the flag "NAME".

[root@brs82 /]# lsb_release -a
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: RedHatEnterpriseServer
Description: Red Hat Enterprise Linux Server release 6.5 (Santiago)
Release: 6.5
Codename: Santiago
[root@brs82 /]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 100M 0 loop /liuhua/fs
loop1 7:1 0 1.9G 0 loop
loop2 7:2 0 2G 0 loop
loop3 7:3 0 2G 0 loop
loop4 7:4 0 2G 0 loop
sda 8:0 0 298.1G 0 disk

[root@root ~]# lsb_release -a
LSB Version: :core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: RedHatEnterpriseServer
Description: Red Hat Enterprise Linux Server release 6.1 (Santiago)
Release: 6.1
Codename: Santiago
[root@root ~]# lsblk
NAME MAJ:MIN RM SIZE RO MOUNTPOINT
loop0 7:0 0 1G 0
sda 8:0 0 298.1G 0

@behlendorf behlendorf merged commit 9f38f81 into openzfs:master Oct 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants