]> git.saurik.com Git - apple/dyld.git/blob - testing/kernel-cache-tests/large-kcs-errors/test.py
dyld-832.7.1.tar.gz
[apple/dyld.git] / testing / kernel-cache-tests / large-kcs-errors / test.py
1 #!/usr/bin/python2.7
2
3 import os
4 import KernelCollection
5
6 # Error for bad kmod info
7
8 def check(kernel_cache):
9 kernel_cache.buildKernelCollection("x86_64", "/large-kcs-errors/main.kc", "/large-kcs-errors/main.kernel", "/large-kcs-errors/extensions", ["com.apple.foo", "com.apple.bar"], ["-json-errors"])
10
11 assert len(kernel_cache.dictionary()) == 1
12 assert "kernel collection size exceeds maximum size of 1073741824" in kernel_cache.dictionary()[0]
13
14 # [~]> xcrun -sdk macosx.internal cc -arch x86_64 -Wl,-static -mkernel -nostdlib -Wl,-e,__start -Wl,-pie main.c -Wl,-pagezero_size,0x0 -o main.kernel -Wl,-image_base,0x200000 -Wl,-segaddr,__HIB,0x100000 -Wl,-add_split_seg_info -Wl,-install_name,/usr/lib/swift/split.seg.v2.hack
15 # [~]> xcrun -sdk macosx.internal cc -arch x86_64 -Wl,-kext -mkernel -nostdlib -Wl,-add_split_seg_info foo.c -o extensions/foo.kext/foo
16 # [~]> xcrun -sdk macosx.internal cc -arch x86_64 -Wl,-kext -mkernel -nostdlib -Wl,-add_split_seg_info bar.c -o extensions/bar.kext/bar
17