Run a virtual iPhone on an Apple Silicon Mac.
Swift
refactor: use PascalCase test folders
Lakr03e68caa039a
diff --git a/AGENTS.md b/AGENTS.mdindex 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.swiftindex 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.swiftindex 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 Foundationdiff --git a/Sources/VPhoneCLI/VPhoneSignCLI.swift b/Sources/VPhoneCLI/VPhoneSignCLI.swiftindex 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.swiftsimilarity index 100%rename from tests/FirmwarePatcherTests/ARM64EncoderTests.swiftrename to Tests/FirmwarePatcherTests/ARM64EncoderTests.swiftdiff --git a/tests/FirmwarePatcherTests/CryptexFileOpsTests.swift b/Tests/FirmwarePatcherTests/CryptexFileOpsTests.swiftsimilarity index 100%rename from tests/FirmwarePatcherTests/CryptexFileOpsTests.swiftrename to Tests/FirmwarePatcherTests/CryptexFileOpsTests.swiftdiff --git a/tests/FirmwarePatcherTests/CustomFirmwareCacheLoaderTests.swift b/Tests/FirmwarePatcherTests/CustomFirmwareCacheLoaderTests.swiftsimilarity index 100%rename from tests/FirmwarePatcherTests/CustomFirmwareCacheLoaderTests.swiftrename to Tests/FirmwarePatcherTests/CustomFirmwareCacheLoaderTests.swiftdiff --git a/tests/FirmwarePatcherTests/CustomFirmwareDaemonsTests.swift b/Tests/FirmwarePatcherTests/CustomFirmwareDaemonsTests.swiftsimilarity index 100%rename from tests/FirmwarePatcherTests/CustomFirmwareDaemonsTests.swiftrename to Tests/FirmwarePatcherTests/CustomFirmwareDaemonsTests.swiftdiff --git a/tests/FirmwarePatcherTests/CustomFirmwareDiskImageTests.swift b/Tests/FirmwarePatcherTests/CustomFirmwareDiskImageTests.swiftsimilarity index 100%rename from tests/FirmwarePatcherTests/CustomFirmwareDiskImageTests.swiftrename to Tests/FirmwarePatcherTests/CustomFirmwareDiskImageTests.swiftdiff --git a/tests/FirmwarePatcherTests/CustomFirmwareJetsamTests.swift b/Tests/FirmwarePatcherTests/CustomFirmwareJetsamTests.swiftsimilarity index 100%rename from tests/FirmwarePatcherTests/CustomFirmwareJetsamTests.swiftrename to Tests/FirmwarePatcherTests/CustomFirmwareJetsamTests.swiftdiff --git a/tests/FirmwarePatcherTests/CustomFirmwareMachOTests.swift b/Tests/FirmwarePatcherTests/CustomFirmwareMachOTests.swiftsimilarity index 100%rename from tests/FirmwarePatcherTests/CustomFirmwareMachOTests.swiftrename to Tests/FirmwarePatcherTests/CustomFirmwareMachOTests.swiftdiff --git a/tests/FirmwarePatcherTests/CustomFirmwareMobileActivationTests.swift b/Tests/FirmwarePatcherTests/CustomFirmwareMobileActivationTests.swiftsimilarity index 100%rename from tests/FirmwarePatcherTests/CustomFirmwareMobileActivationTests.swiftrename to Tests/FirmwarePatcherTests/CustomFirmwareMobileActivationTests.swiftdiff --git a/tests/FirmwarePatcherTests/CustomFirmwarePlistPatchTests.swift b/Tests/FirmwarePatcherTests/CustomFirmwarePlistPatchTests.swiftsimilarity index 99%rename from tests/FirmwarePatcherTests/CustomFirmwarePlistPatchTests.swiftrename to Tests/FirmwarePatcherTests/CustomFirmwarePlistPatchTests.swiftindex 5a031a6a..4d55d6a9 100644--- a/tests/FirmwarePatcherTests/CustomFirmwarePlistPatchTests.swift+++ b/Tests/FirmwarePatcherTests/CustomFirmwarePlistPatchTests.swift@@ -87,7 +87,7 @@ enum CustomFirmwarePlistPatchGolden {// MARK: - Fixturesenum 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.swiftsimilarity index 100%rename from tests/FirmwarePatcherTests/CustomFirmwareSeputilTests.swiftrename to Tests/FirmwarePatcherTests/CustomFirmwareSeputilTests.swiftdiff --git a/tests/FirmwarePatcherTests/CustomFirmwareWatchDogTests.swift b/Tests/FirmwarePatcherTests/CustomFirmwareWatchDogTests.swiftsimilarity index 100%rename from tests/FirmwarePatcherTests/CustomFirmwareWatchDogTests.swiftrename to Tests/FirmwarePatcherTests/CustomFirmwareWatchDogTests.swiftdiff --git a/tests/FirmwarePatcherTests/DyldSharedCacheCameraPatcherTests.swift b/Tests/FirmwarePatcherTests/DyldSharedCacheCameraPatcherTests.swiftsimilarity index 100%rename from tests/FirmwarePatcherTests/DyldSharedCacheCameraPatcherTests.swiftrename to Tests/FirmwarePatcherTests/DyldSharedCacheCameraPatcherTests.swiftdiff --git a/tests/FirmwarePatcherTests/DyldSharedCacheFoundationTests.swift b/Tests/FirmwarePatcherTests/DyldSharedCacheFoundationTests.swiftsimilarity index 100%rename from tests/FirmwarePatcherTests/DyldSharedCacheFoundationTests.swiftrename to Tests/FirmwarePatcherTests/DyldSharedCacheFoundationTests.swiftdiff --git a/tests/FirmwarePatcherTests/DyldSharedCacheHypervisorVirtualMachinePatcherTests.swift b/Tests/FirmwarePatcherTests/DyldSharedCacheHypervisorVirtualMachinePatcherTests.swiftsimilarity index 100%rename from tests/FirmwarePatcherTests/DyldSharedCacheHypervisorVirtualMachinePatcherTests.swiftrename to Tests/FirmwarePatcherTests/DyldSharedCacheHypervisorVirtualMachinePatcherTests.swiftdiff --git a/tests/FirmwarePatcherTests/DyldSharedCacheIOMFBForceKernTests.swift b/Tests/FirmwarePatcherTests/DyldSharedCacheIOMFBForceKernTests.swiftsimilarity index 100%rename from tests/FirmwarePatcherTests/DyldSharedCacheIOMFBForceKernTests.swiftrename to Tests/FirmwarePatcherTests/DyldSharedCacheIOMFBForceKernTests.swiftdiff --git a/tests/FirmwarePatcherTests/DyldSharedCacheIOMFBSwapEndTests.swift b/Tests/FirmwarePatcherTests/DyldSharedCacheIOMFBSwapEndTests.swiftsimilarity index 100%rename from tests/FirmwarePatcherTests/DyldSharedCacheIOMFBSwapEndTests.swiftrename to Tests/FirmwarePatcherTests/DyldSharedCacheIOMFBSwapEndTests.swiftdiff --git a/tests/FirmwarePatcherTests/DyldSharedCacheLSDEmbeddedRegTests.swift b/Tests/FirmwarePatcherTests/DyldSharedCacheLSDEmbeddedRegTests.swiftsimilarity index 100%rename from tests/FirmwarePatcherTests/DyldSharedCacheLSDEmbeddedRegTests.swiftrename to Tests/FirmwarePatcherTests/DyldSharedCacheLSDEmbeddedRegTests.swiftdiff --git a/tests/FirmwarePatcherTests/DyldSharedCacheLockdownModePatcherTests.swift b/Tests/FirmwarePatcherTests/DyldSharedCacheLockdownModePatcherTests.swiftsimilarity index 100%rename from tests/FirmwarePatcherTests/DyldSharedCacheLockdownModePatcherTests.swiftrename to Tests/FirmwarePatcherTests/DyldSharedCacheLockdownModePatcherTests.swiftdiff --git a/tests/FirmwarePatcherTests/DyldSharedCacheMaxSlidePatcherTests.swift b/Tests/FirmwarePatcherTests/DyldSharedCacheMaxSlidePatcherTests.swiftsimilarity index 100%rename from tests/FirmwarePatcherTests/DyldSharedCacheMaxSlidePatcherTests.swiftrename to Tests/FirmwarePatcherTests/DyldSharedCacheMaxSlidePatcherTests.swiftdiff --git a/tests/FirmwarePatcherTests/DyldSharedCacheXPCLWCRPatcherTests.swift b/Tests/FirmwarePatcherTests/DyldSharedCacheXPCLWCRPatcherTests.swiftsimilarity index 100%rename from tests/FirmwarePatcherTests/DyldSharedCacheXPCLWCRPatcherTests.swiftrename to Tests/FirmwarePatcherTests/DyldSharedCacheXPCLWCRPatcherTests.swiftdiff --git a/tests/FirmwarePatcherTests/FirmwareManifestSelectionTests.swift b/Tests/FirmwarePatcherTests/FirmwareManifestSelectionTests.swiftsimilarity index 100%rename from tests/FirmwarePatcherTests/FirmwareManifestSelectionTests.swiftrename to Tests/FirmwarePatcherTests/FirmwareManifestSelectionTests.swiftdiff --git a/tests/FirmwarePatcherTests/FirmwarePatcherTests.swift b/Tests/FirmwarePatcherTests/FirmwarePatcherTests.swiftsimilarity index 100%rename from tests/FirmwarePatcherTests/FirmwarePatcherTests.swiftrename to Tests/FirmwarePatcherTests/FirmwarePatcherTests.swiftdiff --git a/tests/FirmwarePatcherTests/MachOParserBoundsTests.swift b/Tests/FirmwarePatcherTests/MachOParserBoundsTests.swiftsimilarity index 100%rename from tests/FirmwarePatcherTests/MachOParserBoundsTests.swiftrename to Tests/FirmwarePatcherTests/MachOParserBoundsTests.swiftdiff --git a/tests/FirmwarePatcherTests/PatchComparisonTests.swift b/Tests/FirmwarePatcherTests/PatchComparisonTests.swiftsimilarity index 100%rename from tests/FirmwarePatcherTests/PatchComparisonTests.swiftrename to Tests/FirmwarePatcherTests/PatchComparisonTests.swiftdiff --git a/tests/FirmwarePatcherTests/VerboseJailbreakDebug.swift b/Tests/FirmwarePatcherTests/VerboseJailbreakDebug.swiftsimilarity index 100%rename from tests/FirmwarePatcherTests/VerboseJailbreakDebug.swiftrename to Tests/FirmwarePatcherTests/VerboseJailbreakDebug.swiftdiff --git a/tests/VPhoneArchiveTests/BundleTransferTests.swift b/Tests/VPhoneArchiveTests/BundleTransferTests.swiftsimilarity index 100%rename from tests/VPhoneArchiveTests/BundleTransferTests.swiftrename to Tests/VPhoneArchiveTests/BundleTransferTests.swiftdiff --git a/tests/VPhoneArchiveTests/ExtractPermissionsTests.swift b/Tests/VPhoneArchiveTests/ExtractPermissionsTests.swiftsimilarity index 100%rename from tests/VPhoneArchiveTests/ExtractPermissionsTests.swiftrename to Tests/VPhoneArchiveTests/ExtractPermissionsTests.swiftdiff --git a/tests/VPhoneArchiveTests/IPSWCacheTests.swift b/Tests/VPhoneArchiveTests/IPSWCacheTests.swiftsimilarity index 100%rename from tests/VPhoneArchiveTests/IPSWCacheTests.swiftrename to Tests/VPhoneArchiveTests/IPSWCacheTests.swiftdiff --git a/tests/VPhoneArchiveTests/NoOverwriteDirTests.swift b/Tests/VPhoneArchiveTests/NoOverwriteDirTests.swiftsimilarity index 100%rename from tests/VPhoneArchiveTests/NoOverwriteDirTests.swiftrename to Tests/VPhoneArchiveTests/NoOverwriteDirTests.swiftdiff --git a/tests/VPhoneArchiveTests/RoundTripTests.swift b/Tests/VPhoneArchiveTests/RoundTripTests.swiftsimilarity index 100%rename from tests/VPhoneArchiveTests/RoundTripTests.swiftrename to Tests/VPhoneArchiveTests/RoundTripTests.swiftdiff --git a/tests/VPhoneCoreTests/APFSSnapshotTests.swift b/Tests/VPhoneCoreTests/APFSSnapshotTests.swiftsimilarity index 100%rename from tests/VPhoneCoreTests/APFSSnapshotTests.swiftrename to Tests/VPhoneCoreTests/APFSSnapshotTests.swiftdiff --git a/tests/VPhoneCoreTests/BootPatternsTests.swift b/Tests/VPhoneCoreTests/BootPatternsTests.swiftsimilarity index 100%rename from tests/VPhoneCoreTests/BootPatternsTests.swiftrename to Tests/VPhoneCoreTests/BootPatternsTests.swiftdiff --git a/tests/VPhoneCoreTests/BundleOperationsTests.swift b/Tests/VPhoneCoreTests/BundleOperationsTests.swiftsimilarity index 100%rename from tests/VPhoneCoreTests/BundleOperationsTests.swiftrename to Tests/VPhoneCoreTests/BundleOperationsTests.swiftdiff --git a/tests/VPhoneCoreTests/BundleReportTests.swift b/Tests/VPhoneCoreTests/BundleReportTests.swiftsimilarity index 100%rename from tests/VPhoneCoreTests/BundleReportTests.swiftrename to Tests/VPhoneCoreTests/BundleReportTests.swiftdiff --git a/tests/VPhoneCoreTests/FirmwareCatalogReportTests.swift b/Tests/VPhoneCoreTests/FirmwareCatalogReportTests.swiftsimilarity index 100%rename from tests/VPhoneCoreTests/FirmwareCatalogReportTests.swiftrename to Tests/VPhoneCoreTests/FirmwareCatalogReportTests.swiftdiff --git a/tests/VPhoneCoreTests/FirmwareMatrixTests.swift b/Tests/VPhoneCoreTests/FirmwareMatrixTests.swiftsimilarity index 100%rename from tests/VPhoneCoreTests/FirmwareMatrixTests.swiftrename to Tests/VPhoneCoreTests/FirmwareMatrixTests.swiftdiff --git a/tests/VPhoneCoreTests/FirmwarePickerTests.swift b/Tests/VPhoneCoreTests/FirmwarePickerTests.swiftsimilarity index 100%rename from tests/VPhoneCoreTests/FirmwarePickerTests.swiftrename to Tests/VPhoneCoreTests/FirmwarePickerTests.swiftdiff --git a/tests/VPhoneCoreTests/LaunchLayoutTests.swift b/Tests/VPhoneCoreTests/LaunchLayoutTests.swiftsimilarity index 100%rename from tests/VPhoneCoreTests/LaunchLayoutTests.swiftrename to Tests/VPhoneCoreTests/LaunchLayoutTests.swiftdiff --git a/tests/VPhoneCoreTests/LibraryTests.swift b/Tests/VPhoneCoreTests/LibraryTests.swiftsimilarity index 100%rename from tests/VPhoneCoreTests/LibraryTests.swiftrename to Tests/VPhoneCoreTests/LibraryTests.swiftdiff --git a/tests/VPhoneCoreTests/ManagedProcessTests.swift b/Tests/VPhoneCoreTests/ManagedProcessTests.swiftsimilarity index 100%rename from tests/VPhoneCoreTests/ManagedProcessTests.swiftrename to Tests/VPhoneCoreTests/ManagedProcessTests.swiftdiff --git a/tests/VPhoneCoreTests/ManifestTests.swift b/Tests/VPhoneCoreTests/ManifestTests.swiftsimilarity index 100%rename from tests/VPhoneCoreTests/ManifestTests.swiftrename to Tests/VPhoneCoreTests/ManifestTests.swiftdiff --git a/tests/VPhoneCoreTests/NetworkingTests.swift b/Tests/VPhoneCoreTests/NetworkingTests.swiftsimilarity index 100%rename from tests/VPhoneCoreTests/NetworkingTests.swiftrename to Tests/VPhoneCoreTests/NetworkingTests.swiftdiff --git a/tests/VPhoneCoreTests/NewVirtualMachineManifestTests.swift b/Tests/VPhoneCoreTests/NewVirtualMachineManifestTests.swiftsimilarity index 100%rename from tests/VPhoneCoreTests/NewVirtualMachineManifestTests.swiftrename to Tests/VPhoneCoreTests/NewVirtualMachineManifestTests.swiftdiff --git a/tests/VPhoneCoreTests/PCCGPUDriverTests.swift b/Tests/VPhoneCoreTests/PCCGPUDriverTests.swiftsimilarity index 100%rename from tests/VPhoneCoreTests/PCCGPUDriverTests.swiftrename to Tests/VPhoneCoreTests/PCCGPUDriverTests.swiftdiff --git a/tests/VPhoneCoreTests/PlistEquivalence.swift b/Tests/VPhoneCoreTests/PlistEquivalence.swiftsimilarity index 100%rename from tests/VPhoneCoreTests/PlistEquivalence.swiftrename to Tests/VPhoneCoreTests/PlistEquivalence.swiftdiff --git a/tests/VPhoneCoreTests/ProcessEnvironment.swift b/Tests/VPhoneCoreTests/ProcessEnvironment.swiftsimilarity index 100%rename from tests/VPhoneCoreTests/ProcessEnvironment.swiftrename to Tests/VPhoneCoreTests/ProcessEnvironment.swiftdiff --git a/tests/VPhoneCoreTests/ProcessRunnerTests.swift b/Tests/VPhoneCoreTests/ProcessRunnerTests.swiftsimilarity index 100%rename from tests/VPhoneCoreTests/ProcessRunnerTests.swiftrename to Tests/VPhoneCoreTests/ProcessRunnerTests.swiftdiff --git a/tests/VPhoneCoreTests/ResourcesTests.swift b/Tests/VPhoneCoreTests/ResourcesTests.swiftsimilarity index 100%rename from tests/VPhoneCoreTests/ResourcesTests.swiftrename to Tests/VPhoneCoreTests/ResourcesTests.swiftdiff --git a/tests/VPhoneCoreTests/RestoreInfoTests.swift b/Tests/VPhoneCoreTests/RestoreInfoTests.swiftsimilarity index 100%rename from tests/VPhoneCoreTests/RestoreInfoTests.swiftrename to Tests/VPhoneCoreTests/RestoreInfoTests.swiftdiff --git a/tests/VPhoneCoreTests/RestoreOperationsTests.swift b/Tests/VPhoneCoreTests/RestoreOperationsTests.swiftsimilarity index 100%rename from tests/VPhoneCoreTests/RestoreOperationsTests.swiftrename to Tests/VPhoneCoreTests/RestoreOperationsTests.swiftdiff --git a/tests/VPhoneCoreTests/VerbosityTests.swift b/Tests/VPhoneCoreTests/VerbosityTests.swiftsimilarity index 100%rename from tests/VPhoneCoreTests/VerbosityTests.swiftrename to Tests/VPhoneCoreTests/VerbosityTests.swiftdiff --git a/tests/VPhoneCoreTests/VirtualMachinePickerTests.swift b/Tests/VPhoneCoreTests/VirtualMachinePickerTests.swiftsimilarity index 100%rename from tests/VPhoneCoreTests/VirtualMachinePickerTests.swiftrename to Tests/VPhoneCoreTests/VirtualMachinePickerTests.swiftdiff --git a/tests/VPhoneRestoreTests/RestoreEventTests.swift b/Tests/VPhoneRestoreTests/RestoreEventTests.swiftsimilarity index 100%rename from tests/VPhoneRestoreTests/RestoreEventTests.swiftrename to Tests/VPhoneRestoreTests/RestoreEventTests.swiftdiff --git a/tests/VPhoneRestoreTests/RestoreIdentityTests.swift b/Tests/VPhoneRestoreTests/RestoreIdentityTests.swiftsimilarity index 100%rename from tests/VPhoneRestoreTests/RestoreIdentityTests.swiftrename to Tests/VPhoneRestoreTests/RestoreIdentityTests.swiftdiff --git a/tests/VPhoneRestoreTests/RestoreLayoutTests.swift b/Tests/VPhoneRestoreTests/RestoreLayoutTests.swiftsimilarity index 100%rename from tests/VPhoneRestoreTests/RestoreLayoutTests.swiftrename to Tests/VPhoneRestoreTests/RestoreLayoutTests.swiftdiff --git a/tests/VPhoneRestoreTests/RestoreOptionsTests.swift b/Tests/VPhoneRestoreTests/RestoreOptionsTests.swiftsimilarity index 100%rename from tests/VPhoneRestoreTests/RestoreOptionsTests.swiftrename to Tests/VPhoneRestoreTests/RestoreOptionsTests.swiftdiff --git a/tests/VPhoneRestoreTests/RestoreRunnerTests.swift b/Tests/VPhoneRestoreTests/RestoreRunnerTests.swiftsimilarity index 100%rename from tests/VPhoneRestoreTests/RestoreRunnerTests.swiftrename to Tests/VPhoneRestoreTests/RestoreRunnerTests.swiftdiff --git a/tests/VPhoneRestoreTests/RestoreTicketTests.swift b/Tests/VPhoneRestoreTests/RestoreTicketTests.swiftsimilarity index 100%rename from tests/VPhoneRestoreTests/RestoreTicketTests.swiftrename to Tests/VPhoneRestoreTests/RestoreTicketTests.swiftdiff --git a/tests/VPhoneSignTests/Fixtures/entitlements/lsd.plist b/Tests/VPhoneSignTests/Fixtures/Entitlements/lsd.plistsimilarity index 100%rename from tests/VPhoneSignTests/Fixtures/entitlements/lsd.plistrename to Tests/VPhoneSignTests/Fixtures/Entitlements/lsd.plistdiff --git a/tests/VPhoneSignTests/Fixtures/entitlements/promotedcontentd.plist b/Tests/VPhoneSignTests/Fixtures/Entitlements/promotedcontentd.plistsimilarity index 100%rename from tests/VPhoneSignTests/Fixtures/entitlements/promotedcontentd.plistrename to Tests/VPhoneSignTests/Fixtures/Entitlements/promotedcontentd.plistdiff --git a/tests/VPhoneSignTests/Fixtures/entitlements/runningboardd.plist b/Tests/VPhoneSignTests/Fixtures/Entitlements/runningboardd.plistsimilarity index 100%rename from tests/VPhoneSignTests/Fixtures/entitlements/runningboardd.plistrename to Tests/VPhoneSignTests/Fixtures/Entitlements/runningboardd.plistdiff --git a/tests/VPhoneSignTests/Fixtures/entitlements/seserviced.plist b/Tests/VPhoneSignTests/Fixtures/Entitlements/seserviced.plistsimilarity index 100%rename from tests/VPhoneSignTests/Fixtures/entitlements/seserviced.plistrename to Tests/VPhoneSignTests/Fixtures/Entitlements/seserviced.plistdiff --git a/tests/VPhoneSignTests/Fixtures/entitlements/spindump.plist b/Tests/VPhoneSignTests/Fixtures/Entitlements/spindump.plistsimilarity index 100%rename from tests/VPhoneSignTests/Fixtures/entitlements/spindump.plistrename to Tests/VPhoneSignTests/Fixtures/Entitlements/spindump.plistdiff --git a/tests/VPhoneSignTests/Fixtures/entitlements/sshd.plist b/Tests/VPhoneSignTests/Fixtures/Entitlements/sshd.plistsimilarity index 100%rename from tests/VPhoneSignTests/Fixtures/entitlements/sshd.plistrename to Tests/VPhoneSignTests/Fixtures/Entitlements/sshd.plistdiff --git a/tests/VPhoneSignTests/Fixtures/entitlements/sysdiagnose_helper.plist b/Tests/VPhoneSignTests/Fixtures/Entitlements/sysdiagnose_helper.plistsimilarity index 100%rename from tests/VPhoneSignTests/Fixtures/entitlements/sysdiagnose_helper.plistrename to Tests/VPhoneSignTests/Fixtures/Entitlements/sysdiagnose_helper.plistdiff --git a/tests/VPhoneSignTests/Fixtures/hello-arm64 b/Tests/VPhoneSignTests/Fixtures/hello-arm64similarity index 100%rename from tests/VPhoneSignTests/Fixtures/hello-arm64rename to Tests/VPhoneSignTests/Fixtures/hello-arm64diff --git a/tests/VPhoneSignTests/Fixtures/hello-arm64e b/Tests/VPhoneSignTests/Fixtures/hello-arm64esimilarity index 100%rename from tests/VPhoneSignTests/Fixtures/hello-arm64erename to Tests/VPhoneSignTests/Fixtures/hello-arm64ediff --git a/tests/VPhoneSignTests/Fixtures/hello-dylib b/Tests/VPhoneSignTests/Fixtures/hello-dylibsimilarity index 100%rename from tests/VPhoneSignTests/Fixtures/hello-dylibrename to Tests/VPhoneSignTests/Fixtures/hello-dylibdiff --git a/tests/VPhoneSignTests/Fixtures/hello-fat b/Tests/VPhoneSignTests/Fixtures/hello-fatsimilarity index 100%rename from tests/VPhoneSignTests/Fixtures/hello-fatrename to Tests/VPhoneSignTests/Fixtures/hello-fatdiff --git a/tests/VPhoneSignTests/Fixtures/hello-ios b/Tests/VPhoneSignTests/Fixtures/hello-iossimilarity index 100%rename from tests/VPhoneSignTests/Fixtures/hello-iosrename to Tests/VPhoneSignTests/Fixtures/hello-iosdiff --git a/tests/VPhoneSignTests/Fixtures/hello.c b/Tests/VPhoneSignTests/Fixtures/hello.csimilarity index 100%rename from tests/VPhoneSignTests/Fixtures/hello.crename to Tests/VPhoneSignTests/Fixtures/hello.cdiff --git a/tests/VPhoneSignTests/Fixtures/library.c b/Tests/VPhoneSignTests/Fixtures/library.csimilarity index 100%rename from tests/VPhoneSignTests/Fixtures/library.crename to Tests/VPhoneSignTests/Fixtures/library.cdiff --git a/tests/VPhoneSignTests/Fixtures/seeded-lsd b/Tests/VPhoneSignTests/Fixtures/seeded-lsdsimilarity index 100%rename from tests/VPhoneSignTests/Fixtures/seeded-lsdrename to Tests/VPhoneSignTests/Fixtures/seeded-lsddiff --git a/tests/VPhoneSignTests/Fixtures/seeded-promotedcontentd b/Tests/VPhoneSignTests/Fixtures/seeded-promotedcontentdsimilarity index 100%rename from tests/VPhoneSignTests/Fixtures/seeded-promotedcontentdrename to Tests/VPhoneSignTests/Fixtures/seeded-promotedcontentddiff --git a/tests/VPhoneSignTests/Fixtures/seeded-runningboardd b/Tests/VPhoneSignTests/Fixtures/seeded-runningboarddsimilarity index 100%rename from tests/VPhoneSignTests/Fixtures/seeded-runningboarddrename to Tests/VPhoneSignTests/Fixtures/seeded-runningboardddiff --git a/tests/VPhoneSignTests/Fixtures/seeded-seserviced b/Tests/VPhoneSignTests/Fixtures/seeded-seservicedsimilarity index 100%rename from tests/VPhoneSignTests/Fixtures/seeded-seservicedrename to Tests/VPhoneSignTests/Fixtures/seeded-seserviceddiff --git a/tests/VPhoneSignTests/Fixtures/seeded-spindump b/Tests/VPhoneSignTests/Fixtures/seeded-spindumpsimilarity index 100%rename from tests/VPhoneSignTests/Fixtures/seeded-spindumprename to Tests/VPhoneSignTests/Fixtures/seeded-spindumpdiff --git a/tests/VPhoneSignTests/Fixtures/seeded-sshd b/Tests/VPhoneSignTests/Fixtures/seeded-sshdsimilarity index 100%rename from tests/VPhoneSignTests/Fixtures/seeded-sshdrename to Tests/VPhoneSignTests/Fixtures/seeded-sshddiff --git a/tests/VPhoneSignTests/Fixtures/seeded-sysdiagnose_helper b/Tests/VPhoneSignTests/Fixtures/seeded-sysdiagnose_helpersimilarity index 100%rename from tests/VPhoneSignTests/Fixtures/seeded-sysdiagnose_helperrename to Tests/VPhoneSignTests/Fixtures/seeded-sysdiagnose_helperdiff --git a/tests/VPhoneSignTests/VPhoneSignBlobs.swift b/Tests/VPhoneSignTests/VPhoneSignBlobs.swiftsimilarity index 100%rename from tests/VPhoneSignTests/VPhoneSignBlobs.swiftrename to Tests/VPhoneSignTests/VPhoneSignBlobs.swiftdiff --git a/tests/VPhoneSignTests/VPhoneSignEntitlementsTests.swift b/Tests/VPhoneSignTests/VPhoneSignEntitlementsTests.swiftsimilarity index 100%rename from tests/VPhoneSignTests/VPhoneSignEntitlementsTests.swiftrename to Tests/VPhoneSignTests/VPhoneSignEntitlementsTests.swiftdiff --git a/tests/VPhoneSignTests/VPhoneSignFixtures.swift b/Tests/VPhoneSignTests/VPhoneSignFixtures.swiftsimilarity index 99%rename from tests/VPhoneSignTests/VPhoneSignFixtures.swiftrename to Tests/VPhoneSignTests/VPhoneSignFixtures.swiftindex 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.swiftsimilarity index 100%rename from tests/VPhoneSignTests/VPhoneSignParityTests.swiftrename to Tests/VPhoneSignTests/VPhoneSignParityTests.swiftdiff --git a/tests/VPhoneSignTests/VPhoneSignStyleTests.swift b/Tests/VPhoneSignTests/VPhoneSignStyleTests.swiftsimilarity index 100%rename from tests/VPhoneSignTests/VPhoneSignStyleTests.swiftrename to Tests/VPhoneSignTests/VPhoneSignStyleTests.swiftdiff --git a/research/0_binary_patch_comparison.md b/research/0_binary_patch_comparison.mdindex 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 nodeleted nothing and reported success, on exactly the files it exists to remove. Theshipped version walks with `opendir`/`readdir` and removes with `unlink(2)`, which iswhat `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 aremade with `open(2)` and asserted with `readdir` — a Foundation-built fixture would makethe test pass by having nothing to find.diff --git a/research/host/d2_d3_self_containment.md b/research/host/d2_d3_self_containment.mdindex 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 thefile 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 deliberatelyoutside it**: a test opens a committed fixture of a few megabytes, so mappingbuys nothing, and those fixtures are exactly what the patch tests mutate andwrite back over. Holding the tests to the production rule would trade a memorydiff --git a/research/patches/patch_reference_capture.md b/research/patches/patch_reference_capture.mdindex 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 pagesTXM 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 isdiff --git a/research/restore/p2_restore_off_python.md b/research/restore/p2_restore_off_python.mdindex 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 tableThe 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`** meansit 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.shindex 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:]]')