[various] Improve documentation

Output file must be preallocated.
This commit is contained in:
Joe Thornber
2016-07-11 14:53:03 +01:00
parent ceffa5f5c4
commit 4779fb9b80
16 changed files with 127 additions and 13 deletions

View File

@@ -24,6 +24,11 @@ Given(/^a corrupt superblock$/) do
end
end
Given(/^a tiny file$/) do
run_simple("rm -f tiny")
run_simple("fallocate -l 123 tiny")
end
When(/^I run thin_check with (.*?)$/) do |opts|
run_simple("thin_check #{opts} #{dev_file}", false)
end

View File

@@ -55,6 +55,18 @@ Feature: thin_restore
No output file provided.
"""
Scenario: tiny output file
Given a tiny file
When I run thin_restore with -i metadata.xml -o tiny
Then it should fail with:
"""
Output file too small.
The output file should either be a block device,
or an existing file. The file needs to be large
enough to hold the metadata.
"""
Scenario: --quiet is accepted
Given valid thin metadata
When I run thin_restore with -i metadata.xml -o metadata.bin --quiet