replace nob with ms' build, move disk creation to build.bat, major comment cleanup, remove old and stupid tests, overhaul interrupt management with per-CPU vector allocation, affinity migration and safe teardown, add proper IOAPIC routing and PCI MSI/MSI-X/INTx support, migrate drivers to the new interrupt API, integrate ACPICA with a proper OS services layer, move ACPI firmware events, power button handling and S5 shutdown into acpi.sys, add parallel driver startup and atomic publication, replace PnP arrays with dynamic lists, redesign service startup again to be asynchronous, add delayed startup mode for services, allow omitting keys in services.ini, fix acpi ec deferred work handling, fix kernel threads having garbage exit code.

This commit is contained in:
maksw committed 2026-10-28 15:18:43 +01:00
1 parent d36f19509c
commit 36eef8f58d
696 files changed
+147281 -7530

No files matched your search

-5
View File
@@ -14,13 +14,11 @@ typedef struct TEST_ENTRY {
char Name[SYS_DIR_NAME_MAX];
} TEST_ENTRY;
// Writes one NUL-terminated string to the console.
static void print(const char* s) {
SYS_WRITE_CONSOLE_REQUEST req = { sizeof(SYS_WRITE_CONSOLE_REQUEST), SysSvFromCstr(s) };
SysWriteConsole(&req);
}
// Writes one unsigned integer to the console.
static void print_u64(uint64_t v) {
char buf[32];
int i = 0;
@@ -38,7 +36,6 @@ static void print_u64(uint64_t v) {
}
}
// Writes one signed integer to the console.
static void print_i32(int32_t v) {
if (v < 0) {
print("-");
@@ -48,7 +45,6 @@ static void print_i32(int32_t v) {
print_u64((uint32_t)v);
}
// Writes one 32-bit value as hexadecimal.
static void print_hex32(uint32_t v) {
static const char hex[] = "0123456789abcdef";
for (int i = 7; i >= 0; i--) {
@@ -294,7 +290,6 @@ static uint32_t run_test(const char* path, int32_t* exitCodeOut) {
return NTLSTATUS_SUCCESS;
}
// Program entry point.
int main(void) {
print("all_tests: start\n");
+1
View File
@@ -0,0 +1 @@
!include $(BASEDIR)\makefile.def
+7
View File
@@ -0,0 +1,7 @@
TARGETNAME=all_tests
TARGETPATH=obj
TARGETTYPE=PROGRAM
FLAVOR=USER
TARGETLIBS="$(BASEDIR)\bin\syscall.lib" "$(BASEDIR)\bin\libc.lib" "$(BASEDIR)\bin\native_runtime.lib"
EXTRA_LFLAGS=/ENTRY:NtlNativeStart
SOURCES=@/code/user/tests/all_tests/all_tests.c
@@ -18,13 +18,11 @@ typedef char TEST_QUEUE_MESSAGE_SIZE_CHECK[
(sizeof(TEST_QUEUE_MESSAGE) == SYS_QUEUE_MESSAGE_SIZE) ? 1 : -1
];
// Prints one NUL-terminated string to the kernel console.
static void print(const char* s) {
SYS_WRITE_CONSOLE_REQUEST req = { sizeof(SYS_WRITE_CONSOLE_REQUEST), SysSvFromCstr(s) };
SysWriteConsole(&req);
}
// Prints one unsigned integer to the kernel console.
static void print_u64(uint64_t v) {
char buf[32];
int i = 0;
@@ -43,12 +41,10 @@ static void print_u64(uint64_t v) {
}
}
// Terminates the current test process.
static void exit_now(int code) {
while (true) SysExitProcess(code);
}
// Fails the test with one plain message.
static void fail(const char* msg) {
print("anonymous_queue_smoke: ");
print(msg);
@@ -56,7 +52,6 @@ static void fail(const char* msg) {
exit_now(1);
}
// Fails the test with one status value.
static void fail_status(const char* what, KSTATUS status) {
print("anonymous_queue_smoke: ");
print(what);
@@ -0,0 +1 @@
!include $(BASEDIR)\makefile.def
@@ -0,0 +1,7 @@
TARGETNAME=anonymous_queue_smoke
TARGETPATH=obj
TARGETTYPE=PROGRAM
FLAVOR=USER
TARGETLIBS="$(BASEDIR)\bin\syscall.lib" "$(BASEDIR)\bin\libc.lib" "$(BASEDIR)\bin\native_runtime.lib"
EXTRA_LFLAGS=/ENTRY:NtlNativeStart
SOURCES=@/code/user/tests/anonymous_queue_smoke/anonymous_queue_smoke.c
@@ -72,7 +72,6 @@ typedef struct DIRECT_APC_STATE {
volatile uint32_t ArgumentsValid;
} DIRECT_APC_STATE;
// Records one directly queued generic user APC.
static void direct_apc(void* context, void* argument1, void* argument2) {
DIRECT_APC_STATE* state = (DIRECT_APC_STATE*)context;
if (!state) return;
@@ -0,0 +1 @@
!include $(BASEDIR)\makefile.def
+7
View File
@@ -0,0 +1,7 @@
TARGETNAME=apc_return_smoke
TARGETPATH=obj
TARGETTYPE=PROGRAM
FLAVOR=USER
TARGETLIBS="$(BASEDIR)\bin\syscall.lib" "$(BASEDIR)\bin\libc.lib" "$(BASEDIR)\bin\native_runtime.lib"
EXTRA_LFLAGS=/ENTRY:NtlNativeStart
SOURCES=@/code/user/tests/apc_return_smoke/apc_return_smoke.c
+1
View File
@@ -0,0 +1 @@
!include $(BASEDIR)\makefile.def
+7
View File
@@ -0,0 +1,7 @@
TARGETNAME=async_apc
TARGETPATH=obj
TARGETTYPE=PROGRAM
FLAVOR=USER
TARGETLIBS="$(BASEDIR)\bin\syscall.lib" "$(BASEDIR)\bin\libc.lib" "$(BASEDIR)\bin\native_runtime.lib"
EXTRA_LFLAGS=/ENTRY:NtlNativeStart
SOURCES=@/code/user/tests/async_apc/async_apc.c
+1
View File
@@ -0,0 +1 @@
!include $(BASEDIR)\makefile.def
+7
View File
@@ -0,0 +1,7 @@
TARGETNAME=async_cancel
TARGETPATH=obj
TARGETTYPE=PROGRAM
FLAVOR=USER
TARGETLIBS="$(BASEDIR)\bin\syscall.lib" "$(BASEDIR)\bin\libc.lib" "$(BASEDIR)\bin\native_runtime.lib"
EXTRA_LFLAGS=/ENTRY:NtlNativeStart
SOURCES=@/code/user/tests/async_cancel/async_cancel.c
@@ -32,7 +32,6 @@ typedef char TEST_AUDIO_STREAM_INFO_SIZE[(sizeof(SYS_AUDIO_STREAM_INFO) == 128)
typedef char TEST_AUDIO_VOLUME_REQUEST_SIZE[(sizeof(SYS_AUDIO_SET_VOLUME_REQUEST) == 24) ? 1 : -1];
typedef char TEST_AUDIO_MASTER_VOLUME_REQUEST_SIZE[(sizeof(SYS_AUDIO_SET_MASTER_VOLUME_REQUEST) == 20) ? 1 : -1];
// Writes one NUL-terminated string to the console.
static void print(const char* text) {
SYS_WRITE_CONSOLE_REQUEST request = { sizeof(SYS_WRITE_CONSOLE_REQUEST), SysSvFromCstr(text) };
(void)SysWriteConsole(&request);
@@ -45,7 +44,6 @@ static void trace_stage(const char* message) {
print(message);
}
// Writes one unsigned integer to the console.
static void print_u64(uint64_t value) {
char digits[32];
uint32_t count = 0;
@@ -73,13 +71,11 @@ static void cleanup_stream(void) {
gOpenStream = 0;
}
// Terminates the test process.
static void exit_now(int32_t code) {
cleanup_stream();
while (true) (void)SysExitProcess(code);
}
// Fails the test with one status value.
static void fail_status(const char* operation, KSTATUS status) {
print("audio_stream_smoke: ");
print(operation);
@@ -89,7 +85,6 @@ static void fail_status(const char* operation, KSTATUS status) {
exit_now(1);
}
// Fails the test with one plain diagnostic.
static void fail(const char* message) {
print("audio_stream_smoke: ");
print(message);
@@ -307,7 +302,6 @@ static uint32_t open_stream(uint32_t endpointId) {
NTLSTATUS_SUCCESS);
}
// Writes one sample run and returns the accepted frame count.
static uint32_t write_samples(uint32_t stream,
const int16_t* frames,
uint32_t frameCount,
@@ -327,7 +321,6 @@ static uint32_t write_samples(uint32_t stream,
return written;
}
// Writes one contract-tone range and returns the accepted frame count.
static uint32_t write_frames(uint32_t stream,
uint32_t frameOffset,
uint32_t frameCount,
@@ -0,0 +1 @@
!include $(BASEDIR)\makefile.def
@@ -0,0 +1,7 @@
TARGETNAME=audio_stream_smoke
TARGETPATH=obj
TARGETTYPE=PROGRAM
FLAVOR=USER
TARGETLIBS="$(BASEDIR)\bin\syscall.lib" "$(BASEDIR)\bin\libc.lib" "$(BASEDIR)\bin\native_runtime.lib"
EXTRA_LFLAGS=/ENTRY:NtlNativeStart
SOURCES=@/code/user/tests/audio_stream_smoke/audio_stream_smoke.c
@@ -10,13 +10,11 @@ static void exit_test(int code) {
for (;;) SysExitProcess(code);
}
// Writes one diagnostic string through the transitional native console.
static void print(const char* text) {
SYS_WRITE_CONSOLE_REQUEST request = { sizeof(request), SysSvFromCstr(text) };
(void)SysWriteConsole(&request);
}
// Writes one status value in hexadecimal without a formatting runtime.
static void print_status(KSTATUS status) {
static const char digits[] = "0123456789ABCDEF";
char buffer[11] = "0x00000000";
@@ -0,0 +1 @@
!include $(BASEDIR)\makefile.def
@@ -0,0 +1,7 @@
TARGETNAME=console_service_smoke
TARGETPATH=obj
TARGETTYPE=PROGRAM
FLAVOR=USER
TARGETLIBS="$(BASEDIR)\bin\syscall.lib" "$(BASEDIR)\bin\libc.lib" "$(BASEDIR)\bin\native_runtime.lib"
EXTRA_LFLAGS=/ENTRY:NtlNativeStart
SOURCES=@/code/user/tests/console_service_smoke/console_service_smoke.c
@@ -0,0 +1 @@
!include $(BASEDIR)\makefile.def
@@ -0,0 +1,7 @@
TARGETNAME=cwd_userspace_smoke
TARGETPATH=obj
TARGETTYPE=PROGRAM
FLAVOR=USER
TARGETLIBS="$(BASEDIR)\bin\syscall.lib" "$(BASEDIR)\bin\libc.lib" "$(BASEDIR)\bin\native_runtime.lib"
EXTRA_LFLAGS=/ENTRY:NtlNativeStart
SOURCES=@/code/user/tests/cwd_userspace_smoke/cwd_userspace_smoke.c
@@ -14,13 +14,11 @@ static void exit_now(int code) {
while (true) SysExitProcess(code);
}
// Writes one diagnostic string through the transitional native console.
static void print(const char* text) {
SYS_WRITE_CONSOLE_REQUEST request = { sizeof(request), SysSvFromCstr(text) };
(void)SysWriteConsole(&request);
}
// Writes one status value in hexadecimal without a formatting runtime.
static void print_status(KSTATUS status) {
static const char digits[] = "0123456789ABCDEF";
char buffer[11] = "0x00000000";
+1
View File
@@ -0,0 +1 @@
!include $(BASEDIR)\makefile.def
+7
View File
@@ -0,0 +1,7 @@
TARGETNAME=desktop_smoke
TARGETPATH=obj
TARGETTYPE=PROGRAM
FLAVOR=USER
TARGETLIBS="$(BASEDIR)\bin\syscall.lib" "$(BASEDIR)\bin\libc.lib" "$(BASEDIR)\bin\native_runtime.lib"
EXTRA_LFLAGS=/ENTRY:NtlNativeStart
SOURCES=@/code/user/tests/desktop_smoke/desktop_smoke.c
+1
View File
@@ -0,0 +1 @@
DIRS=all_tests anonymous_queue_smoke apc_return_smoke async_apc async_cancel audio_stream_smoke console_service_smoke cwd_userspace_smoke desktop_smoke dirty_writeback exception_dispatcher_smoke exception_smoke file_lock_smoke file_stat_smoke handle_dup_smoke input_service_smoke mmap_smoke module_load_smoke native_exception_runtime_smoke native_raise_exception_smoke net_irp_smoke pcache_invalidate pcache_mmap_read_reuse pcache_multithread pcache_pressure pcache_smoke port_ipc_smoke posix_fd_smoke posix_module_smoke posix_pipe_smoke posix_process_smoke posix_runtime_smoke posix_service_smoke posix_signal_smoke process_builder_smoke process_exit_multithread_smoke process_protection_smoke realpath_smoke resource_service_smoke security_smoke shared_mmap socket_addr_smoke stats_abi_smoke surface_cross_process_smoke surface_invalid_rect surface_multithread_commit surface_smoke syscall_contract_smoke thread_name_smoke timer_smoke win32_condition_variable_smoke win32_exception_smoke win32_module_lookup_smoke win32_mutex_smoke win32_seh_smoke win32_thread_suspend_smoke winmm_waveout_smoke would_block_smoke
+1
View File
@@ -0,0 +1 @@
!include $(BASEDIR)\makefile.def
+7
View File
@@ -0,0 +1,7 @@
TARGETNAME=dirty_writeback
TARGETPATH=obj
TARGETTYPE=PROGRAM
FLAVOR=USER
TARGETLIBS="$(BASEDIR)\bin\syscall.lib" "$(BASEDIR)\bin\libc.lib" "$(BASEDIR)\bin\native_runtime.lib"
EXTRA_LFLAGS=/ENTRY:NtlNativeStart
SOURCES=@/code/user/tests/dirty_writeback/dirty_writeback.c
@@ -6,13 +6,11 @@
#include <intrin.h>
#include <ntlite/syscall.h>
// Prints one NUL-terminated string to the kernel console.
static void print(const char* s) {
SYS_WRITE_CONSOLE_REQUEST req = { sizeof(SYS_WRITE_CONSOLE_REQUEST), SysSvFromCstr(s) };
SysWriteConsole(&req);
}
// Prints one unsigned integer.
static void print_u64(uint64_t v) {
char buf[32];
int i = 0;
@@ -31,12 +29,10 @@ static void print_u64(uint64_t v) {
}
}
// Terminates the current process.
static void exit_now(int32_t code) {
while (true) SysExitProcess(code);
}
// Fails the test with one message.
static void fail(const char* message) {
print("exception_dispatcher_smoke: ");
print(message);
@@ -44,7 +40,6 @@ static void fail(const char* message) {
exit_now(1);
}
// Fails the test with one status value.
static void fail_status(const char* what, KSTATUS status) {
print("exception_dispatcher_smoke: ");
print(what);
@@ -0,0 +1 @@
!include $(BASEDIR)\makefile.def
@@ -0,0 +1,7 @@
TARGETNAME=exception_dispatcher_smoke
TARGETPATH=obj
TARGETTYPE=PROGRAM
FLAVOR=USER
TARGETLIBS="$(BASEDIR)\bin\syscall.lib" "$(BASEDIR)\bin\libc.lib" "$(BASEDIR)\bin\native_runtime.lib"
EXTRA_LFLAGS=/ENTRY:NtlNativeStart
SOURCES=@/code/user/tests/exception_dispatcher_smoke/exception_dispatcher_smoke.c
@@ -15,13 +15,11 @@
#define CHILD_NONCONTINUABLE "child-noncontinuable"
#define SMOKE_NONCONTINUABLE_CODE 0xE1111003u
// Prints one NUL-terminated string to the kernel console.
static void print(const char* s) {
SYS_WRITE_CONSOLE_REQUEST req = { sizeof(SYS_WRITE_CONSOLE_REQUEST), SysSvFromCstr(s) };
SysWriteConsole(&req);
}
// Prints one unsigned integer.
static void print_u64(uint64_t v) {
char buf[32];
int i = 0;
@@ -40,12 +38,10 @@ static void print_u64(uint64_t v) {
}
}
// Terminates the current process.
static void exit_now(int32_t code) {
while (true) SysExitProcess(code);
}
// Fails the test with one message.
static void fail(const char* message) {
print("exception_smoke: ");
print(message);
@@ -53,7 +49,6 @@ static void fail(const char* message) {
exit_now(1);
}
// Fails the test with one status value.
static void fail_status(const char* what, KSTATUS status) {
print("exception_smoke: ");
print(what);
+1
View File
@@ -0,0 +1 @@
!include $(BASEDIR)\makefile.def
+7
View File
@@ -0,0 +1,7 @@
TARGETNAME=exception_smoke
TARGETPATH=obj
TARGETTYPE=PROGRAM
FLAVOR=USER
TARGETLIBS="$(BASEDIR)\bin\syscall.lib" "$(BASEDIR)\bin\libc.lib" "$(BASEDIR)\bin\native_runtime.lib"
EXTRA_LFLAGS=/ENTRY:NtlNativeStart
SOURCES=@/code/user/tests/exception_smoke/exception_smoke.c
@@ -15,13 +15,11 @@
#define CHILD_PREFIX_MAX 32u
#define CHILD_PATH_MAX 256u
// Prints one NUL-terminated string to the kernel console.
static void print(const char* s) {
SYS_WRITE_CONSOLE_REQUEST req = { sizeof(SYS_WRITE_CONSOLE_REQUEST), SysSvFromCstr(s) };
SysWriteConsole(&req);
}
// Prints one unsigned integer to the kernel console.
static void print_u64(uint64_t v) {
char buf[32];
int i = 0;
@@ -40,12 +38,10 @@ static void print_u64(uint64_t v) {
}
}
// Terminates the current test process.
static void exit_now(int32_t code) {
while (true) SysExitProcess(code);
}
// Fails the test with one status value.
static void fail_status(const char* what, KSTATUS status) {
print("file_lock_smoke: ");
print(what);
@@ -55,7 +51,6 @@ static void fail_status(const char* what, KSTATUS status) {
exit_now(1);
}
// Fails the test with one plain message.
static void fail(const char* what) {
print("file_lock_smoke: ");
print(what);
@@ -333,7 +328,6 @@ static void test_validation(uint32_t file) {
if (s != NTLSTATUS_INVALID_HANDLE) fail_status("bad lock handle", s);
}
// Program entry point.
int main(void) {
SYS_PEB* peb = SysGetPeb();
if (peb && peb->CommandLine.Data && peb->CommandLine.Length != 0) {
+1
View File
@@ -0,0 +1 @@
!include $(BASEDIR)\makefile.def
+7
View File
@@ -0,0 +1,7 @@
TARGETNAME=file_lock_smoke
TARGETPATH=obj
TARGETTYPE=PROGRAM
FLAVOR=USER
TARGETLIBS="$(BASEDIR)\bin\syscall.lib" "$(BASEDIR)\bin\libc.lib" "$(BASEDIR)\bin\native_runtime.lib"
EXTRA_LFLAGS=/ENTRY:NtlNativeStart
SOURCES=@/code/user/tests/file_lock_smoke/file_lock_smoke.c
@@ -11,13 +11,11 @@
static char gSelfPath[SYS_PATH_MAX];
static char gSelfDir[SYS_PATH_MAX];
// Prints one NUL-terminated string to the kernel console.
static void print(const char* s) {
SYS_WRITE_CONSOLE_REQUEST req = { sizeof(SYS_WRITE_CONSOLE_REQUEST), SysSvFromCstr(s) };
SysWriteConsole(&req);
}
// Prints one unsigned integer to the kernel console.
static void print_u64(uint64_t v) {
char buf[32];
int i = 0;
@@ -36,12 +34,10 @@ static void print_u64(uint64_t v) {
}
}
// Terminates the current test process.
static void exit_now(int code) {
while (true) SysExitProcess(code);
}
// Fails the test with one plain message.
static void fail(const char* msg) {
print("file_stat_smoke: ");
print(msg);
@@ -49,7 +45,6 @@ static void fail(const char* msg) {
exit_now(1);
}
// Fails the test with one status value.
static void fail_status(const char* what, KSTATUS status) {
print("file_stat_smoke: ");
print(what);
+1
View File
@@ -0,0 +1 @@
!include $(BASEDIR)\makefile.def
+7
View File
@@ -0,0 +1,7 @@
TARGETNAME=file_stat_smoke
TARGETPATH=obj
TARGETTYPE=PROGRAM
FLAVOR=USER
TARGETLIBS="$(BASEDIR)\bin\syscall.lib" "$(BASEDIR)\bin\libc.lib" "$(BASEDIR)\bin\native_runtime.lib"
EXTRA_LFLAGS=/ENTRY:NtlNativeStart
SOURCES=@/code/user/tests/file_stat_smoke/file_stat_smoke.c
@@ -19,13 +19,11 @@ typedef char TEST_QUEUE_MESSAGE_SIZE_CHECK[
(sizeof(TEST_QUEUE_MESSAGE) == SYS_QUEUE_MESSAGE_SIZE) ? 1 : -1
];
// Prints one NUL-terminated string to the kernel console.
static void print(const char* s) {
SYS_WRITE_CONSOLE_REQUEST req = { sizeof(SYS_WRITE_CONSOLE_REQUEST), SysSvFromCstr(s) };
SysWriteConsole(&req);
}
// Prints one unsigned integer to the kernel console.
static void print_u64(uint64_t v) {
char buf[32];
int i = 0;
@@ -44,12 +42,10 @@ static void print_u64(uint64_t v) {
}
}
// Terminates the current test process.
static void exit_now(int code) {
while (true) SysExitProcess(code);
}
// Fails the test with one plain message.
static void fail(const char* msg) {
print("handle_dup_smoke: ");
print(msg);
@@ -57,7 +53,6 @@ static void fail(const char* msg) {
exit_now(1);
}
// Fails the test with one status value.
static void fail_status(const char* what, KSTATUS status) {
print("handle_dup_smoke: ");
print(what);
@@ -0,0 +1 @@
!include $(BASEDIR)\makefile.def
+7
View File
@@ -0,0 +1,7 @@
TARGETNAME=handle_dup_smoke
TARGETPATH=obj
TARGETTYPE=PROGRAM
FLAVOR=USER
TARGETLIBS="$(BASEDIR)\bin\syscall.lib" "$(BASEDIR)\bin\libc.lib" "$(BASEDIR)\bin\native_runtime.lib"
EXTRA_LFLAGS=/ENTRY:NtlNativeStart
SOURCES=@/code/user/tests/handle_dup_smoke/handle_dup_smoke.c
@@ -5,13 +5,11 @@
#include <stdbool.h>
#include <ntlite/syscall.h>
// Prints one NUL-terminated string to the kernel console.
static void print(const char* s) {
SYS_WRITE_CONSOLE_REQUEST req = { sizeof(SYS_WRITE_CONSOLE_REQUEST), SysSvFromCstr(s) };
SysWriteConsole(&req);
}
// Prints one unsigned integer to the kernel console.
static void print_u64(uint64_t v) {
char buf[32];
int i = 0;
@@ -30,12 +28,10 @@ static void print_u64(uint64_t v) {
}
}
// Terminates the current test process.
static void exit_now(int code) {
while (true) SysExitProcess(code);
}
// Fails the test with one status value.
static void fail_status(const char* what, uint32_t status) {
print("input_api_smoke: ");
print(what);
@@ -58,7 +54,6 @@ static void expect_status(const char* what, uint32_t got, uint32_t expected) {
exit_now(1);
}
// Program entry point.
int main(void) {
print("input_api_smoke: start\n");
@@ -4,13 +4,11 @@
#include <stdint.h>
#include <ntlite/syscall.h>
// Prints one NUL-terminated string to the kernel console.
static void print(const char* s) {
SYS_WRITE_CONSOLE_REQUEST req = { sizeof(SYS_WRITE_CONSOLE_REQUEST), SysSvFromCstr(s) };
SysWriteConsole(&req);
}
// Prints one unsigned integer to the kernel console.
static void print_u64(uint64_t v) {
char buf[32];
int i = 0;
@@ -29,12 +27,10 @@ static void print_u64(uint64_t v) {
}
}
// Terminates the current test process.
static void exit_now(int code) {
while (true) SysExitProcess(code);
}
// Fails the test with one status value.
static void fail_status(const char* what, uint32_t status) {
print("input_model_smoke: ");
print(what);
@@ -57,7 +53,6 @@ static void expect_status(const char* what, uint32_t got, uint32_t expected) {
exit_now(1);
}
// Program entry point.
int main(void) {
print("input_model_smoke: start\n");
@@ -8,13 +8,11 @@
static int gFailures;
// Writes one diagnostic line fragment.
static void print(const char* text) {
SYS_WRITE_CONSOLE_REQUEST request = { sizeof(request), SysSvFromCstr(text) };
(void)SysWriteConsole(&request);
}
// Records one failed expectation.
static void fail(const char* text) {
print("input_service_smoke: FAIL: ");
print(text);
@@ -0,0 +1 @@
!include $(BASEDIR)\makefile.def
@@ -0,0 +1,7 @@
TARGETNAME=input_service_smoke
TARGETPATH=obj
TARGETTYPE=PROGRAM
FLAVOR=USER
TARGETLIBS="$(BASEDIR)\bin\syscall.lib" "$(BASEDIR)\bin\libc.lib" "$(BASEDIR)\bin\native_runtime.lib"
EXTRA_LFLAGS=/ENTRY:NtlNativeStart
SOURCES=@/code/user/tests/input_service_smoke/input_service_smoke.c
+1
View File
@@ -0,0 +1 @@
!include $(BASEDIR)\makefile.def
+7
View File
@@ -0,0 +1,7 @@
TARGETNAME=mmap_smoke
TARGETPATH=obj
TARGETTYPE=PROGRAM
FLAVOR=USER
TARGETLIBS="$(BASEDIR)\bin\syscall.lib" "$(BASEDIR)\bin\libc.lib" "$(BASEDIR)\bin\native_runtime.lib"
EXTRA_LFLAGS=/ENTRY:NtlNativeStart
SOURCES=@/code/user/tests/mmap_smoke/mmap_smoke.c
@@ -0,0 +1 @@
!include $(BASEDIR)\makefile.def
@@ -0,0 +1,7 @@
TARGETNAME=module_load_smoke
TARGETPATH=obj
TARGETTYPE=PROGRAM
FLAVOR=USER
TARGETLIBS="$(BASEDIR)\bin\syscall.lib" "$(BASEDIR)\bin\libc.lib" "$(BASEDIR)\bin\native_runtime.lib"
EXTRA_LFLAGS=/ENTRY:NtlNativeStart
SOURCES=@/code/user/tests/module_load_smoke/module_load_smoke.c
@@ -18,13 +18,11 @@ typedef char TEST_QUEUE_MESSAGE_SIZE_CHECK[
(sizeof(TEST_QUEUE_MESSAGE) == SYS_QUEUE_MESSAGE_SIZE) ? 1 : -1
];
// Prints one NUL-terminated string to the kernel console.
static void print(const char* s) {
SYS_WRITE_CONSOLE_REQUEST req = { sizeof(SYS_WRITE_CONSOLE_REQUEST), SysSvFromCstr(s) };
SysWriteConsole(&req);
}
// Prints one unsigned integer to the kernel console.
static void print_u64(uint64_t v) {
char buf[32];
int i = 0;
@@ -43,12 +41,10 @@ static void print_u64(uint64_t v) {
}
}
// Terminates the current test process.
static void exit_now(int code) {
while (true) SysExitProcess(code);
}
// Fails the test with one plain message.
static void fail(const char* msg) {
print("named_queue_lifetime_smoke: ");
print(msg);
@@ -56,7 +52,6 @@ static void fail(const char* msg) {
exit_now(1);
}
// Fails the test with one status value.
static void fail_status(const char* what, uint32_t status) {
print("named_queue_lifetime_smoke: ");
print(what);
@@ -0,0 +1 @@
!include $(BASEDIR)\makefile.def
@@ -9,13 +9,11 @@
static volatile uint32_t gSearchHits;
static volatile uint32_t gContinueHits;
// Prints one NUL-terminated string to the kernel console.
static void print(const char* s) {
SYS_WRITE_CONSOLE_REQUEST req = { sizeof(SYS_WRITE_CONSOLE_REQUEST), SysSvFromCstr(s) };
SysWriteConsole(&req);
}
// Prints one unsigned integer.
static void print_u64(uint64_t v) {
char buf[32];
int i = 0;
@@ -34,12 +32,10 @@ static void print_u64(uint64_t v) {
}
}
// Terminates the current process.
static void exit_now(int32_t code) {
while (true) SysExitProcess(code);
}
// Fails the test with one message.
static void fail(const char* message) {
print("native_exception_runtime_smoke: ");
print(message);
@@ -47,7 +43,6 @@ static void fail(const char* message) {
exit_now(1);
}
// Fails the test with one status value.
static void fail_status(const char* what, KSTATUS status) {
print("native_exception_runtime_smoke: ");
print(what);
@@ -0,0 +1,7 @@
TARGETNAME=native_exception_runtime_smoke
TARGETPATH=obj
TARGETTYPE=PROGRAM
FLAVOR=USER
TARGETLIBS="$(BASEDIR)\bin\syscall.lib" "$(BASEDIR)\bin\libc.lib" "$(BASEDIR)\bin\native_runtime.lib"
EXTRA_LFLAGS=/ENTRY:NtlNativeStart
SOURCES=@/code/user/tests/native_exception_runtime_smoke/native_exception_runtime_smoke.c
@@ -0,0 +1 @@
!include $(BASEDIR)\makefile.def
@@ -10,13 +10,11 @@
static volatile uint32_t gHandlerHits;
// Prints one NUL-terminated string to the kernel console.
static void print(const char* s) {
SYS_WRITE_CONSOLE_REQUEST req = { sizeof(SYS_WRITE_CONSOLE_REQUEST), SysSvFromCstr(s) };
SysWriteConsole(&req);
}
// Prints one unsigned integer.
static void print_u64(uint64_t v) {
char buf[32];
int i = 0;
@@ -35,12 +33,10 @@ static void print_u64(uint64_t v) {
}
}
// Terminates the current process.
static void exit_now(int32_t code) {
while (true) SysExitProcess(code);
}
// Fails the test with one message.
static void fail(const char* message) {
print("native_raise_exception_smoke: ");
print(message);
@@ -48,7 +44,6 @@ static void fail(const char* message) {
exit_now(1);
}
// Fails the test with one status value.
static void fail_status(const char* what, KSTATUS status) {
print("native_raise_exception_smoke: ");
print(what);
@@ -0,0 +1,7 @@
TARGETNAME=native_raise_exception_smoke
TARGETPATH=obj
TARGETTYPE=PROGRAM
FLAVOR=USER
TARGETLIBS="$(BASEDIR)\bin\syscall.lib" "$(BASEDIR)\bin\libc.lib" "$(BASEDIR)\bin\native_runtime.lib"
EXTRA_LFLAGS=/ENTRY:NtlNativeStart
SOURCES=@/code/user/tests/native_raise_exception_smoke/native_raise_exception_smoke.c
+1
View File
@@ -0,0 +1 @@
!include $(BASEDIR)\makefile.def
@@ -9,13 +9,11 @@
#define NET_IRP_SMOKE_UDP_PORT 40219u
#define NET_IRP_SMOKE_HTTP_PORT 80u
// Prints one NUL-terminated string to the kernel console.
static void print(const char* s) {
SYS_WRITE_CONSOLE_REQUEST req = { sizeof(SYS_WRITE_CONSOLE_REQUEST), SysSvFromCstr(s) };
SysWriteConsole(&req);
}
// Prints one unsigned integer to the kernel console.
static void print_u64(uint64_t v) {
char buf[32];
int i = 0;
@@ -34,12 +32,10 @@ static void print_u64(uint64_t v) {
}
}
// Terminates the current process.
static void exit_now(int32_t code) {
while (true) SysExitProcess(code);
}
// Fails the test with one message.
static void fail(const char* message) {
print("net_irp_smoke: ");
print(message);
@@ -47,7 +43,6 @@ static void fail(const char* message) {
exit_now(1);
}
// Fails the test with one status value.
static void fail_status(const char* what, KSTATUS status) {
print("net_irp_smoke: ");
print(what);
+7
View File
@@ -0,0 +1,7 @@
TARGETNAME=net_irp_smoke
TARGETPATH=obj
TARGETTYPE=PROGRAM
FLAVOR=USER
TARGETLIBS="$(BASEDIR)\bin\syscall.lib" "$(BASEDIR)\bin\libc.lib" "$(BASEDIR)\bin\native_runtime.lib"
EXTRA_LFLAGS=/ENTRY:NtlNativeStart
SOURCES=@/code/user/tests/net_irp_smoke/net_irp_smoke.c
@@ -0,0 +1 @@
!include $(BASEDIR)\makefile.def
@@ -0,0 +1,7 @@
TARGETNAME=pcache_invalidate
TARGETPATH=obj
TARGETTYPE=PROGRAM
FLAVOR=USER
TARGETLIBS="$(BASEDIR)\bin\syscall.lib" "$(BASEDIR)\bin\libc.lib" "$(BASEDIR)\bin\native_runtime.lib"
EXTRA_LFLAGS=/ENTRY:NtlNativeStart
SOURCES=@/code/user/tests/pcache_invalidate/pcache_invalidate.c
@@ -0,0 +1 @@
!include $(BASEDIR)\makefile.def
@@ -0,0 +1,7 @@
TARGETNAME=pcache_mmap_read_reuse
TARGETPATH=obj
TARGETTYPE=PROGRAM
FLAVOR=USER
TARGETLIBS="$(BASEDIR)\bin\syscall.lib" "$(BASEDIR)\bin\libc.lib" "$(BASEDIR)\bin\native_runtime.lib"
EXTRA_LFLAGS=/ENTRY:NtlNativeStart
SOURCES=@/code/user/tests/pcache_mmap_read_reuse/pcache_mmap_read_reuse.c
@@ -0,0 +1 @@
!include $(BASEDIR)\makefile.def
@@ -0,0 +1,7 @@
TARGETNAME=pcache_multithread
TARGETPATH=obj
TARGETTYPE=PROGRAM
FLAVOR=USER
TARGETLIBS="$(BASEDIR)\bin\syscall.lib" "$(BASEDIR)\bin\libc.lib" "$(BASEDIR)\bin\native_runtime.lib"
EXTRA_LFLAGS=/ENTRY:NtlNativeStart
SOURCES=@/code/user/tests/pcache_multithread/pcache_multithread.c
+1
View File
@@ -0,0 +1 @@
!include $(BASEDIR)\makefile.def
+7
View File
@@ -0,0 +1,7 @@
TARGETNAME=pcache_pressure
TARGETPATH=obj
TARGETTYPE=PROGRAM
FLAVOR=USER
TARGETLIBS="$(BASEDIR)\bin\syscall.lib" "$(BASEDIR)\bin\libc.lib" "$(BASEDIR)\bin\native_runtime.lib"
EXTRA_LFLAGS=/ENTRY:NtlNativeStart
SOURCES=@/code/user/tests/pcache_pressure/pcache_pressure.c
+1
View File
@@ -0,0 +1 @@
!include $(BASEDIR)\makefile.def
+7
View File
@@ -0,0 +1,7 @@
TARGETNAME=pcache_smoke
TARGETPATH=obj
TARGETTYPE=PROGRAM
FLAVOR=USER
TARGETLIBS="$(BASEDIR)\bin\syscall.lib" "$(BASEDIR)\bin\libc.lib" "$(BASEDIR)\bin\native_runtime.lib"
EXTRA_LFLAGS=/ENTRY:NtlNativeStart
SOURCES=@/code/user/tests/pcache_smoke/pcache_smoke.c
+1
View File
@@ -0,0 +1 @@
!include $(BASEDIR)\makefile.def
@@ -11,13 +11,11 @@
#define EVENT_AUTO_RESET 0u
#define TEST_TIMEOUT_MS 2000u
// Writes one string to the console.
static void print(const char* text) {
SYS_WRITE_CONSOLE_REQUEST request = { sizeof(request), SysSvFromCstr(text) };
(void)SysWriteConsole(&request);
}
// Writes one unsigned integer without requiring formatted libc helpers.
static void print_u32(uint32_t value) {
char digits[16];
uint32_t count = 0;
+7
View File
@@ -0,0 +1,7 @@
TARGETNAME=port_ipc_smoke
TARGETPATH=obj
TARGETTYPE=PROGRAM
FLAVOR=USER
TARGETLIBS="$(BASEDIR)\bin\syscall.lib" "$(BASEDIR)\bin\libc.lib" "$(BASEDIR)\bin\native_runtime.lib"
EXTRA_LFLAGS=/ENTRY:NtlNativeStart
SOURCES=@/code/user/tests/port_ipc_smoke/port_ipc_smoke.c
+1
View File
@@ -0,0 +1 @@
!include $(BASEDIR)\makefile.def
@@ -12,7 +12,6 @@
#include <sys/wait.h>
#include <ntlite/posix_extensions.h>
// Writes one NUL-terminated diagnostic to stdout.
static void print(const char* text) {
(void)write(1, text, strlen(text));
}
@@ -25,7 +24,6 @@ static void fail(const char* message) {
exit(1);
}
// Prints one decimal integer without depending on stdio.
static void print_int(int value) {
char buffer[16];
unsigned int magnitude = value < 0 ? (unsigned int)(-(value + 1)) + 1u : (unsigned int)value;
+7
View File
@@ -0,0 +1,7 @@
TARGETNAME=posix_fd_smoke
TARGETPATH=obj
TARGETTYPE=PROGRAM
FLAVOR=POSIX
TARGETLIBS="$(BASEDIR)\bin\posix.lib" "$(BASEDIR)\bin\syscall.lib" "$(BASEDIR)\bin\libc.lib" "$(BASEDIR)\bin\posix_start.lib"
EXTRA_LFLAGS=/ENTRY:PosixStart
SOURCES=@/code/user/tests/posix_fd_smoke/posix_fd_smoke.c
@@ -0,0 +1 @@
!include $(BASEDIR)\makefile.def
@@ -8,17 +8,14 @@
#include <unistd.h>
#include <dlfcn.h>
// Writes one NUL-terminated string to stdout.
static void print(const char* s) {
write(1, s, strlen(s));
}
// Terminates the current process.
static void exit_now(int code) {
while (true) exit(code);
}
// Fails the smoke test with one message.
static void fail(const char* message) {
print("posix_module_smoke: ");
print(message);
@@ -0,0 +1,7 @@
TARGETNAME=posix_module_smoke
TARGETPATH=obj
TARGETTYPE=PROGRAM
FLAVOR=POSIX
TARGETLIBS="$(BASEDIR)\bin\posix.lib" "$(BASEDIR)\bin\syscall.lib" "$(BASEDIR)\bin\libc.lib" "$(BASEDIR)\bin\posix_start.lib"
EXTRA_LFLAGS=/ENTRY:PosixStart
SOURCES=@/code/user/tests/posix_module_smoke/posix_module_smoke.c
@@ -0,0 +1 @@
!include $(BASEDIR)\makefile.def
@@ -9,7 +9,6 @@
#include <signal.h>
#include <sys/stat.h>
// Writes one NUL-terminated diagnostic to stdout.
static void print(const char* text) {
(void)write(1, text, strlen(text));
}
+7
View File
@@ -0,0 +1,7 @@
TARGETNAME=posix_pipe_smoke
TARGETPATH=obj
TARGETTYPE=PROGRAM
FLAVOR=POSIX
TARGETLIBS="$(BASEDIR)\bin\posix.lib" "$(BASEDIR)\bin\syscall.lib" "$(BASEDIR)\bin\libc.lib" "$(BASEDIR)\bin\posix_start.lib"
EXTRA_LFLAGS=/ENTRY:PosixStart
SOURCES=@/code/user/tests/posix_pipe_smoke/posix_pipe_smoke.c
@@ -0,0 +1 @@
!include $(BASEDIR)\makefile.def
@@ -27,7 +27,6 @@
static const char* gExecFile = "posix_process_exec.tmp";
static volatile uint32_t gVforkChildTouched;
// Writes one NUL-terminated diagnostic to stdout.
static void print(const char* text) {
(void)write(1, text, strlen(text));
}
@@ -0,0 +1,7 @@
TARGETNAME=posix_process_smoke
TARGETPATH=obj
TARGETTYPE=PROGRAM
FLAVOR=POSIX
TARGETLIBS="$(BASEDIR)\bin\posix.lib" "$(BASEDIR)\bin\syscall.lib" "$(BASEDIR)\bin\libc.lib" "$(BASEDIR)\bin\posix_start.lib"
EXTRA_LFLAGS=/ENTRY:PosixStart
SOURCES=@/code/user/tests/posix_process_smoke/posix_process_smoke.c
@@ -0,0 +1 @@
!include $(BASEDIR)\makefile.def
@@ -16,7 +16,6 @@ static volatile uintptr_t gWorkerErrnoAddress;
static volatile int gWorkerDlErrorOk;
static volatile pid_t gWorkerPid;
// Writes one NUL-terminated string to stdout.
static void print(const char* text) {
(void)write(1, text, strlen(text));
}
@@ -0,0 +1,7 @@
TARGETNAME=posix_runtime_smoke
TARGETPATH=obj
TARGETTYPE=PROGRAM
FLAVOR=POSIX
TARGETLIBS="$(BASEDIR)\bin\posix.lib" "$(BASEDIR)\bin\syscall.lib" "$(BASEDIR)\bin\libc.lib" "$(BASEDIR)\bin\posix_start.lib"
EXTRA_LFLAGS=/ENTRY:PosixStart
SOURCES=@/code/user/tests/posix_runtime_smoke/posix_runtime_smoke.c
@@ -0,0 +1 @@
!include $(BASEDIR)\makefile.def
@@ -13,7 +13,6 @@
#define CHILD_ARGUMENT "--pid-child"
// Writes one test diagnostic through the native console.
static void print(const char* text) {
SYS_WRITE_CONSOLE_REQUEST request = { sizeof(request), SysSvFromCstr(text) };
(void)SysWriteConsole(&request);
@@ -0,0 +1,7 @@
TARGETNAME=posix_service_smoke
TARGETPATH=obj
TARGETTYPE=PROGRAM
FLAVOR=USER
TARGETLIBS="$(BASEDIR)\bin\syscall.lib" "$(BASEDIR)\bin\libc.lib" "$(BASEDIR)\bin\native_runtime.lib"
EXTRA_LFLAGS=/ENTRY:NtlNativeStart
SOURCES=@/code/user/tests/posix_service_smoke/posix_service_smoke.c
@@ -0,0 +1 @@
!include $(BASEDIR)\makefile.def
@@ -25,7 +25,6 @@ static volatile sig_atomic_t gNestedCount;
static volatile sig_atomic_t gAlarmCount;
static volatile sig_atomic_t gPipeCount;
// Writes one test diagnostic line to the native console.
static void print(const char* text) {
SYS_WRITE_CONSOLE_REQUEST request = { sizeof(request), SysSvFromCstr(text) };
(void)SysWriteConsole(&request);
@@ -82,7 +81,6 @@ static void nested_handler(int signalNumber) {
_exit(91);
}
// Records one SIGALRM used to interrupt alertable POSIX waits.
static void alarm_handler(int signalNumber) {
if (signalNumber == SIGALRM) ++gAlarmCount;
}
@@ -0,0 +1,7 @@
TARGETNAME=posix_signal_smoke
TARGETPATH=obj
TARGETTYPE=PROGRAM
FLAVOR=POSIX
TARGETLIBS="$(BASEDIR)\bin\posix.lib" "$(BASEDIR)\bin\syscall.lib" "$(BASEDIR)\bin\libc.lib" "$(BASEDIR)\bin\posix_start.lib"
EXTRA_LFLAGS=/ENTRY:PosixStart
SOURCES=@/code/user/tests/posix_signal_smoke/posix_signal_smoke.c
@@ -0,0 +1 @@
!include $(BASEDIR)\makefile.def
@@ -0,0 +1,7 @@
TARGETNAME=process_builder_smoke
TARGETPATH=obj
TARGETTYPE=PROGRAM
FLAVOR=USER
TARGETLIBS="$(BASEDIR)\bin\syscall.lib" "$(BASEDIR)\bin\libc.lib" "$(BASEDIR)\bin\native_runtime.lib"
EXTRA_LFLAGS=/ENTRY:NtlNativeStart
SOURCES=@/code/user/tests/process_builder_smoke/process_builder_smoke.c
@@ -0,0 +1 @@
!include $(BASEDIR)\makefile.def
@@ -19,13 +19,11 @@ typedef struct WORKER_CONTEXT {
static WORKER_CONTEXT gWorker;
// Writes one test message to the native console.
static void print(const char* text) {
SYS_WRITE_CONSOLE_REQUEST request = { sizeof(SYS_WRITE_CONSOLE_REQUEST), SysSvFromCstr(text) };
(void)SysWriteConsole(&request);
}
// Terminates the current test process after one failure.
static void fail(const char* message) {
print("process_exit_multithread_smoke: ");
print(message);
@@ -0,0 +1,7 @@
TARGETNAME=process_exit_multithread_smoke
TARGETPATH=obj
TARGETTYPE=PROGRAM
FLAVOR=USER
TARGETLIBS="$(BASEDIR)\bin\syscall.lib" "$(BASEDIR)\bin\libc.lib" "$(BASEDIR)\bin\native_runtime.lib"
EXTRA_LFLAGS=/ENTRY:NtlNativeStart
SOURCES=@/code/user/tests/process_exit_multithread_smoke/process_exit_multithread_smoke.c
Loaded 100 of 696 files, more files were not shown because too many files have changed in this diff. Show more