fstests: fix test and scratch filters for overlapping DEV/MNT paths
authorAmir Goldstein <amir73il@gmail.com>
Tue, 28 Feb 2017 12:18:31 +0000 (14:18 +0200)
committerEryu Guan <eguan@redhat.com>
Wed, 1 Mar 2017 10:35:18 +0000 (18:35 +0800)
commit4e965d85160237550433d650664d65bff17882b4
tree32df41f05e7243db6e92d88ac065f326633f7e73
parentf20654ac4a74b29ae7d1fcbe2de1850156ffcf03
fstests: fix test and scratch filters for overlapping DEV/MNT paths

When configuring overlay base fs, TEST_DEV/DIR and SCRATCH_DEV/MNT
are derived from the base fs mount points, where *_DEV are the
path of the base fs mount point and TEST_DIR/SCRATCH_MNT are
a directory under the base fs mount point.

This means that the overlay DEV paths are prefixes of the overlay
mount points.
Fix the test and sctach filters to check if TEST_DEV/SCRATCH_DEV is
a substring of TEST_DIR/SCRATCH_MNT and try and match the longer
string first.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
common/filter