Co-authored-by: Gelu Vrabie <gelu@exolabs.net>
This commit is contained in:
Gelu Vrabie
2025-07-24 19:45:45 +01:00
committed by GitHub
parent f41531d945
commit 4c0e4ef853
5 changed files with 16 additions and 34 deletions

2
.gitignore vendored
View File

@@ -9,3 +9,5 @@ hosts_*.json
# TODO figure out how to properly solve the issue with these target directories showing up
networking/target/
networking/topology/target/
build/

View File

@@ -32,4 +32,15 @@ protobufs:
just regenerate-protobufs
build: regenerate-protobufs
uv build --all-packages
uv build --all-packages
# Build the Go forwarder binary
build-forwarder:
cd networking/forwarder && go build -buildvcs=false -o ../../build/forwarder .
# Run forwarder tests
test-forwarder:
cd networking/forwarder && go test ./src/...
# Build all components (Python packages and Go forwarder)
build-all: build build-forwarder

View File

@@ -5,4 +5,5 @@ from shared.env import BaseEnv
class MasterEnvironmentSchema(BaseEnv):
# Master-specific: forwarder configuration
FORWARDER_BINARY_PATH: Path | None = None
# Default to build/forwarder if not explicitly set
FORWARDER_BINARY_PATH: Path = Path("build/forwarder")

View File

@@ -1 +0,0 @@

View File

@@ -1,31 +0,0 @@
import ctypes;
from multiprocessing import Process
def trigger_segfault():
ctypes.string_at(0)
def subprocess_main(id: int):
print(f"SUBPROCESS {id}: PROCESS START")
trigger_segfault()
print(f"SUBPROCESS {id}: PROCESS END")
def main():
"""This code tests that a master process is not brought down by
segfaults that occur in the child processes
"""
print("MASTER: PROCESS START")
procs: list[Process] = []
for i in range(0, 10):
p = Process(target=subprocess_main, args=(i,))
procs.append(p)
p.start()
print("MASTER: JOINING SUBPROCESSES")
for p in procs:
p.join()
print("MASTER: PROCESS END")
if __name__ == "__main__":
main()