|
|
|
@@ -15,72 +15,40 @@ public partial class DiskImageTests : BasicSetupHelper
|
|
|
|
|
FullRoundTrip((int)(50 * MiB), PartitionTableType.GPT, [(FileSystemType.FAT32, 0)]);
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage")]
|
|
|
|
|
public Task Test_GPT_NTFS()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsWindows())
|
|
|
|
|
Assert.Ignore("Test_GPT_NTFS is only supported on Windows.");
|
|
|
|
|
return FullRoundTrip((int)(50 * MiB), PartitionTableType.GPT, [(FileSystemType.NTFS, 0)]);
|
|
|
|
|
}
|
|
|
|
|
public Task Test_GPT_NTFS() =>
|
|
|
|
|
FullRoundTrip((int)(50 * MiB), PartitionTableType.GPT, [(FileSystemType.NTFS, 0)]);
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage")]
|
|
|
|
|
public Task Test_GPT_APFS()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsMacOS())
|
|
|
|
|
Assert.Ignore("APFS is only supported on macOS.");
|
|
|
|
|
return FullRoundTrip((int)(50 * MiB), PartitionTableType.GPT, [(FileSystemType.APFS, 0)]);
|
|
|
|
|
}
|
|
|
|
|
public Task Test_GPT_APFS() =>
|
|
|
|
|
FullRoundTrip((int)(50 * MiB), PartitionTableType.GPT, [(FileSystemType.APFS, 0)]);
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_GPT_HFSPlus()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsMacOS())
|
|
|
|
|
Assert.Ignore("HFSPlus is only supported on macOS.");
|
|
|
|
|
return FullRoundTrip((int)(50 * MiB), PartitionTableType.GPT, [(FileSystemType.HFSPlus, 0)]);
|
|
|
|
|
}
|
|
|
|
|
public Task Test_GPT_HFSPlus() =>
|
|
|
|
|
FullRoundTrip((int)(50 * MiB), PartitionTableType.GPT, [(FileSystemType.HFSPlus, 0)]);
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_GPT_ExFAT() =>
|
|
|
|
|
FullRoundTrip((int)(50 * MiB), PartitionTableType.GPT, [(FileSystemType.ExFAT, 0)]);
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_GPT_Ext2()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsLinux())
|
|
|
|
|
Assert.Ignore("Ext2 is only supported on Linux.");
|
|
|
|
|
return FullRoundTrip((int)(50 * MiB), PartitionTableType.GPT, [(FileSystemType.Ext2, 0)]);
|
|
|
|
|
}
|
|
|
|
|
public Task Test_GPT_Ext2() =>
|
|
|
|
|
FullRoundTrip((int)(50 * MiB), PartitionTableType.GPT, [(FileSystemType.Ext2, 0)]);
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_GPT_Ext3()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsLinux())
|
|
|
|
|
Assert.Ignore("Ext3 is only supported on Linux.");
|
|
|
|
|
return FullRoundTrip((int)(50 * MiB), PartitionTableType.GPT, [(FileSystemType.Ext3, 0)]);
|
|
|
|
|
}
|
|
|
|
|
public Task Test_GPT_Ext3() =>
|
|
|
|
|
FullRoundTrip((int)(50 * MiB), PartitionTableType.GPT, [(FileSystemType.Ext3, 0)]);
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage")]
|
|
|
|
|
public Task Test_GPT_Ext4()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsLinux())
|
|
|
|
|
Assert.Ignore("Ext4 is only supported on Linux.");
|
|
|
|
|
return FullRoundTrip((int)(50 * MiB), PartitionTableType.GPT, [(FileSystemType.Ext4, 0)]);
|
|
|
|
|
}
|
|
|
|
|
public Task Test_GPT_Ext4() =>
|
|
|
|
|
FullRoundTrip((int)(50 * MiB), PartitionTableType.GPT, [(FileSystemType.Ext4, 0)]);
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_GPT_XFS()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsLinux())
|
|
|
|
|
Assert.Ignore("XFS is only supported on Linux.");
|
|
|
|
|
return FullRoundTrip((int)(310 * MiB), PartitionTableType.GPT, [(FileSystemType.XFS, 0)]);
|
|
|
|
|
}
|
|
|
|
|
public Task Test_GPT_XFS() =>
|
|
|
|
|
FullRoundTrip((int)(310 * MiB), PartitionTableType.GPT, [(FileSystemType.XFS, 0)]);
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_GPT_Btrfs()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsLinux())
|
|
|
|
|
Assert.Ignore("Btrfs is only supported on Linux.");
|
|
|
|
|
return FullRoundTrip((int)(110 * MiB), PartitionTableType.GPT, [(FileSystemType.Btrfs, 0)]);
|
|
|
|
|
}
|
|
|
|
|
public Task Test_GPT_Btrfs() =>
|
|
|
|
|
FullRoundTrip((int)(110 * MiB), PartitionTableType.GPT, [(FileSystemType.Btrfs, 0)]);
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
@@ -93,64 +61,36 @@ public partial class DiskImageTests : BasicSetupHelper
|
|
|
|
|
FullRoundTrip((int)(50 * MiB), PartitionTableType.MBR, [(FileSystemType.FAT32, 0)]);
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_MBR_HFSPlus()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsMacOS())
|
|
|
|
|
Assert.Ignore("HFSPlus is only supported on macOS.");
|
|
|
|
|
return FullRoundTrip((int)(50 * MiB), PartitionTableType.MBR, [(FileSystemType.HFSPlus, 0)]);
|
|
|
|
|
}
|
|
|
|
|
public Task Test_MBR_HFSPlus() =>
|
|
|
|
|
FullRoundTrip((int)(50 * MiB), PartitionTableType.MBR, [(FileSystemType.HFSPlus, 0)]);
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_MBR_ExFAT() =>
|
|
|
|
|
FullRoundTrip((int)(50 * MiB), PartitionTableType.MBR, [(FileSystemType.ExFAT, 0)]);
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_MBR_NTFS()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsWindows())
|
|
|
|
|
Assert.Ignore("Test_MBR_NTFS is only supported on Windows.");
|
|
|
|
|
return FullRoundTrip((int)(50 * MiB), PartitionTableType.MBR, [(FileSystemType.NTFS, 0)]);
|
|
|
|
|
}
|
|
|
|
|
public Task Test_MBR_NTFS() =>
|
|
|
|
|
FullRoundTrip((int)(50 * MiB), PartitionTableType.MBR, [(FileSystemType.NTFS, 0)]);
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_MBR_Ext2()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsLinux())
|
|
|
|
|
Assert.Ignore("Ext2 is only supported on Linux.");
|
|
|
|
|
return FullRoundTrip((int)(50 * MiB), PartitionTableType.MBR, [(FileSystemType.Ext2, 0)]);
|
|
|
|
|
}
|
|
|
|
|
public Task Test_MBR_Ext2() =>
|
|
|
|
|
FullRoundTrip((int)(50 * MiB), PartitionTableType.MBR, [(FileSystemType.Ext2, 0)]);
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_MBR_Ext3()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsLinux())
|
|
|
|
|
Assert.Ignore("Ext3 is only supported on Linux.");
|
|
|
|
|
return FullRoundTrip((int)(50 * MiB), PartitionTableType.MBR, [(FileSystemType.Ext3, 0)]);
|
|
|
|
|
}
|
|
|
|
|
public Task Test_MBR_Ext3() =>
|
|
|
|
|
FullRoundTrip((int)(50 * MiB), PartitionTableType.MBR, [(FileSystemType.Ext3, 0)]);
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_MBR_Ext4()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsLinux())
|
|
|
|
|
Assert.Ignore("Ext4 is only supported on Linux.");
|
|
|
|
|
return FullRoundTrip((int)(50 * MiB), PartitionTableType.MBR, [(FileSystemType.Ext4, 0)]);
|
|
|
|
|
}
|
|
|
|
|
public Task Test_MBR_Ext4() =>
|
|
|
|
|
FullRoundTrip((int)(50 * MiB), PartitionTableType.MBR, [(FileSystemType.Ext4, 0)]);
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_MBR_XFS()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsLinux())
|
|
|
|
|
Assert.Ignore("XFS is only supported on Linux.");
|
|
|
|
|
return FullRoundTrip((int)(310 * MiB), PartitionTableType.MBR, [(FileSystemType.XFS, 0)]);
|
|
|
|
|
}
|
|
|
|
|
public Task Test_MBR_XFS() =>
|
|
|
|
|
FullRoundTrip((int)(310 * MiB), PartitionTableType.MBR, [(FileSystemType.XFS, 0)]);
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_MBR_Btrfs()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsLinux())
|
|
|
|
|
Assert.Ignore("Btrfs is only supported on Linux.");
|
|
|
|
|
return FullRoundTrip((int)(110 * MiB), PartitionTableType.MBR, [(FileSystemType.Btrfs, 0)]);
|
|
|
|
|
}
|
|
|
|
|
public Task Test_MBR_Btrfs() =>
|
|
|
|
|
FullRoundTrip((int)(110 * MiB), PartitionTableType.MBR, [(FileSystemType.Btrfs, 0)]);
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
@@ -172,59 +112,39 @@ public partial class DiskImageTests : BasicSetupHelper
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage")]
|
|
|
|
|
public Task Test_GPT_APFS_APFS()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsMacOS())
|
|
|
|
|
Assert.Ignore("APFS is only supported on macOS.");
|
|
|
|
|
return FullRoundTrip((int)(100 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
public Task Test_GPT_APFS_APFS() =>
|
|
|
|
|
FullRoundTrip((int)(100 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
(FileSystemType.APFS, 50 * MiB),
|
|
|
|
|
(FileSystemType.APFS, 0)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_GPT_HFSPlus_HFSPlus()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsMacOS())
|
|
|
|
|
Assert.Ignore("HFSPlus is only supported on macOS.");
|
|
|
|
|
return FullRoundTrip((int)(100 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
public Task Test_GPT_HFSPlus_HFSPlus() =>
|
|
|
|
|
FullRoundTrip((int)(100 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
(FileSystemType.HFSPlus, 50 * MiB),
|
|
|
|
|
(FileSystemType.HFSPlus, 0)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_GPT_APFS_HFSPlus()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsMacOS())
|
|
|
|
|
Assert.Ignore("APFS and HFSPlus are only supported on macOS.");
|
|
|
|
|
return FullRoundTrip((int)(100 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
public Task Test_GPT_APFS_HFSPlus() =>
|
|
|
|
|
FullRoundTrip((int)(100 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
(FileSystemType.APFS, 50 * MiB),
|
|
|
|
|
(FileSystemType.HFSPlus, 0)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_GPT_FAT32_APFS()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsMacOS())
|
|
|
|
|
Assert.Ignore("APFS is only supported on macOS.");
|
|
|
|
|
return FullRoundTrip((int)(100 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
public Task Test_GPT_FAT32_APFS() =>
|
|
|
|
|
FullRoundTrip((int)(100 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
(FileSystemType.FAT32, 50 * MiB),
|
|
|
|
|
(FileSystemType.APFS, 0)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_GPT_ExFAT_HFSPlus()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsMacOS())
|
|
|
|
|
Assert.Ignore("HFSPlus is only supported on macOS.");
|
|
|
|
|
return FullRoundTrip((int)(100 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
public Task Test_GPT_ExFAT_HFSPlus() =>
|
|
|
|
|
FullRoundTrip((int)(100 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
(FileSystemType.ExFAT, 50 * MiB),
|
|
|
|
|
(FileSystemType.HFSPlus, 0)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_GPT_FAT32_ExFAT() =>
|
|
|
|
@@ -234,81 +154,53 @@ public partial class DiskImageTests : BasicSetupHelper
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_GPT_NTFS_FAT32()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsWindows())
|
|
|
|
|
Assert.Ignore("This test is only supported on Windows.");
|
|
|
|
|
return FullRoundTrip((int)(100 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
public Task Test_GPT_NTFS_FAT32() =>
|
|
|
|
|
FullRoundTrip((int)(100 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
(FileSystemType.NTFS, 50 * MiB),
|
|
|
|
|
(FileSystemType.FAT32, 0)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage")]
|
|
|
|
|
public Task Test_GPT_NTFS_NTFS()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsWindows())
|
|
|
|
|
Assert.Ignore("This test is only supported on Windows.");
|
|
|
|
|
return FullRoundTrip((int)(100 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
public Task Test_GPT_NTFS_NTFS() =>
|
|
|
|
|
FullRoundTrip((int)(100 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
(FileSystemType.NTFS, 50 * MiB),
|
|
|
|
|
(FileSystemType.NTFS, 0)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage")]
|
|
|
|
|
public Task Test_GPT_Ext4_Ext4()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsLinux())
|
|
|
|
|
Assert.Ignore("Ext4 is only supported on Linux.");
|
|
|
|
|
return FullRoundTrip((int)(100 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
public Task Test_GPT_Ext4_Ext4() =>
|
|
|
|
|
FullRoundTrip((int)(100 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
(FileSystemType.Ext4, 50 * MiB),
|
|
|
|
|
(FileSystemType.Ext4, 0)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_GPT_Ext4_FAT32()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsLinux())
|
|
|
|
|
Assert.Ignore("This test is only supported on Linux.");
|
|
|
|
|
return FullRoundTrip((int)(100 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
public Task Test_GPT_Ext4_FAT32() =>
|
|
|
|
|
FullRoundTrip((int)(100 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
(FileSystemType.Ext4, 50 * MiB),
|
|
|
|
|
(FileSystemType.FAT32, 0)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_GPT_Ext4_XFS()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsLinux())
|
|
|
|
|
Assert.Ignore("This test is only supported on Linux.");
|
|
|
|
|
return FullRoundTrip((int)(360 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
public Task Test_GPT_Ext4_XFS() =>
|
|
|
|
|
FullRoundTrip((int)(360 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
(FileSystemType.Ext4, 50 * MiB),
|
|
|
|
|
(FileSystemType.XFS, 0)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_GPT_XFS_FAT32()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsLinux())
|
|
|
|
|
Assert.Ignore("This test is only supported on Linux.");
|
|
|
|
|
return FullRoundTrip((int)(360 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
public Task Test_GPT_XFS_FAT32() =>
|
|
|
|
|
FullRoundTrip((int)(360 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
(FileSystemType.XFS, 310 * MiB),
|
|
|
|
|
(FileSystemType.FAT32, 0)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_GPT_Btrfs_FAT32()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsLinux())
|
|
|
|
|
Assert.Ignore("This test is only supported on Linux.");
|
|
|
|
|
return FullRoundTrip((int)(160 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
public Task Test_GPT_Btrfs_FAT32() =>
|
|
|
|
|
FullRoundTrip((int)(160 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
(FileSystemType.Btrfs, 110 * MiB),
|
|
|
|
|
(FileSystemType.FAT32, 0)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
@@ -324,248 +216,167 @@ public partial class DiskImageTests : BasicSetupHelper
|
|
|
|
|
// APFS is only supported on GPT partition tables.
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_MBR_HFSPlus_HFSPlus()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsMacOS())
|
|
|
|
|
Assert.Ignore("HFSPlus is only supported on macOS.");
|
|
|
|
|
return FullRoundTrip((int)(100 * MiB), PartitionTableType.MBR, [
|
|
|
|
|
public Task Test_MBR_HFSPlus_HFSPlus() =>
|
|
|
|
|
FullRoundTrip((int)(100 * MiB), PartitionTableType.MBR, [
|
|
|
|
|
(FileSystemType.HFSPlus, 50 * MiB),
|
|
|
|
|
(FileSystemType.HFSPlus, 0)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_MBR_FAT32_ExFAT()
|
|
|
|
|
{
|
|
|
|
|
return FullRoundTrip((int)(100 * MiB), PartitionTableType.MBR, [
|
|
|
|
|
public Task Test_MBR_FAT32_ExFAT() =>
|
|
|
|
|
FullRoundTrip((int)(100 * MiB), PartitionTableType.MBR, [
|
|
|
|
|
(FileSystemType.FAT32, 50 * MiB),
|
|
|
|
|
(FileSystemType.ExFAT, 0)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_MBR_FAT32_HFSPlus()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsMacOS())
|
|
|
|
|
Assert.Ignore("HFSPlus is only supported on macOS.");
|
|
|
|
|
return FullRoundTrip((int)(100 * MiB), PartitionTableType.MBR, [
|
|
|
|
|
public Task Test_MBR_FAT32_HFSPlus() =>
|
|
|
|
|
FullRoundTrip((int)(100 * MiB), PartitionTableType.MBR, [
|
|
|
|
|
(FileSystemType.FAT32, 50 * MiB),
|
|
|
|
|
(FileSystemType.HFSPlus, 0)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_MBR_NTFS_FAT32()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsWindows())
|
|
|
|
|
Assert.Ignore("This test is only supported on Windows.");
|
|
|
|
|
return FullRoundTrip((int)(100 * MiB), PartitionTableType.MBR, [
|
|
|
|
|
public Task Test_MBR_NTFS_FAT32() =>
|
|
|
|
|
FullRoundTrip((int)(100 * MiB), PartitionTableType.MBR, [
|
|
|
|
|
(FileSystemType.NTFS, 50 * MiB),
|
|
|
|
|
(FileSystemType.FAT32, 0)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_MBR_Ext4_Ext4()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsLinux())
|
|
|
|
|
Assert.Ignore("Ext4 is only supported on Linux.");
|
|
|
|
|
return FullRoundTrip((int)(100 * MiB), PartitionTableType.MBR, [
|
|
|
|
|
public Task Test_MBR_Ext4_Ext4() =>
|
|
|
|
|
FullRoundTrip((int)(100 * MiB), PartitionTableType.MBR, [
|
|
|
|
|
(FileSystemType.Ext4, 50 * MiB),
|
|
|
|
|
(FileSystemType.Ext4, 0)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_MBR_FAT32_Ext4()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsLinux())
|
|
|
|
|
Assert.Ignore("This test is only supported on Linux.");
|
|
|
|
|
return FullRoundTrip((int)(100 * MiB), PartitionTableType.MBR, [
|
|
|
|
|
public Task Test_MBR_FAT32_Ext4() =>
|
|
|
|
|
FullRoundTrip((int)(100 * MiB), PartitionTableType.MBR, [
|
|
|
|
|
(FileSystemType.FAT32, 50 * MiB),
|
|
|
|
|
(FileSystemType.Ext4, 0)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_MBR_XFS_Ext4()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsLinux())
|
|
|
|
|
Assert.Ignore("This test is only supported on Linux.");
|
|
|
|
|
return FullRoundTrip((int)(360 * MiB), PartitionTableType.MBR, [
|
|
|
|
|
public Task Test_MBR_XFS_Ext4() =>
|
|
|
|
|
FullRoundTrip((int)(360 * MiB), PartitionTableType.MBR, [
|
|
|
|
|
(FileSystemType.XFS, 310 * MiB),
|
|
|
|
|
(FileSystemType.Ext4, 0)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_MBR_Btrfs_Ext4()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsLinux())
|
|
|
|
|
Assert.Ignore("This test is only supported on Linux.");
|
|
|
|
|
return FullRoundTrip((int)(160 * MiB), PartitionTableType.MBR, [
|
|
|
|
|
public Task Test_MBR_Btrfs_Ext4() =>
|
|
|
|
|
FullRoundTrip((int)(160 * MiB), PartitionTableType.MBR, [
|
|
|
|
|
(FileSystemType.Btrfs, 110 * MiB),
|
|
|
|
|
(FileSystemType.Ext4, 0)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_MBR_XFS_Btrfs()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsLinux())
|
|
|
|
|
Assert.Ignore("This test is only supported on Linux.");
|
|
|
|
|
return FullRoundTrip((int)(420 * MiB), PartitionTableType.MBR, [
|
|
|
|
|
public Task Test_MBR_XFS_Btrfs() =>
|
|
|
|
|
FullRoundTrip((int)(420 * MiB), PartitionTableType.MBR, [
|
|
|
|
|
(FileSystemType.XFS, 310 * MiB),
|
|
|
|
|
(FileSystemType.Btrfs, 0)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region GPT Three Partitions
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage")]
|
|
|
|
|
public Task Test_GPT_FAT32_FAT32_FAT32()
|
|
|
|
|
{
|
|
|
|
|
return FullRoundTrip((int)(150 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
public Task Test_GPT_FAT32_FAT32_FAT32() =>
|
|
|
|
|
FullRoundTrip((int)(150 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
(FileSystemType.FAT32, 50 * MiB),
|
|
|
|
|
(FileSystemType.FAT32, 50 * MiB),
|
|
|
|
|
(FileSystemType.FAT32, 0)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage")]
|
|
|
|
|
public Task Test_GPT_APFS_APFS_APFS()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsMacOS())
|
|
|
|
|
Assert.Ignore("APFS is only supported on macOS.");
|
|
|
|
|
return FullRoundTrip((int)(150 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
public Task Test_GPT_APFS_APFS_APFS() =>
|
|
|
|
|
FullRoundTrip((int)(150 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
(FileSystemType.APFS, 50 * MiB),
|
|
|
|
|
(FileSystemType.APFS, 50 * MiB),
|
|
|
|
|
(FileSystemType.APFS, 0)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage")]
|
|
|
|
|
public Task Test_GPT_NTFS_NTFS_NTFS()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsWindows())
|
|
|
|
|
Assert.Ignore("NTFS is only supported on Windows.");
|
|
|
|
|
return FullRoundTrip((int)(150 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
public Task Test_GPT_NTFS_NTFS_NTFS() =>
|
|
|
|
|
FullRoundTrip((int)(150 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
(FileSystemType.NTFS, 50 * MiB),
|
|
|
|
|
(FileSystemType.NTFS, 50 * MiB),
|
|
|
|
|
(FileSystemType.NTFS, 0)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_GPT_HFSPlus_HFSPlus_HFSPlus()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsMacOS())
|
|
|
|
|
Assert.Ignore("HFSPlus is only supported on macOS.");
|
|
|
|
|
return FullRoundTrip((int)(150 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
public Task Test_GPT_HFSPlus_HFSPlus_HFSPlus() =>
|
|
|
|
|
FullRoundTrip((int)(150 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
(FileSystemType.HFSPlus, 50 * MiB),
|
|
|
|
|
(FileSystemType.HFSPlus, 50 * MiB),
|
|
|
|
|
(FileSystemType.HFSPlus, 0)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_GPT_APFS_HFSPlus_APFS()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsMacOS())
|
|
|
|
|
Assert.Ignore("APFS and HFSPlus are only supported on macOS.");
|
|
|
|
|
return FullRoundTrip((int)(150 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
public Task Test_GPT_APFS_HFSPlus_APFS() =>
|
|
|
|
|
FullRoundTrip((int)(150 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
(FileSystemType.APFS, 50 * MiB),
|
|
|
|
|
(FileSystemType.HFSPlus, 50 * MiB),
|
|
|
|
|
(FileSystemType.APFS, 0)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_GPT_FAT32_APFS_HFSPlus()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsMacOS())
|
|
|
|
|
Assert.Ignore("APFS and HFSPlus are only supported on macOS.");
|
|
|
|
|
return FullRoundTrip((int)(150 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
public Task Test_GPT_FAT32_APFS_HFSPlus() =>
|
|
|
|
|
FullRoundTrip((int)(150 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
(FileSystemType.FAT32, 50 * MiB),
|
|
|
|
|
(FileSystemType.APFS, 50 * MiB),
|
|
|
|
|
(FileSystemType.HFSPlus, 0)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_GPT_ExFAT_APFS_HFSPlus()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsMacOS())
|
|
|
|
|
Assert.Ignore("APFS and HFSPlus are only supported on macOS.");
|
|
|
|
|
return FullRoundTrip((int)(150 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
public Task Test_GPT_ExFAT_APFS_HFSPlus() =>
|
|
|
|
|
FullRoundTrip((int)(150 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
(FileSystemType.ExFAT, 50 * MiB),
|
|
|
|
|
(FileSystemType.APFS, 50 * MiB),
|
|
|
|
|
(FileSystemType.HFSPlus, 0)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage")]
|
|
|
|
|
public Task Test_GPT_Ext4_Ext4_Ext4()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsLinux())
|
|
|
|
|
Assert.Ignore("Ext4 is only supported on Linux.");
|
|
|
|
|
return FullRoundTrip((int)(150 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
public Task Test_GPT_Ext4_Ext4_Ext4() =>
|
|
|
|
|
FullRoundTrip((int)(150 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
(FileSystemType.Ext4, 50 * MiB),
|
|
|
|
|
(FileSystemType.Ext4, 50 * MiB),
|
|
|
|
|
(FileSystemType.Ext4, 0)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_GPT_FAT32_Ext4_XFS()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsLinux())
|
|
|
|
|
Assert.Ignore("This test is only supported on Linux.");
|
|
|
|
|
return FullRoundTrip((int)(410 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
public Task Test_GPT_FAT32_Ext4_XFS() =>
|
|
|
|
|
FullRoundTrip((int)(410 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
(FileSystemType.FAT32, 50 * MiB),
|
|
|
|
|
(FileSystemType.Ext4, 50 * MiB),
|
|
|
|
|
(FileSystemType.XFS, 0)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_GPT_Ext4_XFS_Btrfs()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsLinux())
|
|
|
|
|
Assert.Ignore("This test is only supported on Linux.");
|
|
|
|
|
return FullRoundTrip((int)(470 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
public Task Test_GPT_Ext4_XFS_Btrfs() =>
|
|
|
|
|
FullRoundTrip((int)(470 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
(FileSystemType.Ext4, 50 * MiB),
|
|
|
|
|
(FileSystemType.XFS, 310 * MiB),
|
|
|
|
|
(FileSystemType.Btrfs, 0)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_GPT_XFS_Ext4_Ext4()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsLinux())
|
|
|
|
|
Assert.Ignore("This test is only supported on Linux.");
|
|
|
|
|
return FullRoundTrip((int)(410 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
public Task Test_GPT_XFS_Ext4_Ext4() =>
|
|
|
|
|
FullRoundTrip((int)(410 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
(FileSystemType.XFS, 310 * MiB),
|
|
|
|
|
(FileSystemType.Ext4, 50 * MiB),
|
|
|
|
|
(FileSystemType.Ext4, 0)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_GPT_Btrfs_Ext4_FAT32()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsLinux())
|
|
|
|
|
Assert.Ignore("This test is only supported on Linux.");
|
|
|
|
|
return FullRoundTrip((int)(210 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
public Task Test_GPT_Btrfs_Ext4_FAT32() =>
|
|
|
|
|
FullRoundTrip((int)(210 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
(FileSystemType.Btrfs, 110 * MiB),
|
|
|
|
|
(FileSystemType.Ext4, 50 * MiB),
|
|
|
|
|
(FileSystemType.FAT32, 0)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
@@ -574,116 +385,90 @@ public partial class DiskImageTests : BasicSetupHelper
|
|
|
|
|
// APFS is only supported on GPT partition tables.
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_MBR_FAT32_FAT32_FAT32()
|
|
|
|
|
{
|
|
|
|
|
return FullRoundTrip((int)(150 * MiB), PartitionTableType.MBR, [
|
|
|
|
|
public Task Test_MBR_FAT32_FAT32_FAT32() =>
|
|
|
|
|
FullRoundTrip((int)(150 * MiB), PartitionTableType.MBR, [
|
|
|
|
|
(FileSystemType.FAT32, 50 * MiB),
|
|
|
|
|
(FileSystemType.FAT32, 50 * MiB),
|
|
|
|
|
(FileSystemType.FAT32, 0)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_MBR_HFSPlus_HFSPlus_HFSPlus()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsMacOS())
|
|
|
|
|
Assert.Ignore("HFSPlus is only supported on macOS.");
|
|
|
|
|
return FullRoundTrip((int)(150 * MiB), PartitionTableType.MBR, [
|
|
|
|
|
public Task Test_MBR_HFSPlus_HFSPlus_HFSPlus() =>
|
|
|
|
|
FullRoundTrip((int)(150 * MiB), PartitionTableType.MBR, [
|
|
|
|
|
(FileSystemType.HFSPlus, 50 * MiB),
|
|
|
|
|
(FileSystemType.HFSPlus, 50 * MiB),
|
|
|
|
|
(FileSystemType.HFSPlus, 0)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_MBR_FAT32_ExFAT_HFSPlus()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsMacOS())
|
|
|
|
|
Assert.Ignore("HFSPlus is only supported on macOS.");
|
|
|
|
|
return FullRoundTrip((int)(150 * MiB), PartitionTableType.MBR, [
|
|
|
|
|
public Task Test_MBR_FAT32_ExFAT_HFSPlus() =>
|
|
|
|
|
FullRoundTrip((int)(150 * MiB), PartitionTableType.MBR, [
|
|
|
|
|
(FileSystemType.FAT32, 50 * MiB),
|
|
|
|
|
(FileSystemType.ExFAT, 50 * MiB),
|
|
|
|
|
(FileSystemType.HFSPlus, 0)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// GPT NTFS for Windows - local-only (tested via single partition)
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_GPT_NTFS_FAT32_ExFAT()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsWindows())
|
|
|
|
|
Assert.Ignore("This test is only supported on Windows.");
|
|
|
|
|
return FullRoundTrip((int)(150 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
public Task Test_GPT_NTFS_FAT32_ExFAT() =>
|
|
|
|
|
FullRoundTrip((int)(150 * MiB), PartitionTableType.GPT, [
|
|
|
|
|
(FileSystemType.NTFS, 50 * MiB),
|
|
|
|
|
(FileSystemType.FAT32, 50 * MiB),
|
|
|
|
|
(FileSystemType.ExFAT, 0)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_MBR_Ext4_Ext4_Ext4()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsLinux())
|
|
|
|
|
Assert.Ignore("Ext4 is only supported on Linux.");
|
|
|
|
|
return FullRoundTrip((int)(150 * MiB), PartitionTableType.MBR, [
|
|
|
|
|
public Task Test_MBR_Ext4_Ext4_Ext4() =>
|
|
|
|
|
FullRoundTrip((int)(150 * MiB), PartitionTableType.MBR, [
|
|
|
|
|
(FileSystemType.Ext4, 50 * MiB),
|
|
|
|
|
(FileSystemType.Ext4, 50 * MiB),
|
|
|
|
|
(FileSystemType.Ext4, 0)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_MBR_FAT32_Ext4_XFS()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsLinux())
|
|
|
|
|
Assert.Ignore("This test is only supported on Linux.");
|
|
|
|
|
return FullRoundTrip((int)(410 * MiB), PartitionTableType.MBR, [
|
|
|
|
|
public Task Test_MBR_FAT32_Ext4_XFS() =>
|
|
|
|
|
FullRoundTrip((int)(410 * MiB), PartitionTableType.MBR, [
|
|
|
|
|
(FileSystemType.FAT32, 50 * MiB),
|
|
|
|
|
(FileSystemType.Ext4, 50 * MiB),
|
|
|
|
|
(FileSystemType.XFS, 0)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_MBR_Ext4_XFS_Btrfs()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsLinux())
|
|
|
|
|
Assert.Ignore("This test is only supported on Linux.");
|
|
|
|
|
return FullRoundTrip((int)(470 * MiB), PartitionTableType.MBR, [
|
|
|
|
|
public Task Test_MBR_Ext4_XFS_Btrfs() =>
|
|
|
|
|
FullRoundTrip((int)(470 * MiB), PartitionTableType.MBR, [
|
|
|
|
|
(FileSystemType.Ext4, 50 * MiB),
|
|
|
|
|
(FileSystemType.XFS, 310 * MiB),
|
|
|
|
|
(FileSystemType.Btrfs, 0)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_MBR_XFS_Btrfs_Ext4()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsLinux())
|
|
|
|
|
Assert.Ignore("This test is only supported on Linux.");
|
|
|
|
|
return FullRoundTrip((int)(470 * MiB), PartitionTableType.MBR, [
|
|
|
|
|
public Task Test_MBR_XFS_Btrfs_Ext4() =>
|
|
|
|
|
FullRoundTrip((int)(470 * MiB), PartitionTableType.MBR, [
|
|
|
|
|
(FileSystemType.XFS, 310 * MiB),
|
|
|
|
|
(FileSystemType.Btrfs, 110 * MiB),
|
|
|
|
|
(FileSystemType.Ext4, 0)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test, Category("DiskImage"), Category("DiskImageLocal")]
|
|
|
|
|
public Task Test_MBR_Btrfs_Ext4_XFS()
|
|
|
|
|
{
|
|
|
|
|
if (!OperatingSystem.IsLinux())
|
|
|
|
|
Assert.Ignore("This test is only supported on Linux.");
|
|
|
|
|
return FullRoundTrip((int)(470 * MiB), PartitionTableType.MBR, [
|
|
|
|
|
public Task Test_MBR_Btrfs_Ext4_XFS() =>
|
|
|
|
|
FullRoundTrip((int)(470 * MiB), PartitionTableType.MBR, [
|
|
|
|
|
(FileSystemType.Btrfs, 110 * MiB),
|
|
|
|
|
(FileSystemType.Ext4, 50 * MiB),
|
|
|
|
|
(FileSystemType.XFS, 0)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
public async Task FullRoundTrip(int size, PartitionTableType tableType, (FileSystemType, long)[] partitions)
|
|
|
|
|
{
|
|
|
|
|
// Check if all specified file system types are supported before starting the test
|
|
|
|
|
foreach (var (fsType, partSize) in partitions)
|
|
|
|
|
{
|
|
|
|
|
var (isSupported, reason) = _diskHelper.IsFileSystemTypeSupported(fsType);
|
|
|
|
|
if (!isSupported)
|
|
|
|
|
Assert.Ignore(reason);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
await TestContext.Progress.WriteLineAsync("Test: Full Round-Trip Backup + Restore");
|
|
|
|
|
|
|
|
|
|
var sourceDrivePath = _diskHelper.CreateDisk(_sourceImagePath, size);
|
|
|
|
|