jthornber / device-mapper-test-suite

Test suite for device mapper targets
GNU General Public License v3.0
23 stars 20 forks source link

-t /ReadOnly/ specifies both ReadOnlyTests and ReadOnlyMetadataTests #41

Closed simonxuhao closed 9 years ago

simonxuhao commented 9 years ago

When I run ReadOnlyTests, both ReadOnlyMetadataTests and ReadOnlyTests are run:

# dmtest run --suite thin-provisioning --profile mix -t /ReadOnly/
Loaded suite thin-provisioning
Started
ReadOnlyMetadataTests
  ro_pool_succeeds_with_ro_metadata...PASS
  with_ro_dev_works...PASS
ReadOnlyTests
  can_access_fully_mapped_device...PASS
  can_read_unprovisioned_regions...FAIL
  cant_create_new_thins...PASS
  cant_delete_thins...PASS
  cant_provision_new_blocks...PASS
  commit_failure_causes_fallback...PASS
  create_read_only...PASS

Is this by design or a minor regex bug?

jthornber commented 9 years ago

The slashes indicate you wish the argument to be treated as a regular expression. I've put some alternative commands that select just ReadOnlyTests below.

root@debian:~/dmtest# dmtest list --suite thin-provisioning -t /ReadOnlyTests/ thin-provisioning ReadOnlyTests can_access_fully_mapped_device
can_read_unprovisioned_regions
cant_create_new_thins
cant_delete_thins
cant_provision_new_blocks
commit_failure_causes_fallback
create_read_only
root@debian:~/dmtest# dmtest list --suite thin-provisioning -t /^ReadOnlyTests$/ thin-provisioning ReadOnlyTests can_access_fully_mapped_device
can_read_unprovisioned_regions
cant_create_new_thins
cant_delete_thins
cant_provision_new_blocks
commit_failure_causes_fallback
create_read_only
root@debian:~/dmtest# dmtest list --suite thin-provisioning -t ReadOnlyTests thin-provisioning ReadOnlyTests can_access_fully_mapped_device
can_read_unprovisioned_regions
cant_create_new_thins
cant_delete_thins
cant_provision_new_blocks
commit_failure_causes_fallback
create_read_only