2017-07-30 15:45:28 +01:00
|
|
|
|
// /***************************************************************************
|
2020-07-25 02:01:36 +01:00
|
|
|
|
// Aaru Data Preservation Suite
|
2017-07-30 15:45:28 +01:00
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
//
|
2017-07-30 15:46:08 +01:00
|
|
|
|
// Filename : Sun.cs
|
2017-12-19 03:50:57 +00:00
|
|
|
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
2017-07-30 15:45:28 +01:00
|
|
|
|
//
|
2020-07-25 02:01:36 +01:00
|
|
|
|
// Component : Aaru unit testing.
|
2017-07-30 15:45:28 +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-30 15:45:28 +01:00
|
|
|
|
// ****************************************************************************/
|
2017-12-19 03:50:57 +00:00
|
|
|
|
|
2017-07-30 15:45:28 +01:00
|
|
|
|
using System.IO;
|
2020-02-27 00:33:26 +00:00
|
|
|
|
using Aaru.CommonTypes;
|
2017-07-30 15:45:28 +01:00
|
|
|
|
using NUnit.Framework;
|
|
|
|
|
|
|
2020-02-27 00:33:26 +00:00
|
|
|
|
namespace Aaru.Tests.Partitions
|
2017-07-30 15:45:28 +01:00
|
|
|
|
{
|
2017-07-30 15:46:08 +01:00
|
|
|
|
// TODO: Get SunOS and VTOC16 disk labels
|
2017-07-30 15:45:28 +01:00
|
|
|
|
[TestFixture]
|
2021-03-03 14:52:05 +00:00
|
|
|
|
public class Sun : PartitionSchemeTest
|
2017-07-30 15:45:28 +01:00
|
|
|
|
{
|
2021-03-03 14:52:05 +00:00
|
|
|
|
public override string DataFolder => Path.Combine(Consts.TEST_FILES_ROOT, "Partitioning schemes", "Sun");
|
|
|
|
|
|
|
|
|
|
|
|
public override string[] TestFiles => new[]
|
2020-02-29 18:03:35 +00:00
|
|
|
|
{
|
2020-07-09 01:32:15 +01:00
|
|
|
|
"linux.aif", "parted.aif"
|
2020-02-29 18:03:35 +00:00
|
|
|
|
};
|
2017-07-30 15:45:28 +01:00
|
|
|
|
|
2021-03-03 14:52:05 +00:00
|
|
|
|
public override Partition[][] Wanted => new[]
|
2017-12-19 20:33:03 +00:00
|
|
|
|
{
|
2017-07-30 15:45:28 +01:00
|
|
|
|
// Linux's fdisk
|
2017-12-19 20:33:03 +00:00
|
|
|
|
new[]
|
|
|
|
|
|
{
|
|
|
|
|
|
new Partition
|
|
|
|
|
|
{
|
2020-07-20 04:34:16 +01:00
|
|
|
|
Description = null,
|
|
|
|
|
|
Name = null,
|
|
|
|
|
|
Type = "Linux",
|
|
|
|
|
|
Length = 204800,
|
|
|
|
|
|
Sequence = 0,
|
|
|
|
|
|
Start = 0
|
2017-12-19 20:33:03 +00:00
|
|
|
|
},
|
|
|
|
|
|
new Partition
|
|
|
|
|
|
{
|
2020-07-20 04:34:16 +01:00
|
|
|
|
Description = null,
|
|
|
|
|
|
Name = null,
|
|
|
|
|
|
Type = "Sun boot",
|
|
|
|
|
|
Length = 102400,
|
|
|
|
|
|
Sequence = 1,
|
|
|
|
|
|
Start = 208845
|
2017-12-19 20:33:03 +00:00
|
|
|
|
},
|
|
|
|
|
|
new Partition
|
|
|
|
|
|
{
|
2020-07-20 04:34:16 +01:00
|
|
|
|
Description = null,
|
|
|
|
|
|
Name = null,
|
|
|
|
|
|
Type = "Sun /",
|
|
|
|
|
|
Length = 102400,
|
|
|
|
|
|
Sequence = 2,
|
|
|
|
|
|
Start = 321300
|
2017-12-19 20:33:03 +00:00
|
|
|
|
},
|
|
|
|
|
|
new Partition
|
|
|
|
|
|
{
|
2020-07-20 04:34:16 +01:00
|
|
|
|
Description = null,
|
|
|
|
|
|
Name = null,
|
|
|
|
|
|
Type = "Sun /home",
|
|
|
|
|
|
Length = 102400,
|
|
|
|
|
|
Sequence = 3,
|
|
|
|
|
|
Start = 433755
|
2017-12-19 20:33:03 +00:00
|
|
|
|
},
|
|
|
|
|
|
new Partition
|
|
|
|
|
|
{
|
2020-07-20 04:34:16 +01:00
|
|
|
|
Description = null,
|
|
|
|
|
|
Name = null,
|
|
|
|
|
|
Type = "Sun swap",
|
|
|
|
|
|
Length = 153600,
|
|
|
|
|
|
Sequence = 4,
|
|
|
|
|
|
Start = 546210
|
2017-12-19 20:33:03 +00:00
|
|
|
|
},
|
|
|
|
|
|
new Partition
|
|
|
|
|
|
{
|
2020-07-20 04:34:16 +01:00
|
|
|
|
Description = null,
|
|
|
|
|
|
Name = null,
|
|
|
|
|
|
Type = "Sun /usr",
|
|
|
|
|
|
Length = 208845,
|
|
|
|
|
|
Sequence = 5,
|
|
|
|
|
|
Start = 706860
|
2017-12-19 20:33:03 +00:00
|
|
|
|
},
|
|
|
|
|
|
new Partition
|
|
|
|
|
|
{
|
2020-07-20 04:34:16 +01:00
|
|
|
|
Description = null,
|
|
|
|
|
|
Name = null,
|
|
|
|
|
|
Type = "Linux swap",
|
|
|
|
|
|
Length = 96390,
|
|
|
|
|
|
Sequence = 6,
|
|
|
|
|
|
Start = 915705
|
2017-12-21 02:52:12 +00:00
|
|
|
|
}
|
2017-07-30 15:45:28 +01:00
|
|
|
|
},
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2017-07-30 15:45:28 +01:00
|
|
|
|
// GNU Parted
|
2017-12-19 20:33:03 +00:00
|
|
|
|
new[]
|
|
|
|
|
|
{
|
|
|
|
|
|
new Partition
|
|
|
|
|
|
{
|
2020-07-20 04:34:16 +01:00
|
|
|
|
Description = null,
|
|
|
|
|
|
Name = null,
|
|
|
|
|
|
Type = "Linux",
|
|
|
|
|
|
Length = 49152,
|
|
|
|
|
|
Sequence = 0,
|
|
|
|
|
|
Start = 0
|
2017-12-19 20:33:03 +00:00
|
|
|
|
},
|
|
|
|
|
|
new Partition
|
|
|
|
|
|
{
|
2020-07-20 04:34:16 +01:00
|
|
|
|
Description = null,
|
|
|
|
|
|
Name = null,
|
|
|
|
|
|
Type = "Linux",
|
|
|
|
|
|
Length = 80325,
|
|
|
|
|
|
Sequence = 1,
|
|
|
|
|
|
Start = 64260
|
2017-12-19 20:33:03 +00:00
|
|
|
|
},
|
|
|
|
|
|
new Partition
|
|
|
|
|
|
{
|
2020-07-20 04:34:16 +01:00
|
|
|
|
Description = null,
|
|
|
|
|
|
Name = null,
|
|
|
|
|
|
Type = "Linux",
|
|
|
|
|
|
Length = 96390,
|
|
|
|
|
|
Sequence = 2,
|
|
|
|
|
|
Start = 144585
|
2017-12-21 02:52:12 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2017-12-19 20:33:03 +00:00
|
|
|
|
};
|
2017-07-30 15:45:28 +01:00
|
|
|
|
}
|
2017-12-19 20:33:03 +00:00
|
|
|
|
}
|