2017-07-08 19:23:52 +01:00
|
|
|
|
// /***************************************************************************
|
2020-07-25 02:01:36 +01:00
|
|
|
|
// Aaru Data Preservation Suite
|
2017-07-08 19:23:52 +01:00
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
//
|
2021-03-01 00:52:03 +00:00
|
|
|
|
// Filename : NTFS.cs
|
2017-12-19 03:50:57 +00:00
|
|
|
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
2017-07-08 19:23:52 +01:00
|
|
|
|
//
|
2020-07-25 02:01:36 +01:00
|
|
|
|
// Component : Aaru unit testing.
|
2017-07-08 19:23:52 +01:00
|
|
|
|
//
|
|
|
|
|
|
// --[ License ] --------------------------------------------------------------
|
|
|
|
|
|
//
|
|
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
|
|
// it under the terms of the GNU General Public License as
|
|
|
|
|
|
// published by the Free Software Foundation, either version 3 of the
|
|
|
|
|
|
// License, or (at your option) any later version.
|
|
|
|
|
|
//
|
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
|
|
//
|
|
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
|
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
//
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
2022-12-03 16:07:10 +00:00
|
|
|
|
// Copyright © 2011-2023 Natalia Portillo
|
2017-07-08 19:23:52 +01:00
|
|
|
|
// ****************************************************************************/
|
2017-12-19 03:50:57 +00:00
|
|
|
|
|
2017-07-08 19:23:52 +01:00
|
|
|
|
using System.IO;
|
2020-02-27 00:33:26 +00:00
|
|
|
|
using Aaru.CommonTypes;
|
|
|
|
|
|
using Aaru.CommonTypes.Interfaces;
|
2017-07-08 19:23:52 +01:00
|
|
|
|
using NUnit.Framework;
|
|
|
|
|
|
|
2022-11-15 15:58:43 +00:00
|
|
|
|
namespace Aaru.Tests.Filesystems.NTFS;
|
|
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
[TestFixture]
|
2023-10-04 08:29:56 +01:00
|
|
|
|
public class MBR() : FilesystemTest("ntfs")
|
2017-07-08 19:23:52 +01:00
|
|
|
|
{
|
2022-03-06 13:29:38 +00:00
|
|
|
|
public override string DataFolder =>
|
2022-11-13 05:48:58 +00:00
|
|
|
|
Path.Combine(Consts.TestFilesRoot, "Filesystems", "New Technology File System (MBR)");
|
2021-03-01 19:34:30 +00:00
|
|
|
|
|
2022-11-15 15:58:43 +00:00
|
|
|
|
public override IFilesystem Plugin => new Aaru.Filesystems.NTFS();
|
2022-03-06 13:29:38 +00:00
|
|
|
|
public override bool Partitions => true;
|
2021-03-01 19:34:30 +00:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
public override FileSystemTest[] Tests => new[]
|
|
|
|
|
|
{
|
|
|
|
|
|
new FileSystemTest
|
|
|
|
|
|
{
|
|
|
|
|
|
TestFile = "win10.aif",
|
|
|
|
|
|
MediaType = MediaType.GENERIC_HDD,
|
|
|
|
|
|
Sectors = 524288,
|
|
|
|
|
|
SectorSize = 512,
|
|
|
|
|
|
Bootable = true,
|
|
|
|
|
|
Clusters = 65263,
|
|
|
|
|
|
ClusterSize = 4096,
|
|
|
|
|
|
VolumeSerial = "C46C1B3C6C1B28A6"
|
|
|
|
|
|
},
|
|
|
|
|
|
new FileSystemTest
|
|
|
|
|
|
{
|
|
|
|
|
|
TestFile = "win2000.aif",
|
|
|
|
|
|
MediaType = MediaType.GENERIC_HDD,
|
|
|
|
|
|
Sectors = 2097152,
|
|
|
|
|
|
SectorSize = 512,
|
|
|
|
|
|
Bootable = true,
|
|
|
|
|
|
Clusters = 1046511,
|
|
|
|
|
|
ClusterSize = 1024,
|
|
|
|
|
|
VolumeSerial = "8070C8EC70C8E9CC"
|
|
|
|
|
|
},
|
|
|
|
|
|
new FileSystemTest
|
|
|
|
|
|
{
|
|
|
|
|
|
TestFile = "winnt_3.10.aif",
|
|
|
|
|
|
MediaType = MediaType.GENERIC_HDD,
|
|
|
|
|
|
Sectors = 1024000,
|
|
|
|
|
|
SectorSize = 512,
|
|
|
|
|
|
Bootable = true,
|
|
|
|
|
|
Clusters = 1023057,
|
|
|
|
|
|
ClusterSize = 512,
|
|
|
|
|
|
VolumeSerial = "10CC6AC6CC6AA5A6"
|
|
|
|
|
|
},
|
|
|
|
|
|
new FileSystemTest
|
|
|
|
|
|
{
|
|
|
|
|
|
TestFile = "winnt_3.50.aif",
|
|
|
|
|
|
MediaType = MediaType.GENERIC_HDD,
|
|
|
|
|
|
Sectors = 524288,
|
|
|
|
|
|
SectorSize = 512,
|
|
|
|
|
|
Bootable = true,
|
|
|
|
|
|
Clusters = 524256,
|
|
|
|
|
|
ClusterSize = 512,
|
|
|
|
|
|
VolumeSerial = "7A14F50014F4BFE5"
|
|
|
|
|
|
},
|
|
|
|
|
|
new FileSystemTest
|
|
|
|
|
|
{
|
|
|
|
|
|
TestFile = "winnt_3.51.aif",
|
|
|
|
|
|
MediaType = MediaType.GENERIC_HDD,
|
|
|
|
|
|
Sectors = 524288,
|
|
|
|
|
|
SectorSize = 512,
|
|
|
|
|
|
Bootable = true,
|
|
|
|
|
|
Clusters = 524256,
|
|
|
|
|
|
ClusterSize = 512,
|
|
|
|
|
|
VolumeSerial = "24884447884419A6"
|
|
|
|
|
|
},
|
|
|
|
|
|
new FileSystemTest
|
|
|
|
|
|
{
|
|
|
|
|
|
TestFile = "winnt_4.00.aif",
|
|
|
|
|
|
MediaType = MediaType.GENERIC_HDD,
|
|
|
|
|
|
Sectors = 262144,
|
|
|
|
|
|
SectorSize = 512,
|
|
|
|
|
|
Bootable = true,
|
|
|
|
|
|
Clusters = 262016,
|
|
|
|
|
|
ClusterSize = 512,
|
|
|
|
|
|
VolumeSerial = "DE047EC1047E9C69"
|
|
|
|
|
|
},
|
|
|
|
|
|
new FileSystemTest
|
|
|
|
|
|
{
|
|
|
|
|
|
TestFile = "winvista.aif",
|
|
|
|
|
|
MediaType = MediaType.GENERIC_HDD,
|
|
|
|
|
|
Sectors = 524288,
|
|
|
|
|
|
SectorSize = 512,
|
|
|
|
|
|
Bootable = true,
|
|
|
|
|
|
Clusters = 64767,
|
|
|
|
|
|
ClusterSize = 4096,
|
|
|
|
|
|
VolumeSerial = "E20AF54B0AF51D6B"
|
|
|
|
|
|
},
|
|
|
|
|
|
new FileSystemTest
|
|
|
|
|
|
{
|
|
|
|
|
|
TestFile = "linux.aif",
|
|
|
|
|
|
MediaType = MediaType.GENERIC_HDD,
|
|
|
|
|
|
Sectors = 262144,
|
|
|
|
|
|
SectorSize = 512,
|
|
|
|
|
|
Bootable = true,
|
|
|
|
|
|
Clusters = 32511,
|
|
|
|
|
|
ClusterSize = 4096,
|
|
|
|
|
|
VolumeSerial = "065BB96B7C1BCFDA"
|
|
|
|
|
|
},
|
|
|
|
|
|
new FileSystemTest
|
|
|
|
|
|
{
|
|
|
|
|
|
TestFile = "haiku_hrev51259.aif",
|
|
|
|
|
|
MediaType = MediaType.GENERIC_HDD,
|
|
|
|
|
|
Sectors = 262144,
|
|
|
|
|
|
SectorSize = 512,
|
|
|
|
|
|
Bootable = true,
|
|
|
|
|
|
Clusters = 32511,
|
|
|
|
|
|
ClusterSize = 4096,
|
|
|
|
|
|
VolumeSerial = "323BED1E2A2FF4D5"
|
|
|
|
|
|
},
|
|
|
|
|
|
new FileSystemTest
|
2017-12-19 20:33:03 +00:00
|
|
|
|
{
|
2022-03-06 13:29:38 +00:00
|
|
|
|
TestFile = "linux_4.19_ntfs3g_flashdrive.aif",
|
|
|
|
|
|
MediaType = MediaType.GENERIC_HDD,
|
|
|
|
|
|
Sectors = 1024000,
|
|
|
|
|
|
SectorSize = 512,
|
|
|
|
|
|
Bootable = true,
|
|
|
|
|
|
Clusters = 127743,
|
|
|
|
|
|
ClusterSize = 4096,
|
|
|
|
|
|
VolumeSerial = "1FC3802B52F9611C"
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
2017-12-19 20:33:03 +00:00
|
|
|
|
}
|