redo boot around an explicit system volume and fixed kernel/HAL images, redo volumes and filesystem paths around capabilities instead of drive numbers and kernel CWD state, add a capability/security model with derived and revocable handles and security contexts, add port IPC and rssrv to manage the userspace resource namespace and publish the system volume, move process, dll and path loading to userspace and add process builder syscalls, init now supervises rssrv and the session process, redo the syscall ABI around request structs and four arguments, add a volume manager and proper partition arrival/removal handling so FAT and NTFS mount dynamically, clean up the HAL/DDK boundary so drivers don't depend on HAL internals, save fpu state properly now, the serial driver doesn't hang on a missing port, fix AHCI startup races, fix timeout accounting, fix shared mmap writeback, more smoke tests
This commit is contained in:
1 parent
4add6789ba
commit
f882d339fb
232 files changed
+20934
-8898
No files matched your search
@@ -5,6 +5,8 @@
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include <ntlite/syscall.h>
|
||||
#include <ntlite/path.h>
|
||||
#include <ntlite/process_loader.h>
|
||||
|
||||
#define ALL_TESTS_INITIAL_CAPACITY 32u
|
||||
|
||||
@@ -14,7 +16,7 @@ typedef struct TEST_ENTRY {
|
||||
|
||||
// Writes one NUL-terminated string to the console.
|
||||
static void print(const char* s) {
|
||||
SYS_WRITE_CONSOLE_REQUEST req = { SysSvFromCstr(s) };
|
||||
SYS_WRITE_CONSOLE_REQUEST req = { sizeof(SYS_WRITE_CONSOLE_REQUEST), SysSvFromCstr(s) };
|
||||
SysWriteConsole(&req);
|
||||
}
|
||||
|
||||
@@ -199,7 +201,7 @@ static bool build_child_path(const char* dir, const char* name, char* out, size_
|
||||
|
||||
memcpy(out, dir, dirLen);
|
||||
size_t pos = dirLen;
|
||||
if (needSep) out[pos++] = '\\';
|
||||
if (needSep) out[pos++] = '/';
|
||||
memcpy(out + pos, name, nameLen);
|
||||
out[total] = '\0';
|
||||
return true;
|
||||
@@ -211,8 +213,10 @@ static uint32_t collect_tests(const char* dir, const char* selfName, TEST_ENTRY*
|
||||
*countOut = 0;
|
||||
|
||||
uint32_t hDir = 0;
|
||||
SYS_PATH_HANDLE_REQUEST openReq = { SysSvFromCstr(dir), &hDir };
|
||||
uint32_t status = SysOpenDir(&openReq);
|
||||
uint32_t status = NtlOpenDir(SysSvFromCstr(dir),
|
||||
SYS_DIR_ACCESS_ENUMERATE | SYS_DIR_ACCESS_OPEN,
|
||||
SYS_DIR_FLAG_NONE,
|
||||
&hDir);
|
||||
if (status != NTLSTATUS_SUCCESS) return status;
|
||||
|
||||
TEST_ENTRY* entries = 0;
|
||||
@@ -251,13 +255,28 @@ static uint32_t collect_tests(const char* dir, const char* selfName, TEST_ENTRY*
|
||||
|
||||
// Runs one test process and returns the child's exit code through exitCodeOut.
|
||||
static uint32_t run_test(const char* path, int32_t* exitCodeOut) {
|
||||
uint32_t imageFile = SYS_HANDLE_INVALID;
|
||||
uint32_t status = NtlOpenFile(SysSvFromCstr(path),
|
||||
SYS_FILE_ACCESS_READ | SYS_FILE_ACCESS_QUERY,
|
||||
SYS_FILE_OPEN_EXISTING,
|
||||
SYS_FILE_FLAG_NONE,
|
||||
&imageFile);
|
||||
if (status != NTLSTATUS_SUCCESS) return status;
|
||||
|
||||
uint32_t process = 0;
|
||||
SYS_CREATE_PROCESS_REQUEST req;
|
||||
NTL_CREATE_SYSTEM_PROCESS_REQUEST req;
|
||||
memset(&req, 0, sizeof(req));
|
||||
req.Size = sizeof(req);
|
||||
req.Flags = NTL_PROCESS_LOAD_FLAG_NONE;
|
||||
req.ImageFile = imageFile;
|
||||
req.Path = SysSvFromCstr(path);
|
||||
req.CommandLine = SysSvFromCstr(path);
|
||||
req.HandleOut = &process;
|
||||
req.SecurityContext = SYS_SECURITY_CONTEXT_CURRENT;
|
||||
req.ResolveModuleName = NtlResolveSystemModuleName;
|
||||
req.ProcessHandleOut = &process;
|
||||
|
||||
uint32_t status = SysCreateProcess(&req);
|
||||
status = NtlCreateSystemProcess(&req);
|
||||
(void)SysCloseHandle(imageFile);
|
||||
if (status != NTLSTATUS_SUCCESS) return status;
|
||||
|
||||
status = SysWait(process, SYS_WAIT_FLAG_NONE);
|
||||
|
||||
Reference in new issue
Block a user