[thin_check] Add cucumber test for --skip-mappings
This commit is contained in:
parent
35538378fe
commit
f8efc4f58c
@ -38,6 +38,7 @@ Feature: thin_check
|
||||
{-h|--help}
|
||||
{-V|--version}
|
||||
{--super-block-only}
|
||||
{--skip-mappings}
|
||||
"""
|
||||
|
||||
Scenario: Unrecognised option should cause failure
|
||||
@ -58,3 +59,8 @@ Feature: thin_check
|
||||
superblock is corrupt
|
||||
bad checksum in superblock
|
||||
"""
|
||||
|
||||
Scenario: --skip-mappings check passes on valid metadata
|
||||
Given valid metadata
|
||||
When I run thin_check with --skip-mappings
|
||||
Then it should pass
|
@ -308,7 +308,8 @@ namespace {
|
||||
<< " {-q|--quiet}" << endl
|
||||
<< " {-h|--help}" << endl
|
||||
<< " {-V|--version}" << endl
|
||||
<< " {--super-block-only}" << endl;
|
||||
<< " {--super-block-only}" << endl
|
||||
<< " {--skip-mappings}" << endl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -327,6 +328,10 @@ int main(int argc, char **argv)
|
||||
{ NULL, no_argument, NULL, 0 }
|
||||
};
|
||||
|
||||
fs.check_device_tree = true;
|
||||
fs.check_mapping_tree_level1 = true;
|
||||
fs.check_mapping_tree_level2 = true;
|
||||
|
||||
while ((c = getopt_long(argc, argv, shortopts, longopts, NULL)) != -1) {
|
||||
switch(c) {
|
||||
case 'h':
|
||||
@ -350,8 +355,6 @@ int main(int argc, char **argv)
|
||||
|
||||
case 2:
|
||||
// skip-mappings
|
||||
fs.check_device_tree = true;
|
||||
fs.check_mapping_tree_level1 = true;
|
||||
fs.check_mapping_tree_level2 = false;
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user