Skip to content

Run a virtual iPhone on an Apple Silicon Mac.

Swift

refactor: use PascalCase test folders

Lakr03e68caa039a
diff --git a/AGENTS.md b/AGENTS.md
index b092146c..f78f534a 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -264,7 +264,7 @@ There is none, and adding any is a regression.
- For kernel patchers, never hardcode file offsets, virtual addresses, or preassembled instruction bytes inside patch logic.
- All instruction matching must be derived from Capstone decode results (mnemonic / operands / control-flow), not exact operand-string text when a semantic operand check is possible. `ARM64Disassembler` is the only decoder — match on the decoded mnemonic and operand detail, never on a formatted operand string.
-- All replacement instruction bytes must come from Keystone-backed helpers already used by the project: `ARM64Encoder.encode*` and the `ARM64` constants, which were generated by keystone-engine, verified by Capstone round-trip, and are asserted word for word against keystone in `tests/FirmwarePatcherTests/ARM64EncoderTests.swift`. Never write a literal instruction word at a patch site. A new instruction means a new encoder plus its keystone-checked test case, not a raw `Data`. Keystone is deliberately **not** a project dependency any more — nothing at runtime or in the test suite calls it, and the expected words are frozen constants. To derive a new one, stand keystone up in a throwaway environment **outside this repository** (`brew install keystone`, plus `keystone-engine` in a scratch interpreter somewhere under `/tmp`) and run the one-liner in that test file's header against it. There is no dependency list here to add it to and no environment here to install it into; creating either is the regression the "Python" section above forbids. Do not invent an expected word without checking it.
+- All replacement instruction bytes must come from Keystone-backed helpers already used by the project: `ARM64Encoder.encode*` and the `ARM64` constants, which were generated by keystone-engine, verified by Capstone round-trip, and are asserted word for word against keystone in `Tests/FirmwarePatcherTests/ARM64EncoderTests.swift`. Never write a literal instruction word at a patch site. A new instruction means a new encoder plus its keystone-checked test case, not a raw `Data`. Keystone is deliberately **not** a project dependency any more — nothing at runtime or in the test suite calls it, and the expected words are frozen constants. To derive a new one, stand keystone up in a throwaway environment **outside this repository** (`brew install keystone`, plus `keystone-engine` in a scratch interpreter somewhere under `/tmp`) and run the one-liner in that test file's header against it. There is no dependency list here to add it to and no environment here to install it into; creating either is the regression the "Python" section above forbids. Do not invent an expected word without checking it.
- Prefer source-backed semantic anchors: in-image symbol lookup, string xrefs, local call-flow, and XNU correlation. Do not depend on repo-exported per-kernel symbol dumps at runtime.
- When retargeting a patch, write the reveal procedure and validation steps into the relevant research doc or commit notes before handing off for testing. Do not create `TODO.md`.
- For `patchBsdInitAuth` (`Kernel/JailbreakPatches/Storage/KernelJailbreakPatchBsdInitAuth.swift`, named `patch_bsd_init_auth` in the research docs) specifically, the allowed reveal flow is: recover `bsd_init` -> locate rootvp panic block -> find the unique in-function `call` -> `cbnz w0/x0, panic` -> `bl imageboot_needed` site -> patch the branch gate only.
diff --git a/Package.swift b/Package.swift
index c147f835..2cfbc7a7 100644
--- a/Package.swift
+++ b/Package.swift
@@ -297,22 +297,22 @@ let package = Package(
.testTarget(
name: "FirmwarePatcherTests",
dependencies: ["FirmwarePatcher"],
- path: "tests/FirmwarePatcherTests",
+ path: "Tests/FirmwarePatcherTests",
),
.testTarget(
name: "VPhoneCoreTests",
dependencies: ["VPhoneCore"],
- path: "tests/VPhoneCoreTests",
+ path: "Tests/VPhoneCoreTests",
),
.testTarget(
name: "VPhoneArchiveTests",
dependencies: ["VPhoneArchive"],
- path: "tests/VPhoneArchiveTests",
+ path: "Tests/VPhoneArchiveTests",
),
.testTarget(
name: "VPhoneSignTests",
dependencies: ["VPhoneSign"],
- path: "tests/VPhoneSignTests",
+ path: "Tests/VPhoneSignTests",
// Mach-O files to sign and the C they were built from. Excluded
// rather than declared as resources: the tests reach them through
// `#filePath`, so they need to be on disk and not in a bundle,
@@ -327,7 +327,7 @@ let package = Package(
.testTarget(
name: "VPhoneRestoreTests",
dependencies: ["VPhoneRestore"],
- path: "tests/VPhoneRestoreTests",
+ path: "Tests/VPhoneRestoreTests",
),
],
)
diff --git a/Sources/FirmwarePatcher/CustomFirmware/CustomFirmwareDaemonsDropbear.swift b/Sources/FirmwarePatcher/CustomFirmware/CustomFirmwareDaemonsDropbear.swift
index 0a01671f..98c93e6b 100644
--- a/Sources/FirmwarePatcher/CustomFirmware/CustomFirmwareDaemonsDropbear.swift
+++ b/Sources/FirmwarePatcher/CustomFirmware/CustomFirmwareDaemonsDropbear.swift
@@ -1,7 +1,7 @@
// CustomFirmwareDaemonsDropbear.swift — dropbear's ProgramArguments rewrite.
//
// Translated from: scripts/patchers/cfw_daemons.py (patch_dropbear_daemon,
-// patch_dropbear_plist). Covered by tests/FirmwarePatcherTests/CustomFirmwareDaemonsTests.swift,
+// patch_dropbear_plist). Covered by Tests/FirmwarePatcherTests/CustomFirmwareDaemonsTests.swift,
// which carries both cases of the retired tests/test_dropbear_plist.py.
import Foundation
diff --git a/Sources/VPhoneCLI/VPhoneSignCLI.swift b/Sources/VPhoneCLI/VPhoneSignCLI.swift
index 12009f89..5f80e57c 100644
--- a/Sources/VPhoneCLI/VPhoneSignCLI.swift
+++ b/Sources/VPhoneCLI/VPhoneSignCLI.swift
@@ -13,7 +13,7 @@
// environment variable behind it are gone: an escape hatch that shells out to a
// Homebrew binary is a dependency whether or not the default path takes it, and
// this project is meant to be self-contained. What guarded the replacement stays
-// where it belongs — tests/VPhoneSignTests holds these bytes against digests
+// where it belongs — Tests/VPhoneSignTests holds these bytes against digests
// taken from the real ldid and frozen into the suite, over committed fixtures.
// It needs no ldid installed and no system binary to sign, so it cannot skip
// itself into passing on a machine that has neither.
diff --git a/tests/FirmwarePatcherTests/ARM64EncoderTests.swift b/Tests/FirmwarePatcherTests/ARM64EncoderTests.swift
similarity index 100%
rename from tests/FirmwarePatcherTests/ARM64EncoderTests.swift
rename to Tests/FirmwarePatcherTests/ARM64EncoderTests.swift
diff --git a/tests/FirmwarePatcherTests/CryptexFileOpsTests.swift b/Tests/FirmwarePatcherTests/CryptexFileOpsTests.swift
similarity index 100%
rename from tests/FirmwarePatcherTests/CryptexFileOpsTests.swift
rename to Tests/FirmwarePatcherTests/CryptexFileOpsTests.swift
diff --git a/tests/FirmwarePatcherTests/CustomFirmwareCacheLoaderTests.swift b/Tests/FirmwarePatcherTests/CustomFirmwareCacheLoaderTests.swift
similarity index 100%
rename from tests/FirmwarePatcherTests/CustomFirmwareCacheLoaderTests.swift
rename to Tests/FirmwarePatcherTests/CustomFirmwareCacheLoaderTests.swift
diff --git a/tests/FirmwarePatcherTests/CustomFirmwareDaemonsTests.swift b/Tests/FirmwarePatcherTests/CustomFirmwareDaemonsTests.swift
similarity index 100%
rename from tests/FirmwarePatcherTests/CustomFirmwareDaemonsTests.swift
rename to Tests/FirmwarePatcherTests/CustomFirmwareDaemonsTests.swift
diff --git a/tests/FirmwarePatcherTests/CustomFirmwareDiskImageTests.swift b/Tests/FirmwarePatcherTests/CustomFirmwareDiskImageTests.swift
similarity index 100%
rename from tests/FirmwarePatcherTests/CustomFirmwareDiskImageTests.swift
rename to Tests/FirmwarePatcherTests/CustomFirmwareDiskImageTests.swift
diff --git a/tests/FirmwarePatcherTests/CustomFirmwareJetsamTests.swift b/Tests/FirmwarePatcherTests/CustomFirmwareJetsamTests.swift
similarity index 100%
rename from tests/FirmwarePatcherTests/CustomFirmwareJetsamTests.swift
rename to Tests/FirmwarePatcherTests/CustomFirmwareJetsamTests.swift
diff --git a/tests/FirmwarePatcherTests/CustomFirmwareMachOTests.swift b/Tests/FirmwarePatcherTests/CustomFirmwareMachOTests.swift
similarity index 100%
rename from tests/FirmwarePatcherTests/CustomFirmwareMachOTests.swift
rename to Tests/FirmwarePatcherTests/CustomFirmwareMachOTests.swift
diff --git a/tests/FirmwarePatcherTests/CustomFirmwareMobileActivationTests.swift b/Tests/FirmwarePatcherTests/CustomFirmwareMobileActivationTests.swift
similarity index 100%
rename from tests/FirmwarePatcherTests/CustomFirmwareMobileActivationTests.swift
rename to Tests/FirmwarePatcherTests/CustomFirmwareMobileActivationTests.swift
diff --git a/tests/FirmwarePatcherTests/CustomFirmwarePlistPatchTests.swift b/Tests/FirmwarePatcherTests/CustomFirmwarePlistPatchTests.swift
similarity index 99%
rename from tests/FirmwarePatcherTests/CustomFirmwarePlistPatchTests.swift
rename to Tests/FirmwarePatcherTests/CustomFirmwarePlistPatchTests.swift
index 5a031a6a..4d55d6a9 100644
--- a/tests/FirmwarePatcherTests/CustomFirmwarePlistPatchTests.swift
+++ b/Tests/FirmwarePatcherTests/CustomFirmwarePlistPatchTests.swift
@@ -87,7 +87,7 @@ enum CustomFirmwarePlistPatchGolden {
// MARK: - Fixtures
enum CustomFirmwarePatchFixtures {
- /// tests/FirmwarePatcherTests/<this file> → repo root.
+ /// Tests/FirmwarePatcherTests/<this file> → repo root.
static let repoRoot = URL(filePath: #filePath)
.deletingLastPathComponent()
.deletingLastPathComponent()
diff --git a/tests/FirmwarePatcherTests/CustomFirmwareSeputilTests.swift b/Tests/FirmwarePatcherTests/CustomFirmwareSeputilTests.swift
similarity index 100%
rename from tests/FirmwarePatcherTests/CustomFirmwareSeputilTests.swift
rename to Tests/FirmwarePatcherTests/CustomFirmwareSeputilTests.swift
diff --git a/tests/FirmwarePatcherTests/CustomFirmwareWatchDogTests.swift b/Tests/FirmwarePatcherTests/CustomFirmwareWatchDogTests.swift
similarity index 100%
rename from tests/FirmwarePatcherTests/CustomFirmwareWatchDogTests.swift
rename to Tests/FirmwarePatcherTests/CustomFirmwareWatchDogTests.swift
diff --git a/tests/FirmwarePatcherTests/DyldSharedCacheCameraPatcherTests.swift b/Tests/FirmwarePatcherTests/DyldSharedCacheCameraPatcherTests.swift
similarity index 100%
rename from tests/FirmwarePatcherTests/DyldSharedCacheCameraPatcherTests.swift
rename to Tests/FirmwarePatcherTests/DyldSharedCacheCameraPatcherTests.swift
diff --git a/tests/FirmwarePatcherTests/DyldSharedCacheFoundationTests.swift b/Tests/FirmwarePatcherTests/DyldSharedCacheFoundationTests.swift
similarity index 100%
rename from tests/FirmwarePatcherTests/DyldSharedCacheFoundationTests.swift
rename to Tests/FirmwarePatcherTests/DyldSharedCacheFoundationTests.swift
diff --git a/tests/FirmwarePatcherTests/DyldSharedCacheHypervisorVirtualMachinePatcherTests.swift b/Tests/FirmwarePatcherTests/DyldSharedCacheHypervisorVirtualMachinePatcherTests.swift
similarity index 100%
rename from tests/FirmwarePatcherTests/DyldSharedCacheHypervisorVirtualMachinePatcherTests.swift
rename to Tests/FirmwarePatcherTests/DyldSharedCacheHypervisorVirtualMachinePatcherTests.swift
diff --git a/tests/FirmwarePatcherTests/DyldSharedCacheIOMFBForceKernTests.swift b/Tests/FirmwarePatcherTests/DyldSharedCacheIOMFBForceKernTests.swift
similarity index 100%
rename from tests/FirmwarePatcherTests/DyldSharedCacheIOMFBForceKernTests.swift
rename to Tests/FirmwarePatcherTests/DyldSharedCacheIOMFBForceKernTests.swift
diff --git a/tests/FirmwarePatcherTests/DyldSharedCacheIOMFBSwapEndTests.swift b/Tests/FirmwarePatcherTests/DyldSharedCacheIOMFBSwapEndTests.swift
similarity index 100%
rename from tests/FirmwarePatcherTests/DyldSharedCacheIOMFBSwapEndTests.swift
rename to Tests/FirmwarePatcherTests/DyldSharedCacheIOMFBSwapEndTests.swift
diff --git a/tests/FirmwarePatcherTests/DyldSharedCacheLSDEmbeddedRegTests.swift b/Tests/FirmwarePatcherTests/DyldSharedCacheLSDEmbeddedRegTests.swift
similarity index 100%
rename from tests/FirmwarePatcherTests/DyldSharedCacheLSDEmbeddedRegTests.swift
rename to Tests/FirmwarePatcherTests/DyldSharedCacheLSDEmbeddedRegTests.swift
diff --git a/tests/FirmwarePatcherTests/DyldSharedCacheLockdownModePatcherTests.swift b/Tests/FirmwarePatcherTests/DyldSharedCacheLockdownModePatcherTests.swift
similarity index 100%
rename from tests/FirmwarePatcherTests/DyldSharedCacheLockdownModePatcherTests.swift
rename to Tests/FirmwarePatcherTests/DyldSharedCacheLockdownModePatcherTests.swift
diff --git a/tests/FirmwarePatcherTests/DyldSharedCacheMaxSlidePatcherTests.swift b/Tests/FirmwarePatcherTests/DyldSharedCacheMaxSlidePatcherTests.swift
similarity index 100%
rename from tests/FirmwarePatcherTests/DyldSharedCacheMaxSlidePatcherTests.swift
rename to Tests/FirmwarePatcherTests/DyldSharedCacheMaxSlidePatcherTests.swift
diff --git a/tests/FirmwarePatcherTests/DyldSharedCacheXPCLWCRPatcherTests.swift b/Tests/FirmwarePatcherTests/DyldSharedCacheXPCLWCRPatcherTests.swift
similarity index 100%
rename from tests/FirmwarePatcherTests/DyldSharedCacheXPCLWCRPatcherTests.swift
rename to Tests/FirmwarePatcherTests/DyldSharedCacheXPCLWCRPatcherTests.swift
diff --git a/tests/FirmwarePatcherTests/FirmwareManifestSelectionTests.swift b/Tests/FirmwarePatcherTests/FirmwareManifestSelectionTests.swift
similarity index 100%
rename from tests/FirmwarePatcherTests/FirmwareManifestSelectionTests.swift
rename to Tests/FirmwarePatcherTests/FirmwareManifestSelectionTests.swift
diff --git a/tests/FirmwarePatcherTests/FirmwarePatcherTests.swift b/Tests/FirmwarePatcherTests/FirmwarePatcherTests.swift
similarity index 100%
rename from tests/FirmwarePatcherTests/FirmwarePatcherTests.swift
rename to Tests/FirmwarePatcherTests/FirmwarePatcherTests.swift
diff --git a/tests/FirmwarePatcherTests/MachOParserBoundsTests.swift b/Tests/FirmwarePatcherTests/MachOParserBoundsTests.swift
similarity index 100%
rename from tests/FirmwarePatcherTests/MachOParserBoundsTests.swift
rename to Tests/FirmwarePatcherTests/MachOParserBoundsTests.swift
diff --git a/tests/FirmwarePatcherTests/PatchComparisonTests.swift b/Tests/FirmwarePatcherTests/PatchComparisonTests.swift
similarity index 100%
rename from tests/FirmwarePatcherTests/PatchComparisonTests.swift
rename to Tests/FirmwarePatcherTests/PatchComparisonTests.swift
diff --git a/tests/FirmwarePatcherTests/VerboseJailbreakDebug.swift b/Tests/FirmwarePatcherTests/VerboseJailbreakDebug.swift
similarity index 100%
rename from tests/FirmwarePatcherTests/VerboseJailbreakDebug.swift
rename to Tests/FirmwarePatcherTests/VerboseJailbreakDebug.swift
diff --git a/tests/VPhoneArchiveTests/BundleTransferTests.swift b/Tests/VPhoneArchiveTests/BundleTransferTests.swift
similarity index 100%
rename from tests/VPhoneArchiveTests/BundleTransferTests.swift
rename to Tests/VPhoneArchiveTests/BundleTransferTests.swift
diff --git a/tests/VPhoneArchiveTests/ExtractPermissionsTests.swift b/Tests/VPhoneArchiveTests/ExtractPermissionsTests.swift
similarity index 100%
rename from tests/VPhoneArchiveTests/ExtractPermissionsTests.swift
rename to Tests/VPhoneArchiveTests/ExtractPermissionsTests.swift
diff --git a/tests/VPhoneArchiveTests/IPSWCacheTests.swift b/Tests/VPhoneArchiveTests/IPSWCacheTests.swift
similarity index 100%
rename from tests/VPhoneArchiveTests/IPSWCacheTests.swift
rename to Tests/VPhoneArchiveTests/IPSWCacheTests.swift
diff --git a/tests/VPhoneArchiveTests/NoOverwriteDirTests.swift b/Tests/VPhoneArchiveTests/NoOverwriteDirTests.swift
similarity index 100%
rename from tests/VPhoneArchiveTests/NoOverwriteDirTests.swift
rename to Tests/VPhoneArchiveTests/NoOverwriteDirTests.swift
diff --git a/tests/VPhoneArchiveTests/RoundTripTests.swift b/Tests/VPhoneArchiveTests/RoundTripTests.swift
similarity index 100%
rename from tests/VPhoneArchiveTests/RoundTripTests.swift
rename to Tests/VPhoneArchiveTests/RoundTripTests.swift
diff --git a/tests/VPhoneCoreTests/APFSSnapshotTests.swift b/Tests/VPhoneCoreTests/APFSSnapshotTests.swift
similarity index 100%
rename from tests/VPhoneCoreTests/APFSSnapshotTests.swift
rename to Tests/VPhoneCoreTests/APFSSnapshotTests.swift
diff --git a/tests/VPhoneCoreTests/BootPatternsTests.swift b/Tests/VPhoneCoreTests/BootPatternsTests.swift
similarity index 100%
rename from tests/VPhoneCoreTests/BootPatternsTests.swift
rename to Tests/VPhoneCoreTests/BootPatternsTests.swift
diff --git a/tests/VPhoneCoreTests/BundleOperationsTests.swift b/Tests/VPhoneCoreTests/BundleOperationsTests.swift
similarity index 100%
rename from tests/VPhoneCoreTests/BundleOperationsTests.swift
rename to Tests/VPhoneCoreTests/BundleOperationsTests.swift
diff --git a/tests/VPhoneCoreTests/BundleReportTests.swift b/Tests/VPhoneCoreTests/BundleReportTests.swift
similarity index 100%
rename from tests/VPhoneCoreTests/BundleReportTests.swift
rename to Tests/VPhoneCoreTests/BundleReportTests.swift
diff --git a/tests/VPhoneCoreTests/FirmwareCatalogReportTests.swift b/Tests/VPhoneCoreTests/FirmwareCatalogReportTests.swift
similarity index 100%
rename from tests/VPhoneCoreTests/FirmwareCatalogReportTests.swift
rename to Tests/VPhoneCoreTests/FirmwareCatalogReportTests.swift
diff --git a/tests/VPhoneCoreTests/FirmwareMatrixTests.swift b/Tests/VPhoneCoreTests/FirmwareMatrixTests.swift
similarity index 100%
rename from tests/VPhoneCoreTests/FirmwareMatrixTests.swift
rename to Tests/VPhoneCoreTests/FirmwareMatrixTests.swift
diff --git a/tests/VPhoneCoreTests/FirmwarePickerTests.swift b/Tests/VPhoneCoreTests/FirmwarePickerTests.swift
similarity index 100%
rename from tests/VPhoneCoreTests/FirmwarePickerTests.swift
rename to Tests/VPhoneCoreTests/FirmwarePickerTests.swift
diff --git a/tests/VPhoneCoreTests/LaunchLayoutTests.swift b/Tests/VPhoneCoreTests/LaunchLayoutTests.swift
similarity index 100%
rename from tests/VPhoneCoreTests/LaunchLayoutTests.swift
rename to Tests/VPhoneCoreTests/LaunchLayoutTests.swift
diff --git a/tests/VPhoneCoreTests/LibraryTests.swift b/Tests/VPhoneCoreTests/LibraryTests.swift
similarity index 100%
rename from tests/VPhoneCoreTests/LibraryTests.swift
rename to Tests/VPhoneCoreTests/LibraryTests.swift
diff --git a/tests/VPhoneCoreTests/ManagedProcessTests.swift b/Tests/VPhoneCoreTests/ManagedProcessTests.swift
similarity index 100%
rename from tests/VPhoneCoreTests/ManagedProcessTests.swift
rename to Tests/VPhoneCoreTests/ManagedProcessTests.swift
diff --git a/tests/VPhoneCoreTests/ManifestTests.swift b/Tests/VPhoneCoreTests/ManifestTests.swift
similarity index 100%
rename from tests/VPhoneCoreTests/ManifestTests.swift
rename to Tests/VPhoneCoreTests/ManifestTests.swift
diff --git a/tests/VPhoneCoreTests/NetworkingTests.swift b/Tests/VPhoneCoreTests/NetworkingTests.swift
similarity index 100%
rename from tests/VPhoneCoreTests/NetworkingTests.swift
rename to Tests/VPhoneCoreTests/NetworkingTests.swift
diff --git a/tests/VPhoneCoreTests/NewVirtualMachineManifestTests.swift b/Tests/VPhoneCoreTests/NewVirtualMachineManifestTests.swift
similarity index 100%
rename from tests/VPhoneCoreTests/NewVirtualMachineManifestTests.swift
rename to Tests/VPhoneCoreTests/NewVirtualMachineManifestTests.swift
diff --git a/tests/VPhoneCoreTests/PCCGPUDriverTests.swift b/Tests/VPhoneCoreTests/PCCGPUDriverTests.swift
similarity index 100%
rename from tests/VPhoneCoreTests/PCCGPUDriverTests.swift
rename to Tests/VPhoneCoreTests/PCCGPUDriverTests.swift
diff --git a/tests/VPhoneCoreTests/PlistEquivalence.swift b/Tests/VPhoneCoreTests/PlistEquivalence.swift
similarity index 100%
rename from tests/VPhoneCoreTests/PlistEquivalence.swift
rename to Tests/VPhoneCoreTests/PlistEquivalence.swift
diff --git a/tests/VPhoneCoreTests/ProcessEnvironment.swift b/Tests/VPhoneCoreTests/ProcessEnvironment.swift
similarity index 100%
rename from tests/VPhoneCoreTests/ProcessEnvironment.swift
rename to Tests/VPhoneCoreTests/ProcessEnvironment.swift
diff --git a/tests/VPhoneCoreTests/ProcessRunnerTests.swift b/Tests/VPhoneCoreTests/ProcessRunnerTests.swift
similarity index 100%
rename from tests/VPhoneCoreTests/ProcessRunnerTests.swift
rename to Tests/VPhoneCoreTests/ProcessRunnerTests.swift
diff --git a/tests/VPhoneCoreTests/ResourcesTests.swift b/Tests/VPhoneCoreTests/ResourcesTests.swift
similarity index 100%
rename from tests/VPhoneCoreTests/ResourcesTests.swift
rename to Tests/VPhoneCoreTests/ResourcesTests.swift
diff --git a/tests/VPhoneCoreTests/RestoreInfoTests.swift b/Tests/VPhoneCoreTests/RestoreInfoTests.swift
similarity index 100%
rename from tests/VPhoneCoreTests/RestoreInfoTests.swift
rename to Tests/VPhoneCoreTests/RestoreInfoTests.swift
diff --git a/tests/VPhoneCoreTests/RestoreOperationsTests.swift b/Tests/VPhoneCoreTests/RestoreOperationsTests.swift
similarity index 100%
rename from tests/VPhoneCoreTests/RestoreOperationsTests.swift
rename to Tests/VPhoneCoreTests/RestoreOperationsTests.swift
diff --git a/tests/VPhoneCoreTests/VerbosityTests.swift b/Tests/VPhoneCoreTests/VerbosityTests.swift
similarity index 100%
rename from tests/VPhoneCoreTests/VerbosityTests.swift
rename to Tests/VPhoneCoreTests/VerbosityTests.swift
diff --git a/tests/VPhoneCoreTests/VirtualMachinePickerTests.swift b/Tests/VPhoneCoreTests/VirtualMachinePickerTests.swift
similarity index 100%
rename from tests/VPhoneCoreTests/VirtualMachinePickerTests.swift
rename to Tests/VPhoneCoreTests/VirtualMachinePickerTests.swift
diff --git a/tests/VPhoneRestoreTests/RestoreEventTests.swift b/Tests/VPhoneRestoreTests/RestoreEventTests.swift
similarity index 100%
rename from tests/VPhoneRestoreTests/RestoreEventTests.swift
rename to Tests/VPhoneRestoreTests/RestoreEventTests.swift
diff --git a/tests/VPhoneRestoreTests/RestoreIdentityTests.swift b/Tests/VPhoneRestoreTests/RestoreIdentityTests.swift
similarity index 100%
rename from tests/VPhoneRestoreTests/RestoreIdentityTests.swift
rename to Tests/VPhoneRestoreTests/RestoreIdentityTests.swift
diff --git a/tests/VPhoneRestoreTests/RestoreLayoutTests.swift b/Tests/VPhoneRestoreTests/RestoreLayoutTests.swift
similarity index 100%
rename from tests/VPhoneRestoreTests/RestoreLayoutTests.swift
rename to Tests/VPhoneRestoreTests/RestoreLayoutTests.swift
diff --git a/tests/VPhoneRestoreTests/RestoreOptionsTests.swift b/Tests/VPhoneRestoreTests/RestoreOptionsTests.swift
similarity index 100%
rename from tests/VPhoneRestoreTests/RestoreOptionsTests.swift
rename to Tests/VPhoneRestoreTests/RestoreOptionsTests.swift
diff --git a/tests/VPhoneRestoreTests/RestoreRunnerTests.swift b/Tests/VPhoneRestoreTests/RestoreRunnerTests.swift
similarity index 100%
rename from tests/VPhoneRestoreTests/RestoreRunnerTests.swift
rename to Tests/VPhoneRestoreTests/RestoreRunnerTests.swift
diff --git a/tests/VPhoneRestoreTests/RestoreTicketTests.swift b/Tests/VPhoneRestoreTests/RestoreTicketTests.swift
similarity index 100%
rename from tests/VPhoneRestoreTests/RestoreTicketTests.swift
rename to Tests/VPhoneRestoreTests/RestoreTicketTests.swift
diff --git a/tests/VPhoneSignTests/Fixtures/entitlements/lsd.plist b/Tests/VPhoneSignTests/Fixtures/Entitlements/lsd.plist
similarity index 100%
rename from tests/VPhoneSignTests/Fixtures/entitlements/lsd.plist
rename to Tests/VPhoneSignTests/Fixtures/Entitlements/lsd.plist
diff --git a/tests/VPhoneSignTests/Fixtures/entitlements/promotedcontentd.plist b/Tests/VPhoneSignTests/Fixtures/Entitlements/promotedcontentd.plist
similarity index 100%
rename from tests/VPhoneSignTests/Fixtures/entitlements/promotedcontentd.plist
rename to Tests/VPhoneSignTests/Fixtures/Entitlements/promotedcontentd.plist
diff --git a/tests/VPhoneSignTests/Fixtures/entitlements/runningboardd.plist b/Tests/VPhoneSignTests/Fixtures/Entitlements/runningboardd.plist
similarity index 100%
rename from tests/VPhoneSignTests/Fixtures/entitlements/runningboardd.plist
rename to Tests/VPhoneSignTests/Fixtures/Entitlements/runningboardd.plist
diff --git a/tests/VPhoneSignTests/Fixtures/entitlements/seserviced.plist b/Tests/VPhoneSignTests/Fixtures/Entitlements/seserviced.plist
similarity index 100%
rename from tests/VPhoneSignTests/Fixtures/entitlements/seserviced.plist
rename to Tests/VPhoneSignTests/Fixtures/Entitlements/seserviced.plist
diff --git a/tests/VPhoneSignTests/Fixtures/entitlements/spindump.plist b/Tests/VPhoneSignTests/Fixtures/Entitlements/spindump.plist
similarity index 100%
rename from tests/VPhoneSignTests/Fixtures/entitlements/spindump.plist
rename to Tests/VPhoneSignTests/Fixtures/Entitlements/spindump.plist
diff --git a/tests/VPhoneSignTests/Fixtures/entitlements/sshd.plist b/Tests/VPhoneSignTests/Fixtures/Entitlements/sshd.plist
similarity index 100%
rename from tests/VPhoneSignTests/Fixtures/entitlements/sshd.plist
rename to Tests/VPhoneSignTests/Fixtures/Entitlements/sshd.plist
diff --git a/tests/VPhoneSignTests/Fixtures/entitlements/sysdiagnose_helper.plist b/Tests/VPhoneSignTests/Fixtures/Entitlements/sysdiagnose_helper.plist
similarity index 100%
rename from tests/VPhoneSignTests/Fixtures/entitlements/sysdiagnose_helper.plist
rename to Tests/VPhoneSignTests/Fixtures/Entitlements/sysdiagnose_helper.plist
diff --git a/tests/VPhoneSignTests/Fixtures/hello-arm64 b/Tests/VPhoneSignTests/Fixtures/hello-arm64
similarity index 100%
rename from tests/VPhoneSignTests/Fixtures/hello-arm64
rename to Tests/VPhoneSignTests/Fixtures/hello-arm64
diff --git a/tests/VPhoneSignTests/Fixtures/hello-arm64e b/Tests/VPhoneSignTests/Fixtures/hello-arm64e
similarity index 100%
rename from tests/VPhoneSignTests/Fixtures/hello-arm64e
rename to Tests/VPhoneSignTests/Fixtures/hello-arm64e
diff --git a/tests/VPhoneSignTests/Fixtures/hello-dylib b/Tests/VPhoneSignTests/Fixtures/hello-dylib
similarity index 100%
rename from tests/VPhoneSignTests/Fixtures/hello-dylib
rename to Tests/VPhoneSignTests/Fixtures/hello-dylib
diff --git a/tests/VPhoneSignTests/Fixtures/hello-fat b/Tests/VPhoneSignTests/Fixtures/hello-fat
similarity index 100%
rename from tests/VPhoneSignTests/Fixtures/hello-fat
rename to Tests/VPhoneSignTests/Fixtures/hello-fat
diff --git a/tests/VPhoneSignTests/Fixtures/hello-ios b/Tests/VPhoneSignTests/Fixtures/hello-ios
similarity index 100%
rename from tests/VPhoneSignTests/Fixtures/hello-ios
rename to Tests/VPhoneSignTests/Fixtures/hello-ios
diff --git a/tests/VPhoneSignTests/Fixtures/hello.c b/Tests/VPhoneSignTests/Fixtures/hello.c
similarity index 100%
rename from tests/VPhoneSignTests/Fixtures/hello.c
rename to Tests/VPhoneSignTests/Fixtures/hello.c
diff --git a/tests/VPhoneSignTests/Fixtures/library.c b/Tests/VPhoneSignTests/Fixtures/library.c
similarity index 100%
rename from tests/VPhoneSignTests/Fixtures/library.c
rename to Tests/VPhoneSignTests/Fixtures/library.c
diff --git a/tests/VPhoneSignTests/Fixtures/seeded-lsd b/Tests/VPhoneSignTests/Fixtures/seeded-lsd
similarity index 100%
rename from tests/VPhoneSignTests/Fixtures/seeded-lsd
rename to Tests/VPhoneSignTests/Fixtures/seeded-lsd
diff --git a/tests/VPhoneSignTests/Fixtures/seeded-promotedcontentd b/Tests/VPhoneSignTests/Fixtures/seeded-promotedcontentd
similarity index 100%
rename from tests/VPhoneSignTests/Fixtures/seeded-promotedcontentd
rename to Tests/VPhoneSignTests/Fixtures/seeded-promotedcontentd
diff --git a/tests/VPhoneSignTests/Fixtures/seeded-runningboardd b/Tests/VPhoneSignTests/Fixtures/seeded-runningboardd
similarity index 100%
rename from tests/VPhoneSignTests/Fixtures/seeded-runningboardd
rename to Tests/VPhoneSignTests/Fixtures/seeded-runningboardd
diff --git a/tests/VPhoneSignTests/Fixtures/seeded-seserviced b/Tests/VPhoneSignTests/Fixtures/seeded-seserviced
similarity index 100%
rename from tests/VPhoneSignTests/Fixtures/seeded-seserviced
rename to Tests/VPhoneSignTests/Fixtures/seeded-seserviced
diff --git a/tests/VPhoneSignTests/Fixtures/seeded-spindump b/Tests/VPhoneSignTests/Fixtures/seeded-spindump
similarity index 100%
rename from tests/VPhoneSignTests/Fixtures/seeded-spindump
rename to Tests/VPhoneSignTests/Fixtures/seeded-spindump
diff --git a/tests/VPhoneSignTests/Fixtures/seeded-sshd b/Tests/VPhoneSignTests/Fixtures/seeded-sshd
similarity index 100%
rename from tests/VPhoneSignTests/Fixtures/seeded-sshd
rename to Tests/VPhoneSignTests/Fixtures/seeded-sshd
diff --git a/tests/VPhoneSignTests/Fixtures/seeded-sysdiagnose_helper b/Tests/VPhoneSignTests/Fixtures/seeded-sysdiagnose_helper
similarity index 100%
rename from tests/VPhoneSignTests/Fixtures/seeded-sysdiagnose_helper
rename to Tests/VPhoneSignTests/Fixtures/seeded-sysdiagnose_helper
diff --git a/tests/VPhoneSignTests/VPhoneSignBlobs.swift b/Tests/VPhoneSignTests/VPhoneSignBlobs.swift
similarity index 100%
rename from tests/VPhoneSignTests/VPhoneSignBlobs.swift
rename to Tests/VPhoneSignTests/VPhoneSignBlobs.swift
diff --git a/tests/VPhoneSignTests/VPhoneSignEntitlementsTests.swift b/Tests/VPhoneSignTests/VPhoneSignEntitlementsTests.swift
similarity index 100%
rename from tests/VPhoneSignTests/VPhoneSignEntitlementsTests.swift
rename to Tests/VPhoneSignTests/VPhoneSignEntitlementsTests.swift
diff --git a/tests/VPhoneSignTests/VPhoneSignFixtures.swift b/Tests/VPhoneSignTests/VPhoneSignFixtures.swift
similarity index 99%
rename from tests/VPhoneSignTests/VPhoneSignFixtures.swift
rename to Tests/VPhoneSignTests/VPhoneSignFixtures.swift
index 6b8d2579..3355c41b 100644
--- a/tests/VPhoneSignTests/VPhoneSignFixtures.swift
+++ b/Tests/VPhoneSignTests/VPhoneSignFixtures.swift
@@ -51,7 +51,7 @@
// ldid is deliberately not a dependency of this repository: there is no
// Homebrew formula in the admission gates, nothing resolves an `ldid` on PATH,
// and `--use-ldid` is gone. So the table is re-derived the way the keystone
-// constants in tests/FirmwarePatcherTests/ARM64EncoderTests.swift are — from a
+// constants in Tests/FirmwarePatcherTests/ARM64EncoderTests.swift are — from a
// throwaway environment OUTSIDE this repository.
//
// 1. `brew install ldid-procursus` on a machine, not into this tree.
diff --git a/tests/VPhoneSignTests/VPhoneSignParityTests.swift b/Tests/VPhoneSignTests/VPhoneSignParityTests.swift
similarity index 100%
rename from tests/VPhoneSignTests/VPhoneSignParityTests.swift
rename to Tests/VPhoneSignTests/VPhoneSignParityTests.swift
diff --git a/tests/VPhoneSignTests/VPhoneSignStyleTests.swift b/Tests/VPhoneSignTests/VPhoneSignStyleTests.swift
similarity index 100%
rename from tests/VPhoneSignTests/VPhoneSignStyleTests.swift
rename to Tests/VPhoneSignTests/VPhoneSignStyleTests.swift
diff --git a/research/0_binary_patch_comparison.md b/research/0_binary_patch_comparison.md
index 5e13f31a..71a30775 100644
--- a/research/0_binary_patch_comparison.md
+++ b/research/0_binary_patch_comparison.md
@@ -1264,7 +1264,7 @@ So the first port of this sweep — a `FileManager.enumerator` walk — found no
deleted nothing and reported success, on exactly the files it exists to remove. The
shipped version walks with `opendir`/`readdir` and removes with `unlink(2)`, which is
what `find` did. `chownRecursively` shares that walk for the same reason. Both are
-covered by `tests/FirmwarePatcherTests/CryptexFileOpsTests.swift`, whose fixtures are
+covered by `Tests/FirmwarePatcherTests/CryptexFileOpsTests.swift`, whose fixtures are
made with `open(2)` and asserted with `readdir` — a Foundation-built fixture would make
the test pass by having nothing to find.
diff --git a/research/host/d2_d3_self_containment.md b/research/host/d2_d3_self_containment.md
index ec1cfb7a..06fac8d9 100644
--- a/research/host/d2_d3_self_containment.md
+++ b/research/host/d2_d3_self_containment.md
@@ -123,7 +123,7 @@ Two details that are easy to get wrong:
`VPhoneSigner` keeps its mapping and is safe *because* it renames over the
file rather than truncating it; rename does not invalidate a mapping.
-`make check-aux` enforces the rule for `Sources/`. **`tests/` is deliberately
+`make check-aux` enforces the rule for `Sources/`. **`Tests/` is deliberately
outside it**: a test opens a committed fixture of a few megabytes, so mapping
buys nothing, and those fixtures are exactly what the patch tests mutate and
write back over. Holding the tests to the production rule would trade a memory
diff --git a/research/patches/patch_reference_capture.md b/research/patches/patch_reference_capture.md
index 969df785..b3d129c3 100644
--- a/research/patches/patch_reference_capture.md
+++ b/research/patches/patch_reference_capture.md
@@ -10,7 +10,7 @@
> Python here any more and nothing left to activate, so the `.venv/bin/python3`
> invocations below are transcripts, not instructions.
> The parity evidence itself is no longer re-derived at test time: it is frozen
-> into the `FrozenReference` / `*Golden` enums in `tests/FirmwarePatcherTests/`.
+> into the `FrozenReference` / `*Golden` enums in `Tests/FirmwarePatcherTests/`.
Migration plan **P1.0**, the step marked 不可跳过. These patches rewrite pages
TXM hashes, so a wrong byte in the Swift port is a boot panic, not a failing
@@ -185,7 +185,7 @@ argv with no flag in it, while `cfw_patch_build_version.py`,
*local* argv and do log the flag. `VPHONE_PATCH_RECORDS` shows in neither.
The directory names are the convention
-`tests/FirmwarePatcherTests/PatchComparisonTests.swift` already reads from.
+`Tests/FirmwarePatcherTests/PatchComparisonTests.swift` already reads from.
`ipsws/` is gitignored, so none of this is committed.
The DSC is ~7 GiB and is **not** copied. What `raw_payloads/dsc_pages/` holds is
diff --git a/research/restore/p2_restore_off_python.md b/research/restore/p2_restore_off_python.md
index ca0ce6cc..5971d1c8 100644
--- a/research/restore/p2_restore_off_python.md
+++ b/research/restore/p2_restore_off_python.md
@@ -143,7 +143,7 @@ did not agree on either:
## The P2.3 behaviour table
The plan's seven rows, each with what it is checked by today. **`unit`** means
-`tests/VPhoneRestoreTests` covers it with no device attached; **`device`** means
+`Tests/VPhoneRestoreTests` covers it with no device attached; **`device`** means
it is not checked and needs a phone or VM in DFU.
| # | scenario | before | after | criterion | state |
diff --git a/scripts/check_aux.sh b/scripts/check_aux.sh
index f4889aad..4e4d501b 100755
--- a/scripts/check_aux.sh
+++ b/scripts/check_aux.sh
@@ -381,7 +381,7 @@ check_sources() {
# So the rule for Sources/ is: no bare `Data(contentsOf:)`. Either it is
# mapped, or it names itself as the rewrite case.
#
- # tests/ is deliberately NOT covered, and that is not laziness. What a test
+ # Tests/ is deliberately NOT covered, and that is not laziness. What a test
# opens is a committed fixture of a few megabytes, so mapping buys nothing —
# and the fixtures are exactly what the patch tests mutate and write back
# over, which is the one shape where mapping is wrong. Holding the tests to
@@ -413,7 +413,7 @@ check_sources() {
# check_aux.sh excludes itself, because a scanner that looks for a word
# necessarily contains it.
hits=$(grep -rnE 'python[0-9.]*' --include='*.sh' \
- scripts/ tests/ 2>/dev/null \
+ scripts/ Tests/ 2>/dev/null \
| grep -vE '^[^:]+:[0-9]+:[[:space:]]*#' \
| grep -vE '^scripts/check_aux\.sh:' \
| grep -vE '(echo|print)[[:space:]]')