()
| 2355 | use crate::qcow_common::unit_tests::compress_allocated_clusters; |
| 2356 | |
| 2357 | fn valid_header_v3() -> Vec<u8> { |
| 2358 | vec![ |
| 2359 | 0x51u8, 0x46, 0x49, 0xfb, // magic |
| 2360 | 0x00, 0x00, 0x00, 0x03, // version |
| 2361 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // backing file offset |
| 2362 | 0x00, 0x00, 0x00, 0x00, // backing file size |
| 2363 | 0x00, 0x00, 0x00, 0x10, // cluster_bits |
| 2364 | 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, // size |
| 2365 | 0x00, 0x00, 0x00, 0x00, // crypt method |
| 2366 | 0x00, 0x00, 0x01, 0x00, // L1 size |
| 2367 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // L1 table offset |
| 2368 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // refcount table offset |
| 2369 | 0x00, 0x00, 0x00, 0x03, // refcount table clusters |
| 2370 | 0x00, 0x00, 0x00, 0x00, // nb snapshots |
| 2371 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // snapshots offset |
| 2372 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // incompatible_features |
| 2373 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // compatible_features |
| 2374 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // autoclear_features |
| 2375 | 0x00, 0x00, 0x00, 0x04, // refcount_order |
| 2376 | 0x00, 0x00, 0x00, 0x68, // header_length |
| 2377 | ] |
| 2378 | } |
| 2379 | |
| 2380 | fn valid_header_v2() -> Vec<u8> { |
| 2381 | vec![ |
no outgoing calls