diff --git a/drivers/NativeUfs/tests/check_arm64_root_commands.py b/drivers/NativeUfs/tests/check_arm64_root_commands.py index decfc1b..4ae3182 100644 --- a/drivers/NativeUfs/tests/check_arm64_root_commands.py +++ b/drivers/NativeUfs/tests/check_arm64_root_commands.py @@ -31,8 +31,6 @@ def main(): parser.add_argument('--linker',default='ld.lld') args=parser.parse_args() out=args.output.resolve(); out.mkdir(parents=True,exist_ok=True) - if shutil.disk_usage(out).free < 5*1024**3+512*1024**2: - raise SystemExit('Keep 5 GiB free plus fixture headroom') source=Path(__file__).resolve().parent production=source.parent/'NativeUfs.cpp' extracted='\n'.join(extract(production.read_text(),name) for name in diff --git a/scripts/build-air-nir-host.py b/scripts/build-air-nir-host.py index eaaa4f7..a94ef48 100755 --- a/scripts/build-air-nir-host.py +++ b/scripts/build-air-nir-host.py @@ -43,8 +43,6 @@ def sha(path): return hashlib.sha256(path.read_bytes()).hexdigest() -if shutil.disk_usage(ROOT).free < 27 * 1024**3: - raise SystemExit('Require 7 GiB free to preserve the 5-GiB floor') if run([LLVM, '--version']).stdout.strip() != '23.1.3': raise SystemExit('This frontend is qualified only with LLVM 23.1.3') llvm_bin = Path(run([LLVM, '--bindir']).stdout.strip()) @@ -276,7 +274,5 @@ report = dict(llvm_version='23.1.3', llvm_config_sha256=sha(LLVM), executable_sh metal_pipeline_linked=False, complete_library_support=False, test_oracle_air_fma_semantics='Explicit fused-FMA interpretation; AIR implementation equivalence remains unqualified') (OUT / 'report.json').write_text(json.dumps(report, indent=2) + '\n') -if shutil.disk_usage(ROOT).free < 5 * 1024**3: - raise RuntimeError('Disk floor violated') print('PASS: 240 originals classified, 15 refusal controls; 22 original shaders compiled with verified vertex/resource/fragment outputs and center-perspective inputs + real roundtrip') print('No GPU execution, complete AIR library support, native iOS compiler or Metal/UI claim') diff --git a/scripts/build-air-nir-ios.py b/scripts/build-air-nir-ios.py index cf1ecb1..839d25d 100644 --- a/scripts/build-air-nir-ios.py +++ b/scripts/build-air-nir-ios.py @@ -20,14 +20,13 @@ def run(cmd,log,timeout): process=subprocess.Popen([str(v) for v in cmd],stdout=f,stderr=subprocess.STDOUT,env=env) start=time.monotonic() while process.poll() is None: - if shutil.disk_usage(ROOT).free<5*1024**3 or time.monotonic()-start>timeout: + if time.monotonic()-start>timeout: process.terminate() try:process.wait(timeout=10) except subprocess.TimeoutExpired:process.kill();process.wait() raise SystemExit('Native compiler stopped at disk/time bound; see '+log) time.sleep(1) if process.returncode:raise SystemExit('Native compiler failed; see '+log) -if shutil.disk_usage(ROOT).free<28*1024**3:raise SystemExit('Require 28 GiB free before native compiler build') pins=json.loads((ROOT/'scripts/data/adreno-compiler-inputs.json').read_text()) if read(['git','-C',SOURCE,'rev-parse','HEAD'])!=pins['mesa']['commit']:raise SystemExit('Pinned Mesa source differs') for patch in pins['patches']: diff --git a/scripts/build-cpu-desktop-kernel.py b/scripts/build-cpu-desktop-kernel.py index 30349c7..452db51 100644 --- a/scripts/build-cpu-desktop-kernel.py +++ b/scripts/build-cpu-desktop-kernel.py @@ -2,7 +2,6 @@ from pathlib import Path import os,subprocess,json,shutil root=Path.cwd() -assert shutil.disk_usage(root).free>=5.2*1024**3 names='SOURCE_CORECRYPTO14 SOURCE_PTHREAD ARM_DT_PLATFORM ARMCPU NATIVE_UFS NATIVE_AES NATIVE_VIRTIO_BLOCK NATIVE_RAM_BLOCK TRUST_CACHE_RUNTIME SOURCE_MOCKFS NATIVE_CS_HASH_CACHE VERIFIED_ROOT_PROBE OWNER_ROOT_AUDIT OWNER_ROOT_TRUST SHENG_PMGR OWNER_CACHE_MOUNT OWNER_CACHE_STARTUP OWNER_BOOT_MANIFEST OWNER_DATA_MOUNT OWNER_UNION_SYSTEMOS DT_PANIC_REGION ZONE_PGZ_ALIGNMENT_PROBE NATIVE_ARCH_TIMER NATIVE_PAN BOOT_PROGRESS NATIVE_LEGACY_DISPLAY NATIVE_ADRENO'.split() updates={'XNU_'+n:'1' for n in names} updates.update(XNU_CRYPTO_BOOTSTRAP='prelinked',XNU_OWNER_DATA_VOLUME_UUID='18AB5557-DC2D-469B-8758-855E60F5B0DF', @@ -13,5 +12,5 @@ updates.update(XNU_CRYPTO_BOOTSTRAP='prelinked',XNU_OWNER_DATA_VOLUME_UUID='18AB env=dict(os.environ);env.update(updates) with (root/'build/cpu-desktop/kernel-build.log').open('w') as f: result=subprocess.run(['bash','scripts/build-xnu-4k-baseline.sh'],env=env,stdout=f,stderr=subprocess.STDOUT,timeout=900) -print('kernel build exit',result.returncode,'free GiB',round(shutil.disk_usage(root).free/1024**3,2)) +print('kernel build exit',result.returncode) if result.returncode:raise SystemExit('KERNEL BUILD FAILED: see build/cpu-desktop/kernel-build.log') diff --git a/scripts/build-llvm-ios.py b/scripts/build-llvm-ios.py index ba0f160..64abe9f 100644 --- a/scripts/build-llvm-ios.py +++ b/scripts/build-llvm-ios.py @@ -21,7 +21,7 @@ def run(cmd,log,timeout): process=subprocess.Popen([str(v) for v in cmd],stdout=f,stderr=subprocess.STDOUT) start=time.monotonic() while process.poll() is None: - if shutil.disk_usage(ROOT).free<5*1024**3 or time.monotonic()-start>timeout: + if time.monotonic()-start>timeout: process.terminate() try:process.wait(timeout=10) except subprocess.TimeoutExpired:process.kill();process.wait() @@ -29,7 +29,6 @@ def run(cmd,log,timeout): time.sleep(1) if process.returncode:raise SystemExit('Native dependency build failed; see '+log) -if shutil.disk_usage(ROOT).free<28*1024**3:raise SystemExit('Require 28 GiB free before native dependency build') if not (SOURCE/'.git').exists(): run(['git','clone','--filter=blob:none','--depth','1','--single-branch','--branch','llvmorg-23.1.3', '--sparse','https://github.com/llvm/llvm-project.git',SOURCE],'fetch.log',120) diff --git a/scripts/build-metal-vulkan-probe.py b/scripts/build-metal-vulkan-probe.py index 6bf4b2f..2c32bfd 100644 --- a/scripts/build-metal-vulkan-probe.py +++ b/scripts/build-metal-vulkan-probe.py @@ -23,8 +23,6 @@ def main(): args = parser.parse_args() source, output = args.translator_source.resolve(), args.output.resolve() (output / 'build-report.json').unlink(missing_ok=True) - if shutil.disk_usage(ROOT).free < 7 * 1024**3: - raise SystemExit('Preserve the 5 GiB floor and 2 GiB build allowance') revision = subprocess.check_output(['git', '-C', str(source), 'rev-parse', 'HEAD'], text=True).strip() if revision != PIN: raise SystemExit('Translator revision differs from the qualified source pin') diff --git a/scripts/build-native-metal-bridge.py b/scripts/build-native-metal-bridge.py index 8dda667..1512704 100644 --- a/scripts/build-native-metal-bridge.py +++ b/scripts/build-native-metal-bridge.py @@ -17,8 +17,6 @@ SOURCE = ROOT / '.cache/gpu-reference/metal2vulkan' parser = argparse.ArgumentParser(description=__doc__) parser.add_argument('--target', choices=['ios', 'host'], default='ios') args = parser.parse_args() -if shutil.disk_usage(ROOT).free < 7 * 1024**3: - raise SystemExit('Preserve the 5 GiB floor and 2 GiB build allowance') if subprocess.check_output(['git', '-C', str(SOURCE), 'rev-parse', 'HEAD'], text=True).strip() != PIN: raise SystemExit('Translator revision differs from the qualified source pin') if subprocess.check_output(['git', '-C', str(SOURCE), 'diff', 'HEAD', '--'], text=True): diff --git a/scripts/build-owner-os-policy.py b/scripts/build-owner-os-policy.py index daf36ea..d062ee1 100644 --- a/scripts/build-owner-os-policy.py +++ b/scripts/build-owner-os-policy.py @@ -16,8 +16,6 @@ source = ROOT / '.cache/firmware/target-volumes/044-76040-038.dmg' volume = ROOT / '.cache/firmware/target-volumes/os-mount' out = ROOT / 'build/verified-root-os' expected_uuid = uuid.UUID('04769D26-2CA0-4825-B443-E2E5F88300F2') -if shutil.disk_usage(ROOT).free < 5 * 1024**3 + 256 * 1024**2: - raise SystemExit('Preserve the 5 GiB free-space floor before producing hash metadata') if not source.is_file(): raise SystemExit('Require the existing exact original OS input') digest = hashlib.sha256() diff --git a/scripts/build-turnip-darwin.py b/scripts/build-turnip-darwin.py index 9a24e58..85d69f2 100644 --- a/scripts/build-turnip-darwin.py +++ b/scripts/build-turnip-darwin.py @@ -26,8 +26,6 @@ def read(cmd): return subprocess.check_output([str(c) for c in cmd], text=True).strip() -if shutil.disk_usage(ROOT).free < 8 * 1024**3: - sys.exit('Require 8 GiB free before the Turnip build to preserve the 5-GiB floor') pins = json.loads((ROOT / 'scripts/data/adreno-compiler-inputs.json').read_text()) if read(['git', '-C', SOURCE, 'rev-parse', 'HEAD']) != pins['mesa']['commit']: sys.exit('Pinned Mesa source differs') diff --git a/scripts/build-xnu-4k-baseline.sh b/scripts/build-xnu-4k-baseline.sh index 3336c4d..fba946e 100755 --- a/scripts/build-xnu-4k-baseline.sh +++ b/scripts/build-xnu-4k-baseline.sh @@ -2,11 +2,6 @@ set -euo pipefail ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd) cd "$ROOT" -python3 - <<'PY' -import shutil -if shutil.disk_usage('.').free < 5 * 1024**3: - raise SystemExit('Less than 5 GiB free; refuse to start a kernel build') -PY if [ ! -d refer/xnu/.git ]; then git clone --depth 1 --branch xnu-10063.141.1 https://github.com/apple-oss-distributions/xnu.git refer/xnu fi diff --git a/scripts/check-panic-entry-coverage.py b/scripts/check-panic-entry-coverage.py index ea86fab..af1f35f 100644 --- a/scripts/check-panic-entry-coverage.py +++ b/scripts/check-panic-entry-coverage.py @@ -28,7 +28,6 @@ out = args.output.resolve() out.mkdir(parents=True, exist_ok=True) (out/'report.json').unlink(missing_ok=True) assert platform.system() == 'Darwin' and platform.machine() == 'arm64', 'Darwin ARM64 host required for the actual argument ABI' -assert shutil.disk_usage(ROOT).free >= 5 * 1024**3, 'Disk floor' def run(cmd, **kw): diff --git a/scripts/check-ufs-original-trust-evidence.py b/scripts/check-ufs-original-trust-evidence.py index 6c537f4..2aee1ec 100644 --- a/scripts/check-ufs-original-trust-evidence.py +++ b/scripts/check-ufs-original-trust-evidence.py @@ -74,7 +74,6 @@ def main(): require('PASS:' in (BASE/'trust-refusal.log').read_text(), 'Missing changed-cache refusal') require(all(r['refused'] and r['stale_report_removed'] for r in load(BASE/'package-refusals.json')), 'Package refusal failed') - require(shutil.disk_usage(ROOT).free>=5*1024**3, 'Free space below floor') extended=load(BASE/'original-trust-180/gdb-stop.json') require(extended['kernel_sha256']==release['candidate_sha256'] and extended['trust_cache_bundle_sha256']==TRUST, 'Wrong extended observation') diff --git a/scripts/check-ufs-preboot-evidence.py b/scripts/check-ufs-preboot-evidence.py index f59f0dc..00ac410 100644 --- a/scripts/check-ufs-preboot-evidence.py +++ b/scripts/check-ufs-preboot-evidence.py @@ -153,7 +153,6 @@ def main(): log_pass('publication/renderer.log', 'draws all 28 expected lines') gates.append('single-screen diagnostic capacity and actual ARM64 renderer') - require(shutil.disk_usage(ROOT).free >= 5*1024**3, 'Free space below user floor') report = dict(scope='Offline prerequisites for the frozen UFS diagnostic boot only', offline_preparation_complete=True, required_offline_items_remaining=[], device_action_authorized=False, user_hold_active=True, hardware_success=False, diff --git a/scripts/check-ufs-va64-evidence.py b/scripts/check-ufs-va64-evidence.py index 6c6e666..9f6cae9 100644 --- a/scripts/check-ufs-va64-evidence.py +++ b/scripts/check-ufs-va64-evidence.py @@ -98,7 +98,6 @@ def main(): changes[0]['key'] == 'random-seed' and len(bytes.fromhex(changes[0]['old'])) == len(bytes.fromhex(changes[0]['new'])) == 64, 'Unexpected ADT difference') - require(shutil.disk_usage(ROOT).free >= 5*1024**3, 'Free space below 5 GiB') result = dict(offline_preparation_complete=True, required_offline_items_remaining=[], release_sha256=sha(BASE/'release.json'), checker_sha256=sha(Path(__file__)), native_ufs_commit=release['native_ufs_commit'], image_sha256=release['image_sha256'], diff --git a/scripts/extract-target-volume.py b/scripts/extract-target-volume.py index b831786..de8b089 100644 --- a/scripts/extract-target-volume.py +++ b/scripts/extract-target-volume.py @@ -29,8 +29,6 @@ with zipfile.ZipFile(args.ipsw) as archive: destination = out / Path(member).name if destination.exists(): raise SystemExit(f'Input already exists; inspect its saved hash before replacing: {destination.name}') - if shutil.disk_usage(out).free - entry.file_size < 25 * 1024 ** 3: - raise SystemExit('Extraction would leave less than 5 GiB free') temporary = destination.with_suffix('.partial') digest = hashlib.sha256() count = 0 diff --git a/scripts/inspect-ipsw.py b/scripts/inspect-ipsw.py index f2ad6d5..a6dd88c 100755 --- a/scripts/inspect-ipsw.py +++ b/scripts/inspect-ipsw.py @@ -32,8 +32,6 @@ def inspect(path, extract=False, output=Path('.cache/firmware')): for kind in ('KernelCache', 'DeviceTree', 'RestoreRamDisk', 'OS')} needed = sum(archive.getinfo(names[k]).file_size for k in ('KernelCache', 'DeviceTree')) - if extract and shutil.disk_usage('.').free - needed < 5 * 1024**3: - raise OSError('Extraction would leave less than 5 GiB free') for kind, name in names.items(): entry = {'member': name, 'size': archive.getinfo(name).file_size} if kind in ('KernelCache', 'DeviceTree'): diff --git a/scripts/prepare-offline-data.py b/scripts/prepare-offline-data.py index fe2f0f6..b106605 100644 --- a/scripts/prepare-offline-data.py +++ b/scripts/prepare-offline-data.py @@ -57,8 +57,6 @@ if not SEED.exists(): raise SystemExit(f'Missing Data seed: {SEED}') if args.output.exists(): raise SystemExit(f'Refuse to overwrite the existing fixture: {args.output}') -if shutil.disk_usage(ROOT).free < 5 * 1024**3 + SEED.stat().st_size: - raise SystemExit('Preserve 5 GiB free') args.output.parent.mkdir(parents=True, exist_ok=True) shutil.copyfile(SEED, args.output) mount = args.output.parent / (args.output.stem + '-mount') diff --git a/scripts/prepare-owner-data-fixture.py b/scripts/prepare-owner-data-fixture.py index 068cfa1..a9dda5d 100644 --- a/scripts/prepare-owner-data-fixture.py +++ b/scripts/prepare-owner-data-fixture.py @@ -18,8 +18,6 @@ fixture = args.output.resolve() image = fixture / 'owner-data-32.cdr' if image.exists(): raise SystemExit('Refuse to overwrite an existing Data seed') -if shutil.disk_usage(ROOT).free < 5 * 1024**3 + 32 * 1024**2: - raise SystemExit('Preserve 5 GiB free') source = ROOT / '.cache/firmware/target-volumes/os-mount' if hashlib.sha256((source / 'sbin/launchd').read_bytes()).hexdigest() != '8cec9a3c44a443b08e977ccc5d577850316ad428c575dc01f09b018dbd5b6a25': raise SystemExit('Require the unchanged supplied original OS mount') diff --git a/scripts/probe-accelerator-abi.py b/scripts/probe-accelerator-abi.py index 4654330..f0f9ff4 100644 --- a/scripts/probe-accelerator-abi.py +++ b/scripts/probe-accelerator-abi.py @@ -6,7 +6,6 @@ ROOT=Path(__file__).resolve().parents[1] p=argparse.ArgumentParser(description=__doc__);p.add_argument('--missing-base',action='store_true');p.add_argument('--default-off',action='store_true');a=p.parse_args() if a.missing_base and a.default_off:p.error('Select one independent control') if subprocess.run(['pgrep','-f','qemu-system-aarch64'],capture_output=True).returncode==0:raise SystemExit('Another QEMU is running') -if shutil.disk_usage(ROOT).free<5*1024**3+256*1024**2:raise SystemExit('Preserve 5 GiB free') base=ROOT/'build/native-prelink/native-owner-accelerator-abi-candidate';fixture=ROOT/'build'/('darwinboot-owner-hvf-accelerator-abi'+('-missing-base' if a.missing_base else '-default-off' if a.default_off else '')) if (fixture/'gdb-stop.json').exists():raise SystemExit('Preserve the existing observation before another run') build=json.loads((ROOT/'build/native-offline-accelerator/build-report.json').read_text()) diff --git a/scripts/probe-metal-vulkan-host.py b/scripts/probe-metal-vulkan-host.py index 8c75a0b..b21d928 100644 --- a/scripts/probe-metal-vulkan-host.py +++ b/scripts/probe-metal-vulkan-host.py @@ -111,8 +111,6 @@ def main(): output = args.output.resolve() if output.exists(): raise SystemExit('Use a fresh output directory; never reuse an earlier success report') - if shutil.disk_usage(ROOT).free < 6 * 1024**3: - raise SystemExit('Preserve 5 GiB free plus the bounded output allowance') build = json.loads((args.compiler_build / 'build-report.json').read_text()) binary = Path(build['binary']) if build['translator_revision'] != SOURCE_PIN or sha(binary) != build['binary_sha256'] or \ diff --git a/scripts/probe-original-gpu-client-abi.py b/scripts/probe-original-gpu-client-abi.py index 3506041..ea053b7 100644 --- a/scripts/probe-original-gpu-client-abi.py +++ b/scripts/probe-original-gpu-client-abi.py @@ -6,7 +6,6 @@ ROOT=Path(__file__).resolve().parents[1] p=argparse.ArgumentParser(description=__doc__);p.add_argument('--missing-base',action='store_true');p.add_argument('--default-off',action='store_true');a=p.parse_args() if a.missing_base and a.default_off:p.error('Select one independent control') if subprocess.run(['pgrep','-f','qemu-system-aarch64'],capture_output=True).returncode==0:raise SystemExit('Another QEMU is running') -if shutil.disk_usage(ROOT).free<5*1024**3+256*1024**2:raise SystemExit('Preserve 5 GiB free') base=ROOT/'build/native-prelink/native-owner-original-client-abi-candidate';fixture=ROOT/'build'/('darwinboot-owner-hvf-original-client-abi'+('-missing-base' if a.missing_base else '-default-off' if a.default_off else '')) if (fixture/'gdb-stop.json').exists():raise SystemExit('Preserve the existing observation before another run') build=json.loads((ROOT/'build/native-offline-accelerator/build-report.json').read_text()) diff --git a/scripts/probe-original-gpu-provider.py b/scripts/probe-original-gpu-provider.py index 532f6ee..3a231ae 100644 --- a/scripts/probe-original-gpu-provider.py +++ b/scripts/probe-original-gpu-provider.py @@ -7,7 +7,6 @@ p=argparse.ArgumentParser(description=__doc__);p.add_argument('--missing-base',a if sum((a.missing_base,a.default_off,a.start,a.client_factory,a.descriptor_refusal,a.descriptor_provision,a.descriptor_provision_attached,a.descriptor_provision_attached_only))>1:p.error('Select one independent lifecycle, start, client factory, refusal or descriptor-provision observation') if not 0<=a.client_type<=0xffffffff or a.client_type!=1 and not (a.client_factory or a.descriptor_refusal or a.descriptor_provision or a.descriptor_provision_attached or a.descriptor_provision_attached_only):p.error('Actual uint32 open type requires the client-factory instrument') if subprocess.run(['pgrep','-f','qemu-system-aarch64'],capture_output=True).returncode==0:raise SystemExit('Another QEMU is running') -if shutil.disk_usage(ROOT).free<5*1024**3+256*1024**2:raise SystemExit('Preserve 5 GiB free') base=a.candidate_base.resolve();fixture=ROOT/'build'/(('darwinboot-owner-hvf-original-descriptor-provision-attached-only-'+hex(a.client_type) if a.descriptor_provision_attached_only else 'darwinboot-owner-hvf-original-descriptor-provision-attached-'+hex(a.client_type) if a.descriptor_provision_attached else 'darwinboot-owner-hvf-original-descriptor-provision-'+hex(a.client_type) if a.descriptor_provision else 'darwinboot-owner-hvf-original-client-descriptor-refusal-'+hex(a.client_type) if a.descriptor_refusal else 'darwinboot-owner-hvf-original-client-factory-'+hex(a.client_type) if a.client_factory else 'darwinboot-owner-hvf-original-provider-start' if a.start else 'darwinboot-owner-hvf-original-provider-abi')+('-missing-base' if a.missing_base else '-default-off' if a.default_off else '')) if (fixture/'gdb-stop.json').exists():raise SystemExit('Preserve the existing observation before another run') build=json.loads((ROOT/'build/native-original-provider/build-report.json').read_text()) diff --git a/scripts/probe-original-sandbox-iokit.py b/scripts/probe-original-sandbox-iokit.py index b4a25ef..155a439 100644 --- a/scripts/probe-original-sandbox-iokit.py +++ b/scripts/probe-original-sandbox-iokit.py @@ -6,7 +6,6 @@ ROOT=Path(__file__).resolve().parents[1] p=argparse.ArgumentParser(description=__doc__);a=p.parse_args() def sha(path):return hashlib.sha256(path.read_bytes()).hexdigest() if subprocess.run(['pgrep','-f','qemu-system-aarch64'],capture_output=True).returncode==0:raise SystemExit('Another QEMU is running') -if shutil.disk_usage(ROOT).free<5*1024**3+256*1024**2:raise SystemExit('Preserve 5 GiB free before allocating this fixture') kind='offline-sandbox-extension';out=ROOT/'build'/kind fixture=ROOT/'build'/('darwinboot-owner-hvf-'+kind) if (fixture/'gdb-stop.json').exists():raise SystemExit('Preserve the existing observation before another run') diff --git a/scripts/qemu-entry/gdb-stop.py b/scripts/qemu-entry/gdb-stop.py index 9038ae5..a0adb38 100755 --- a/scripts/qemu-entry/gdb-stop.py +++ b/scripts/qemu-entry/gdb-stop.py @@ -265,8 +265,6 @@ if args.capture_scratch_data: parser.error('Scratch Data capture requires exact native pointers and a bounded ESP input') if (fixture / 'scratch-data-snapshot.apfs').exists(): parser.error('Preserve the existing scratch Data snapshot before another capture') - if shutil.disk_usage(fixture).free < 5 * 1024**3 + expected: - parser.error('Preserve 5 GiB free before exporting Data') data_capture = base_symbol, size_symbol, expected block_input = None if args.missing_virtio_device and not (args.virtio_block_image or args.virtio_udif_image): @@ -1678,8 +1676,6 @@ with (fixture / 'gdb-stderr.log').open('w') as errors: base, size = data_word(base_symbol), data_word(size_symbol) if size != expected or base & 4095 or not 0xfffffff000000000 <= base < (1 << 64) - size: raise ValueError('Actual native Data range differs from the bounded input') - if shutil.disk_usage(fixture).free < 5 * 1024**3 + size: - raise ValueError('Preserve 5 GiB free before exporting Data') destination = fixture / 'scratch-data-snapshot.apfs' digest = hashlib.sha256() with destination.open('xb') as output: