Ming-Hung Tsai
f6eb5173c9
[era_restore] Avoid touching the output file by checking input file earlier
...
The output file has been checked by the caller, so there's no need
to check the output file again.
2021-10-21 17:51:28 +08:00
Ming-Hung Tsai
8d3f65244d
[tests] Move era_restore tests to Rust
2021-10-21 17:51:28 +08:00
Ming-Hung Tsai
4cfe93570c
[tests] Add era test fixtures
2021-10-21 17:51:28 +08:00
Ming-Hung Tsai
321fce882f
[tests] Move era_check tests to Rust
2021-10-21 17:51:28 +08:00
Ming-Hung Tsai
0215b5fecd
[era_check (rust)] Remove unused option
2021-10-21 17:51:28 +08:00
Ming-Hung Tsai
8fa7f96dfd
[era_dump/restore (rust)] Support displaying writeset blocks in ranges
...
- Group adjacent marked blocks into ranges
- Show marked blocks only, and ignore untouched blocks
2021-10-21 17:49:36 +08:00
Ming-Hung Tsai
4559039066
[era_invalidate (rust)] First code drop
2021-10-21 17:04:54 +08:00
Ming-Hung Tsai
0791208ca4
[io_engine (rust)] Open file exclusively
2021-10-21 16:18:14 +08:00
Ming-Hung Tsai
9ab4172790
[cache_restore (rust)] Tidy up
2021-10-21 16:18:14 +08:00
Ming-Hung Tsai
36767bcda6
[era_repair (rust)] First code drop
2021-10-21 16:18:14 +08:00
Ming-Hung Tsai
3a8dc8da2d
[xml (rust)] Log invalid attribute name
2021-10-21 16:18:14 +08:00
Ming-Hung Tsai
ed7480e96d
[era_restore (rust)] First code drop
2021-10-21 16:18:14 +08:00
Ming-Hung Tsai
55a81c0b9f
[era_dump (rust)] First code drop
2021-10-21 16:18:14 +08:00
Ming-Hung Tsai
8a1399e3bb
[cache_dump (rust)] Make use of the --repair option
...
Ignore non-fatal errors, and regenerate unavailable dirty bits if --repair was applied.
2021-10-21 16:18:14 +08:00
Ming-Hung Tsai
3d36456a36
[era_check (rust)] First code drop
2021-10-21 16:18:14 +08:00
Ming-Hung Tsai
c8a1da1df9
[all] Apply cargo fmt, and fix clippy warnings
2021-10-20 20:23:27 +08:00
Ming-Hung Tsai
13aeefcdeb
[thin] Fix typo
2021-10-20 20:23:27 +08:00
Joe Thornber
959b04ecb5
[thin_dump] fix overrides
2021-10-20 13:06:15 +01:00
Joe Thornber
56ea130650
[tests/thin_dump] Update help string
2021-10-19 15:24:16 +01:00
Joe Thornber
a568da8c71
[tests/thin_dump] remove some extraneous output to stderr
2021-10-19 15:23:17 +01:00
Joe Thornber
c5645d798f
[tests/thin_delta] fix bad_option check
2021-10-19 14:25:56 +01:00
Joe Thornber
44d29b0467
[tests/thin_check] Clean up test dir
2021-10-19 14:25:25 +01:00
Joe Thornber
98be38dc4c
[tests] Improve stdout/stderr logging when running sub processes
2021-10-19 14:20:47 +01:00
Joe Thornber
13400c2465
[tests/thin_delta] thin_delta should be a c++ command
2021-10-19 14:11:56 +01:00
Joe Thornber
6c5405ccf8
[tests] Get the run_* functions to log what they're doing.
2021-10-18 16:59:17 +01:00
Joe Thornber
024554c987
Merge rust tools into a single pdata_tools exe
2021-10-11 12:07:26 +01:00
Joe Thornber
c9b47437f2
Merge pull request #189 from mingnus/2021-08-30-functional-tests
...
Functional tests and misc fixes
2021-09-30 15:15:21 +01:00
Ming-Hung Tsai
d712190db4
[io_engine (rust)] Open file exclusively
2021-09-22 17:07:56 +08:00
Ming-Hung Tsai
6bd7741dfa
[cache_repair] Avoid touching the output file by checking input file earlier
...
The output file has been checked by the caller, so there's no need
to check the output file again.
2021-09-22 17:07:56 +08:00
Ming-Hung Tsai
5abb92838c
[tests] Port the remaining cache tests
2021-09-22 17:07:56 +08:00
Ming-Hung Tsai
66c1d629a4
[all (rust)] Keep silent if --quiet was applied
2021-09-22 17:07:56 +08:00
Ming-Hung Tsai
d436f35ed3
[thin_dump/thin_repair/thin_restore (rust)] Fix errors in tests
...
- Move error messages to stderr
- Fix the transaction_id and data_block_size in test fixture,
and check the data_block_size in thin_restore.
- Disable the missing_something tests for Rust. The transaction_id
and nr_data_blocks now could be recovered automatically.
- Limit the use of override options in test cases. Only broken
superblocks could be overridden, and the provided values
should be compatible to the original metadata.
- Remove unused option
2021-09-22 17:06:28 +08:00
Ming-Hung Tsai
c133e62353
[thin_dump] Emit superblock flags
2021-09-22 17:05:59 +08:00
Ming-Hung Tsai
34f927d989
[thin_check (rust)] Make better use of Rust's Result type
...
Replace the bail_out checking with the returned Result, which helps
decoupling the internal state of Report from application logic.
2021-09-22 17:05:59 +08:00
Ming-Hung Tsai
438730951e
[thin_check (rust)] Allow ignoring non-fatal errors in mapping tree
2021-09-22 17:05:59 +08:00
Ming-Hung Tsai
a18fd60f3f
[thin_check (rust)] Fix auto-repair related errors
...
- Returns error on metadata leaks
- Clear needs_check flag on success
- Check auto-repair write errors
- Fix file open flags, and correct spelling
2021-09-22 17:05:59 +08:00
Ming-Hung Tsai
e7fa012701
[btree] Fix ref-counting on overwritten values
2021-09-22 17:05:59 +08:00
Ming-Hung Tsai
f8c40a1fda
[thin_check (rust)] Set compatibility between options
2021-09-22 17:05:59 +08:00
Ming-Hung Tsai
bb53083271
[array (rust)] Fix building uncontiguous array
2021-09-22 17:05:59 +08:00
Ming-Hung Tsai
2f22a8c55d
[all (rust)] Fix errors in testing input option
...
- Fix file mode bits checking
- Return error reason from stat
2021-09-22 17:05:59 +08:00
Ming-Hung Tsai
4ed2348b36
[cache_restore (rust)] Fix errors in tests
...
- Move error messages to stderr (fixes unwritable_output_file,
input_file_not_found, and missing_input_option)
- Validate XML structures implicitly (fixes corrupted_input_data)
- Check output file size (fixes tiny_output_file)
- Allow restoring XML without the hints (for creating test fixtures)
- Provide XML error context
- Remove unused option
2021-09-22 17:05:29 +08:00
Ming-Hung Tsai
59e44667a9
[tests] Port cache_restore tests
2021-09-16 21:55:46 +08:00
Ming-Hung Tsai
9253117132
[tests] Add cache fixtures
...
- Generate temp xml and metadata files
- Correct existing tests to use cache fixtures
- Fix cache xml generation
2021-09-16 21:55:46 +08:00
Ming-Hung Tsai
0acc57d17f
[thin_restore (rust)] Fix errors in tests
...
- Move error messages to stderr (fixes unwritable_output_file,
input_file_not_found, and missing_input_option)
- Validate XML structures implicitly (fixes corrupted_input_data)
- Check output file size (fixes tiny_output_file)
- Provide XML error context
- Fix mk_valid_input()
2021-09-16 21:55:46 +08:00
Ming-Hung Tsai
aaa84aa35a
[tests] Enable tests for rust thin_repair
2021-09-16 21:55:46 +08:00
Ming-Hung Tsai
ea8dcb54d0
[tests] Fix the file size for testing
2021-09-16 21:55:46 +08:00
Ming-Hung Tsai
737cf2f67d
[tests] Refine trait names
2021-09-16 21:55:20 +08:00
Ming-Hung Tsai
47d39d1efa
[tests] Do not assume no stderr with thin_dump
2021-09-10 23:50:36 +08:00
Joe Thornber
9aa36f017a
Merge pull request #188 from mingnus/2021-08-05-thin-repair-find-roots
...
Support broken superblock in thin_repair
2021-09-10 13:59:16 +01:00
Ming-Hung Tsai
0d87619a93
[thin_repair/thin_dump (rust)] Show repairing progress
2021-08-27 17:30:56 +08:00