Squash commits for public release

This commit is contained in:
2025-02-12 09:54:05 -05:00
commit 7118adc514
1108 changed files with 80873 additions and 0 deletions

8
test/kernel/env/BUILD.gn vendored Normal file
View File

@@ -0,0 +1,8 @@
import("//build/test/TEMPLATE.gni")
xOS_test("env") {
test_bundle = "kernel/env"
sources = [ "main.c" ]
configs = [ "//build/userland:userland_flags" ]
deplibs = [ "libc" ]
}

28
test/kernel/env/main.c vendored Normal file
View File

@@ -0,0 +1,28 @@
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
int main(int argc, char** argv)
{
if (getenv("OSTEST")) {
char* res = getenv("GO");
if (!res) {
TestErr("Empty GO env var.");
}
if (strncmp(res, "go", 2)) {
TestErr("Different value in GO env var.");
}
return 0;
}
if (argc > 1) {
TestErr("Loop while executing test.");
}
setenv("OSTEST", "1", 1);
setenv("GO", "go", 1);
execlp(argv[0], argv[0], "loop", NULL);
return 1;
}