12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- #!/usr/bin/python
- import os, sys, mmap
- from regression import Regression
- loader = os.environ['PAL_LOADER']
- regression = Regression(loader, "Symbols")
- all_symbols = [
- 'DkVirtualMemoryAlloc',
- 'DkVirtualMemoryFree',
- 'DkVirtualMemoryProtect',
- 'DkProcessCreate',
- 'DkProcessExit',
- 'DkProcessSandboxCreate',
- 'DkStreamOpen',
- 'DkStreamWaitForClient',
- 'DkStreamRead',
- 'DkStreamWrite',
- 'DkStreamDelete',
- 'DkStreamMap',
- 'DkStreamUnmap',
- 'DkStreamSetLength',
- 'DkStreamFlush',
- 'DkSendHandle',
- 'DkReceiveHandle',
- 'DkStreamAttributesQuery',
- 'DkStreamAttributesQuerybyHandle',
- 'DkStreamAttributesSetbyHandle',
- 'DkStreamGetName',
- 'DkStreamChangeName',
- 'DkThreadCreate',
- 'DkThreadDelayExecution',
- 'DkThreadYieldExecution',
- 'DkThreadExit',
- 'DkThreadResume',
- 'DkSetExceptionHandler',
- 'DkExceptionReturn',
- 'DkSemaphoreCreate',
- 'DkSemaphoreRelease',
- 'DkNotificationEventCreate',
- 'DkSynchronizationEventCreate',
- 'DkEventSet',
- 'DkEventClear',
- 'DkObjectsWaitAny',
- 'DkObjectReference',
- 'DkObjectClose',
- 'DkSystemTimeQuery',
- 'DkRandomBitsRead',
- 'DkInstructionCacheFlush',
- 'DkSegmentRegister',
- 'DkMemoryAvailableQuota',
- 'DkCreatePhysicalMemoryChannel',
- 'DkPhysicalMemoryCommit',
- 'DkPhysicalMemoryMap']
- def check_symbols(res):
- for sym in all_symbols:
- found = False
- for line in res[0].log:
- if line and line.startswith(sym + ' = '):
- if line == sym + ' = 0x0':
- return False
- found = True
- break
- if not found:
- return False
- return True
- regression.add_check(name="Symbol Resolution", check=check_symbols);
- rv = regression.run_checks()
- if rv: sys.exit(rv)
|