From 9e82037998375cf1efe55038aab390ccaab3c1f0 Mon Sep 17 00:00:00 2001 From: Hojun-Cho Date: Tue, 2 Jun 2026 22:57:37 +0900 Subject: [PATCH] lib/errors: errnotest use os.exit not raw syscall (rule-7) The local doexit reimplemented os.exit via a raw rt_syscall(60) decl with no documented divergence, while the file already imports + uses os. os.exit (lib/os/os.ww:68) is byte-identical (syscall1(nr.EXIT=60)); ostest/stattest siblings already use os.exit. --- lib/errors/errnotest.ww | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/errors/errnotest.ww b/lib/errors/errnotest.ww index 521108e9..8941a5ad 100644 --- a/lib/errors/errnotest.ww +++ b/lib/errors/errnotest.ww @@ -11,15 +11,10 @@ package errors; import errors; import os; -@symbol("rt_syscall") fn syscall1ww(num: i64, a: i64) i64; -fn doexit(code: i32) void = { - syscall1ww(60i64, code: i64); -}; - // signalled — bumped by main before each test so a failing exit code // pinpoints the offending case. let signalled: i32 = 0; -fn fail() void = { doexit(signalled + 10); }; +fn fail() void = { os.exit(signalled + 10); }; fn streq(a: str, b: str) bool = { if (a.len != b.len) { return false; };