From 6d8d3e76387f46b4a802c70c6552d60ca1c79446 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Tue, 13 Jul 2021 20:05:06 +0100 Subject: [PATCH] Add test for contents of QEMU disk images. --- Aaru.Tests/Images/QEMU/HyperV.cs | 10 +++++++++- Aaru.Tests/Images/QEMU/Parallels.cs | 10 +++++++++- Aaru.Tests/Images/QEMU/QCOW.cs | 10 +++++++++- Aaru.Tests/Images/QEMU/QCOW2.cs | 20 +++++++++++++++++-- Aaru.Tests/Images/QEMU/QCOW3.cs | 20 +++++++++++++++++-- Aaru.Tests/Images/QEMU/QED.cs | 10 +++++++++- Aaru.Tests/Images/QEMU/Raw.cs | 10 +++++++++- Aaru.Tests/Images/QEMU/VMware5.cs | 10 +++++++++- Aaru.Tests/Images/QEMU/VMware6.cs | 10 +++++++++- Aaru.Tests/Images/QEMU/VirtualBox.cs | 10 +++++++++- Aaru.Tests/Images/QEMU/VirtualPC.cs | 30 +++++++++++++++++++++++++--- 11 files changed, 135 insertions(+), 15 deletions(-) diff --git a/Aaru.Tests/Images/QEMU/HyperV.cs b/Aaru.Tests/Images/QEMU/HyperV.cs index 50752878b..6788b892e 100644 --- a/Aaru.Tests/Images/QEMU/HyperV.cs +++ b/Aaru.Tests/Images/QEMU/HyperV.cs @@ -49,7 +49,15 @@ namespace Aaru.Tests.Images.QEMU MediaType = MediaType.GENERIC_HDD, Sectors = 251904, SectorSize = 512, - MD5 = "4bfc9e9e2dd86aa52ef709e77d2617ed" + MD5 = "4bfc9e9e2dd86aa52ef709e77d2617ed", + Partitions = new[] + { + new BlockPartitionVolumes + { + Start = 63, + Length = 251841 + } + } } }; } diff --git a/Aaru.Tests/Images/QEMU/Parallels.cs b/Aaru.Tests/Images/QEMU/Parallels.cs index 0533ea40b..7a8ec12a7 100644 --- a/Aaru.Tests/Images/QEMU/Parallels.cs +++ b/Aaru.Tests/Images/QEMU/Parallels.cs @@ -48,7 +48,15 @@ namespace Aaru.Tests.Images.QEMU MediaType = MediaType.GENERIC_HDD, Sectors = 251904, SectorSize = 512, - MD5 = "4bfc9e9e2dd86aa52ef709e77d2617ed" + MD5 = "4bfc9e9e2dd86aa52ef709e77d2617ed", + Partitions = new[] + { + new BlockPartitionVolumes + { + Start = 63, + Length = 251841 + } + } } }; } diff --git a/Aaru.Tests/Images/QEMU/QCOW.cs b/Aaru.Tests/Images/QEMU/QCOW.cs index 9cde89b8e..15d1e32f6 100644 --- a/Aaru.Tests/Images/QEMU/QCOW.cs +++ b/Aaru.Tests/Images/QEMU/QCOW.cs @@ -49,7 +49,15 @@ namespace Aaru.Tests.Images.QEMU MediaType = MediaType.GENERIC_HDD, Sectors = 251904, SectorSize = 512, - MD5 = "4bfc9e9e2dd86aa52ef709e77d2617ed" + MD5 = "4bfc9e9e2dd86aa52ef709e77d2617ed", + Partitions = new[] + { + new BlockPartitionVolumes + { + Start = 63, + Length = 251841 + } + } } }; } diff --git a/Aaru.Tests/Images/QEMU/QCOW2.cs b/Aaru.Tests/Images/QEMU/QCOW2.cs index 508a4c2bc..1a9a393ac 100644 --- a/Aaru.Tests/Images/QEMU/QCOW2.cs +++ b/Aaru.Tests/Images/QEMU/QCOW2.cs @@ -49,7 +49,15 @@ namespace Aaru.Tests.Images.QEMU MediaType = MediaType.GENERIC_HDD, Sectors = 251904, SectorSize = 512, - MD5 = "4bfc9e9e2dd86aa52ef709e77d2617ed" + MD5 = "4bfc9e9e2dd86aa52ef709e77d2617ed", + Partitions = new[] + { + new BlockPartitionVolumes + { + Start = 63, + Length = 251841 + } + } }, new BlockImageTestExpected { @@ -57,7 +65,15 @@ namespace Aaru.Tests.Images.QEMU MediaType = MediaType.GENERIC_HDD, Sectors = 251904, SectorSize = 512, - MD5 = "4bfc9e9e2dd86aa52ef709e77d2617ed" + MD5 = "4bfc9e9e2dd86aa52ef709e77d2617ed", + Partitions = new[] + { + new BlockPartitionVolumes + { + Start = 63, + Length = 251841 + } + } } }; } diff --git a/Aaru.Tests/Images/QEMU/QCOW3.cs b/Aaru.Tests/Images/QEMU/QCOW3.cs index 864ad617a..90757db52 100644 --- a/Aaru.Tests/Images/QEMU/QCOW3.cs +++ b/Aaru.Tests/Images/QEMU/QCOW3.cs @@ -49,7 +49,15 @@ namespace Aaru.Tests.Images.QEMU MediaType = MediaType.GENERIC_HDD, Sectors = 251904, SectorSize = 512, - MD5 = "4bfc9e9e2dd86aa52ef709e77d2617ed" + MD5 = "4bfc9e9e2dd86aa52ef709e77d2617ed", + Partitions = new[] + { + new BlockPartitionVolumes + { + Start = 63, + Length = 251841 + } + } }, new BlockImageTestExpected { @@ -57,7 +65,15 @@ namespace Aaru.Tests.Images.QEMU MediaType = MediaType.GENERIC_HDD, Sectors = 251904, SectorSize = 512, - MD5 = "4bfc9e9e2dd86aa52ef709e77d2617ed" + MD5 = "4bfc9e9e2dd86aa52ef709e77d2617ed", + Partitions = new[] + { + new BlockPartitionVolumes + { + Start = 63, + Length = 251841 + } + } } }; } diff --git a/Aaru.Tests/Images/QEMU/QED.cs b/Aaru.Tests/Images/QEMU/QED.cs index d63ed903d..9d8bcc905 100644 --- a/Aaru.Tests/Images/QEMU/QED.cs +++ b/Aaru.Tests/Images/QEMU/QED.cs @@ -49,7 +49,15 @@ namespace Aaru.Tests.Images.QEMU MediaType = MediaType.GENERIC_HDD, Sectors = 251904, SectorSize = 512, - MD5 = "4bfc9e9e2dd86aa52ef709e77d2617ed" + MD5 = "4bfc9e9e2dd86aa52ef709e77d2617ed", + Partitions = new[] + { + new BlockPartitionVolumes + { + Start = 63, + Length = 251841 + } + } } }; } diff --git a/Aaru.Tests/Images/QEMU/Raw.cs b/Aaru.Tests/Images/QEMU/Raw.cs index e618eb35b..d36463e80 100644 --- a/Aaru.Tests/Images/QEMU/Raw.cs +++ b/Aaru.Tests/Images/QEMU/Raw.cs @@ -48,7 +48,15 @@ namespace Aaru.Tests.Images.QEMU MediaType = MediaType.GENERIC_HDD, Sectors = 251904, SectorSize = 512, - MD5 = "4bfc9e9e2dd86aa52ef709e77d2617ed" + MD5 = "4bfc9e9e2dd86aa52ef709e77d2617ed", + Partitions = new[] + { + new BlockPartitionVolumes + { + Start = 63, + Length = 251841 + } + } } }; } diff --git a/Aaru.Tests/Images/QEMU/VMware5.cs b/Aaru.Tests/Images/QEMU/VMware5.cs index 2b4c1838e..f9c9fb0c4 100644 --- a/Aaru.Tests/Images/QEMU/VMware5.cs +++ b/Aaru.Tests/Images/QEMU/VMware5.cs @@ -49,7 +49,15 @@ namespace Aaru.Tests.Images.QEMU MediaType = MediaType.GENERIC_HDD, Sectors = 251904, SectorSize = 512, - MD5 = "1ad282643cc7f97c57dc874b3d4ece9b" + MD5 = "1ad282643cc7f97c57dc874b3d4ece9b", + Partitions = new[] + { + new BlockPartitionVolumes + { + Start = 63, + Length = 251841 + } + } } }; } diff --git a/Aaru.Tests/Images/QEMU/VMware6.cs b/Aaru.Tests/Images/QEMU/VMware6.cs index d53b50e19..c7191e73b 100644 --- a/Aaru.Tests/Images/QEMU/VMware6.cs +++ b/Aaru.Tests/Images/QEMU/VMware6.cs @@ -49,7 +49,15 @@ namespace Aaru.Tests.Images.QEMU MediaType = MediaType.GENERIC_HDD, Sectors = 251904, SectorSize = 512, - MD5 = "1ad282643cc7f97c57dc874b3d4ece9b" + MD5 = "1ad282643cc7f97c57dc874b3d4ece9b", + Partitions = new[] + { + new BlockPartitionVolumes + { + Start = 63, + Length = 251841 + } + } } }; } diff --git a/Aaru.Tests/Images/QEMU/VirtualBox.cs b/Aaru.Tests/Images/QEMU/VirtualBox.cs index 1c5aed029..4a7d8623c 100644 --- a/Aaru.Tests/Images/QEMU/VirtualBox.cs +++ b/Aaru.Tests/Images/QEMU/VirtualBox.cs @@ -49,7 +49,15 @@ namespace Aaru.Tests.Images.QEMU MediaType = MediaType.GENERIC_HDD, Sectors = 251904, SectorSize = 512, - MD5 = "4bfc9e9e2dd86aa52ef709e77d2617ed" + MD5 = "4bfc9e9e2dd86aa52ef709e77d2617ed", + Partitions = new[] + { + new BlockPartitionVolumes + { + Start = 63, + Length = 251841 + } + } } }; } diff --git a/Aaru.Tests/Images/QEMU/VirtualPC.cs b/Aaru.Tests/Images/QEMU/VirtualPC.cs index 67be64847..0b2b1242c 100644 --- a/Aaru.Tests/Images/QEMU/VirtualPC.cs +++ b/Aaru.Tests/Images/QEMU/VirtualPC.cs @@ -49,7 +49,15 @@ namespace Aaru.Tests.Images.QEMU MediaType = MediaType.Unknown, Sectors = 512064, SectorSize = 512, - MD5 = "0435d6781d14d34a32c6ac40f5e70d35" + MD5 = "0435d6781d14d34a32c6ac40f5e70d35", + Partitions = new[] + { + new BlockPartitionVolumes + { + Start = 0, + Length = 512064 + } + } }, new BlockImageTestExpected { @@ -57,7 +65,15 @@ namespace Aaru.Tests.Images.QEMU MediaType = MediaType.Unknown, Sectors = 20536, SectorSize = 512, - MD5 = "adfad4fb019f157e868baa39e7753db7" + MD5 = "adfad4fb019f157e868baa39e7753db7", + Partitions = new[] + { + new BlockPartitionVolumes + { + Start = 0, + Length = 20536 + } + } }, new BlockImageTestExpected { @@ -65,7 +81,15 @@ namespace Aaru.Tests.Images.QEMU MediaType = MediaType.Unknown, Sectors = 251940, SectorSize = 512, - MD5 = "6246bff640cb3a56d2611e7f8616384d" + MD5 = "6246bff640cb3a56d2611e7f8616384d", + Partitions = new[] + { + new BlockPartitionVolumes + { + Start = 63, + Length = 251841 + } + } } }; }