2017-12-19 03:50:57 +00: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 : HFS.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/>.
|
|
|
|
|
|
//
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
2020-12-31 23:08:23 +00:00
|
|
|
|
// Copyright © 2011-2021 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;
|
|
|
|
|
|
using Aaru.Filesystems;
|
2017-07-08 19:23:52 +01:00
|
|
|
|
using NUnit.Framework;
|
|
|
|
|
|
|
2021-03-01 00:52:03 +00:00
|
|
|
|
namespace Aaru.Tests.Filesystems.HFS
|
2017-07-08 19:23:52 +01:00
|
|
|
|
{
|
|
|
|
|
|
[TestFixture]
|
2021-03-01 19:34:30 +00:00
|
|
|
|
public class APM : FilesystemTest
|
2017-07-08 19:23:52 +01:00
|
|
|
|
{
|
2021-03-01 19:34:30 +00:00
|
|
|
|
public APM() : base("HFS") {}
|
|
|
|
|
|
|
|
|
|
|
|
public override string _dataFolder => Path.Combine(Consts.TEST_FILES_ROOT, "Filesystems", "Apple HFS (APM)");
|
|
|
|
|
|
public override IFilesystem _plugin => new AppleHFS();
|
|
|
|
|
|
public override bool _partitions => true;
|
|
|
|
|
|
|
|
|
|
|
|
public override string[] _testFiles => new[]
|
2020-02-29 18:03:35 +00:00
|
|
|
|
{
|
2021-03-01 00:52:03 +00:00
|
|
|
|
"amigaos_3.9.aif", "darwin_1.3.1.aif", "darwin_1.4.1.aif", "darwin_6.0.2.aif", "darwin_8.0.1.aif",
|
|
|
|
|
|
"macos_1.1.aif", "macos_2.0.aif", "macos_6.0.7.aif", "macos_7.5.3.aif", "macos_7.5.aif", "macos_7.6.aif",
|
|
|
|
|
|
"macos_8.0.aif", "macos_8.1.aif", "macos_9.0.4.aif", "macos_9.1.aif", "macos_9.2.1.aif", "macos_9.2.2.aif",
|
|
|
|
|
|
"macosx_10.2.aif", "macosx_10.3.aif", "macosx_10.4.aif", "rhapsody_dr1.aif", "d2_driver.aif", "hdt_1.8.aif",
|
|
|
|
|
|
"macos_4.2.aif", "macos_4.3.aif", "macos_6.0.2.aif", "macos_6.0.3.aif", "macos_6.0.4.aif",
|
|
|
|
|
|
"macos_6.0.5.aif", "macos_6.0.8.aif", "macos_6.0.aif", "macos_7.0.aif", "macos_7.1.1.aif", "parted.aif",
|
|
|
|
|
|
"silverlining_2.2.1.aif", "speedtools_3.6.aif", "vcpformatter_2.1.1.aif"
|
2020-02-29 18:03:35 +00:00
|
|
|
|
};
|
2021-03-01 19:34:30 +00:00
|
|
|
|
public override MediaType[] _mediaTypes => new[]
|
|
|
|
|
|
{
|
|
|
|
|
|
MediaType.GENERIC_HDD, MediaType.GENERIC_HDD, MediaType.GENERIC_HDD, MediaType.GENERIC_HDD,
|
|
|
|
|
|
MediaType.GENERIC_HDD, MediaType.GENERIC_HDD, MediaType.GENERIC_HDD, MediaType.GENERIC_HDD,
|
|
|
|
|
|
MediaType.GENERIC_HDD, MediaType.GENERIC_HDD, MediaType.GENERIC_HDD, MediaType.GENERIC_HDD,
|
|
|
|
|
|
MediaType.GENERIC_HDD, MediaType.GENERIC_HDD, MediaType.GENERIC_HDD, MediaType.GENERIC_HDD,
|
|
|
|
|
|
MediaType.GENERIC_HDD, MediaType.GENERIC_HDD, MediaType.GENERIC_HDD, MediaType.GENERIC_HDD,
|
|
|
|
|
|
MediaType.GENERIC_HDD, MediaType.GENERIC_HDD, MediaType.GENERIC_HDD, MediaType.GENERIC_HDD,
|
|
|
|
|
|
MediaType.GENERIC_HDD, MediaType.GENERIC_HDD, MediaType.GENERIC_HDD, MediaType.GENERIC_HDD,
|
|
|
|
|
|
MediaType.GENERIC_HDD, MediaType.GENERIC_HDD, MediaType.GENERIC_HDD, MediaType.GENERIC_HDD,
|
|
|
|
|
|
MediaType.GENERIC_HDD, MediaType.GENERIC_HDD, MediaType.GENERIC_HDD, MediaType.GENERIC_HDD,
|
|
|
|
|
|
MediaType.GENERIC_HDD, MediaType.GENERIC_HDD, MediaType.GENERIC_HDD, MediaType.GENERIC_HDD
|
|
|
|
|
|
};
|
2017-07-08 19:23:52 +01:00
|
|
|
|
|
2021-03-01 19:34:30 +00:00
|
|
|
|
public override ulong[] _sectors => new ulong[]
|
2020-02-29 18:03:35 +00:00
|
|
|
|
{
|
2021-03-01 00:52:03 +00:00
|
|
|
|
1024128, 409600, 409600, 409600, 409600, 41820, 41820, 81648, 1024000, 1024000, 1024000, 1024000, 1024000,
|
|
|
|
|
|
1024000, 1024000, 1024000, 1024000, 1024000, 1024000, 1024000, 409600, 51200, 51200, 41820, 41820, 54840,
|
|
|
|
|
|
54840, 54840, 54840, 54840, 41820, 54840, 54840, 262144, 51200, 51200, 54840
|
2020-02-29 18:03:35 +00:00
|
|
|
|
};
|
2017-07-08 19:23:52 +01:00
|
|
|
|
|
2021-03-01 19:34:30 +00:00
|
|
|
|
public override uint[] _sectorSize => new uint[]
|
2020-02-29 18:03:35 +00:00
|
|
|
|
{
|
2021-03-01 00:52:03 +00:00
|
|
|
|
512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
|
|
|
|
|
|
512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512
|
2020-02-29 18:03:35 +00:00
|
|
|
|
};
|
2017-07-08 19:23:52 +01:00
|
|
|
|
|
2021-03-01 19:34:30 +00:00
|
|
|
|
public override string[] _appId => null;
|
|
|
|
|
|
public override bool[] _bootable => new[]
|
|
|
|
|
|
{
|
|
|
|
|
|
false, false, false, false, false, false, false, false, false, false, false, false, false, false, false,
|
|
|
|
|
|
false, false, false, false, false, false, false, false, false, false, false, false, false, false, false,
|
|
|
|
|
|
false, false, false, false, false, false, false
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
public override long[] _clusters => new long[]
|
2020-02-29 18:03:35 +00:00
|
|
|
|
{
|
2021-03-01 00:52:03 +00:00
|
|
|
|
64003, 51189, 51189, 58502, 58502, 41788, 38950, 39991, 63954, 63990, 63954, 63954, 63954, 63922, 63922,
|
|
|
|
|
|
63922, 63922, 63884, 63883, 63883, 58506, 50926, 50094, 38950, 38950, 38950, 38950, 7673, 38950, 38950,
|
|
|
|
|
|
38950, 38950, 38950, 46071, 50382, 49135, 54643
|
2020-02-29 18:03:35 +00:00
|
|
|
|
};
|
2017-07-08 19:23:52 +01:00
|
|
|
|
|
2021-03-01 19:34:30 +00:00
|
|
|
|
public override uint[] _clusterSize => new uint[]
|
2020-02-29 18:03:35 +00:00
|
|
|
|
{
|
2021-03-01 00:52:03 +00:00
|
|
|
|
8192, 4096, 4096, 3584, 3584, 512, 512, 1024, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,
|
|
|
|
|
|
8192, 8192, 3584, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 1024, 512, 512, 512
|
2020-02-29 18:03:35 +00:00
|
|
|
|
};
|
2021-03-01 19:34:30 +00:00
|
|
|
|
public override string[] _oemId => null;
|
|
|
|
|
|
public override string[] _type => null;
|
2017-07-08 19:23:52 +01:00
|
|
|
|
|
2021-03-01 19:34:30 +00:00
|
|
|
|
public override string[] _volumeName => new[]
|
2020-02-29 18:03:35 +00:00
|
|
|
|
{
|
2021-03-01 00:52:03 +00:00
|
|
|
|
"Volume label", "Volume label", "Volume label", "Volume label", "Volume label", "Volume label",
|
|
|
|
|
|
"Volume label", "Volume label", "Volume label", "Volume label", "Volume label", "Volume label",
|
|
|
|
|
|
"Volume label", "Volume label", "Volume label", "Volume label", "Volume label", "Volume label",
|
|
|
|
|
|
"Volume label", "Volume label", "Volume label", "Volume label", "Volume label", "Volume label",
|
|
|
|
|
|
"Volume label", "Volume label", "Volume label", "Test disk", "Volume label", "Volume label", "Volume label",
|
|
|
|
|
|
"Volume label", "Volume label", "Untitled", "Untitled #1", "24 MB Disk", "Volume label"
|
2020-02-29 18:03:35 +00:00
|
|
|
|
};
|
2017-07-08 19:23:52 +01:00
|
|
|
|
|
2021-03-01 19:34:30 +00:00
|
|
|
|
public override string[] _volumeSerial => new[]
|
2020-02-29 18:03:35 +00:00
|
|
|
|
{
|
2021-03-01 00:52:03 +00:00
|
|
|
|
null, null, null, null, "AAFE1382AF5AA898", null, null, null, null, null, null, null, null, null, null,
|
|
|
|
|
|
null, null, "5A7C38B0CAF279C4", "FB49083EBD150509", "632C0B1DB46FD188", null, null, null, null, null, null,
|
|
|
|
|
|
null, null, null, null, null, null, null, null, null, null, null
|
2020-02-29 18:03:35 +00:00
|
|
|
|
};
|
2017-07-08 19:23:52 +01:00
|
|
|
|
}
|
2017-12-19 20:33:03 +00:00
|
|
|
|
}
|