diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index 6d860804c..0fcce52ae 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -43,7 +43,6 @@ "forcealignargpointer=", "noasan=", "noubsan=", - "testonly=", "donothing=", "nosideeffect=", "unreachable=",, diff --git a/libc/integral/c.inc b/libc/integral/c.inc index ba410d7fe..4c1c96d00 100644 --- a/libc/integral/c.inc +++ b/libc/integral/c.inc @@ -602,7 +602,6 @@ typedef struct { } while (0) #ifndef __STRICT_ANSI__ -#define testonly dontinline _Section(".test") #define textstartup _Section(".text.startup") noinstrument #define textexit _Section(".text.exit") noinstrument #define textreal _Section(".text.real") @@ -610,7 +609,6 @@ typedef struct { #define textwindows _Section(".text.windows") #define antiquity _Section(".text.antiquity") #else -#define testonly #define textstartup #define textexit #define textreal diff --git a/libc/testlib/almostequallongdouble.c b/libc/testlib/almostequallongdouble.c index cd299f279..7f20f0c5b 100644 --- a/libc/testlib/almostequallongdouble.c +++ b/libc/testlib/almostequallongdouble.c @@ -21,7 +21,7 @@ #define EPSILON 0.00000001L -testonly bool testlib_almostequallongdouble(long double x, long double y) { +bool testlib_almostequallongdouble(long double x, long double y) { /* TODO(jart): This algorithm has to be binary. */ if (isnan(x) || isnan(y)) return false; return fabsl(x - y) <= EPSILON; diff --git a/libc/testlib/binequals.c b/libc/testlib/binequals.c index 43b5d0b73..35fab15b0 100644 --- a/libc/testlib/binequals.c +++ b/libc/testlib/binequals.c @@ -26,8 +26,7 @@ * * @see libc/nexgen32e/kCp437.S */ -testonly bool testlib_binequals(const char16_t *want, const void *got, - size_t n) { +bool testlib_binequals(const char16_t *want, const void *got, size_t n) { size_t i; const unsigned char *p = (const unsigned char *)got; if (!got) return false; diff --git a/libc/testlib/comborunner.c b/libc/testlib/comborunner.c index d0d82bea7..9de2fd06b 100644 --- a/libc/testlib/comborunner.c +++ b/libc/testlib/comborunner.c @@ -16,8 +16,8 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/intrin/safemacros.internal.h" #include "libc/fmt/fmt.h" +#include "libc/intrin/safemacros.internal.h" #include "libc/mem/mem.h" #include "libc/str/str.h" #include "libc/testlib/testlib.h" @@ -33,7 +33,7 @@ struct ComboProduct { struct ComboGroup groups[]; }; -mallocesque testonly struct ComboProduct *testlib_setupcomboproduct( +mallocesque struct ComboProduct *testlib_setupcomboproduct( const struct TestFixture *start, const struct TestFixture *end) { unsigned i, j, entrycount; struct ComboProduct *product; @@ -54,8 +54,8 @@ mallocesque testonly struct ComboProduct *testlib_setupcomboproduct( return product; } -static testonly void testlib_describecombo(struct ComboProduct *product, - const struct TestFixture *combos) { +static void testlib_describecombo(struct ComboProduct *product, + const struct TestFixture *combos) { char *p = &g_fixturename[0]; char *pe = p + sizeof(g_fixturename); for (unsigned i = 0; i < product->n && p < pe; ++i) { @@ -66,10 +66,9 @@ static testonly void testlib_describecombo(struct ComboProduct *product, } } -static testonly void testlib_callcombos(struct ComboProduct *product, - const struct TestFixture *combos, - testfn_t *test_start, - testfn_t *test_end) { +static void testlib_callcombos(struct ComboProduct *product, + const struct TestFixture *combos, + testfn_t *test_start, testfn_t *test_end) { for (;;) { testlib_describecombo(product, combos); for (unsigned i = 0; i < product->n; ++i) { @@ -89,9 +88,9 @@ static testonly void testlib_callcombos(struct ComboProduct *product, * @see ape/ape.lds * @see libc/testlib/testlib.h */ -testonly void testlib_runcombos(testfn_t *test_start, testfn_t *test_end, - const struct TestFixture *combo_start, - const struct TestFixture *combo_end) { +void testlib_runcombos(testfn_t *test_start, testfn_t *test_end, + const struct TestFixture *combo_start, + const struct TestFixture *combo_end) { struct ComboProduct *product; product = testlib_setupcomboproduct(combo_start, combo_end); testlib_callcombos(product, combo_start, test_start, test_end); diff --git a/libc/testlib/contains.c b/libc/testlib/contains.c index f8978685c..8f0604df2 100644 --- a/libc/testlib/contains.c +++ b/libc/testlib/contains.c @@ -19,7 +19,7 @@ #include "libc/str/str.h" #include "libc/testlib/testlib.h" -testonly bool testlib_contains(size_t cw, const void *s, const void *needle) { +bool testlib_contains(size_t cw, const void *s, const void *needle) { if (s == needle) return true; if (!s || !needle) return false; return sizeof(cw) == sizeof(char16_t) ? !!strstr16(s, needle) diff --git a/libc/testlib/endswith.c b/libc/testlib/endswith.c index 3eb6fe5b4..23168083b 100644 --- a/libc/testlib/endswith.c +++ b/libc/testlib/endswith.c @@ -19,10 +19,10 @@ #include "libc/str/str.h" #include "libc/testlib/testlib.h" -testonly bool testlib_endswith(size_t cw, const void *s, const void *suffix) { +bool testlib_endswith(size_t cw, const void *s, const void *suffix) { if (s == suffix) return true; if (!s || !suffix) return false; - return cw == sizeof(wchar_t) ? wcsendswith(s, suffix) - : cw == sizeof(char16_t) ? endswith16(s, suffix) - : endswith(s, suffix); + return cw == sizeof(wchar_t) ? wcsendswith(s, suffix) + : cw == sizeof(char16_t) ? endswith16(s, suffix) + : endswith(s, suffix); } diff --git a/libc/testlib/fixturerunner.c b/libc/testlib/fixturerunner.c index 5d63975fd..d61d3e598 100644 --- a/libc/testlib/fixturerunner.c +++ b/libc/testlib/fixturerunner.c @@ -21,8 +21,8 @@ #include "libc/sysv/consts/prot.h" #include "libc/testlib/testlib.h" -testonly int testlib_countfixtures(const struct TestFixture *start, - const struct TestFixture *end) { +int testlib_countfixtures(const struct TestFixture *start, + const struct TestFixture *end) { return ((intptr_t)end - (intptr_t)start) / sizeof(struct TestFixture); } @@ -31,9 +31,9 @@ testonly int testlib_countfixtures(const struct TestFixture *start, * @see ape/ape.lds * @see libc/testlib/testlib.h */ -testonly void testlib_runfixtures(testfn_t *test_start, testfn_t *test_end, - const struct TestFixture *fixture_start, - const struct TestFixture *fixture_end) { +void testlib_runfixtures(testfn_t *test_start, testfn_t *test_end, + const struct TestFixture *fixture_start, + const struct TestFixture *fixture_end) { unsigned i, count; count = testlib_countfixtures(fixture_start, fixture_end); for (i = 0; i < count && !g_testlib_failed; ++i) { diff --git a/libc/testlib/formatbinaryasglyphs.c b/libc/testlib/formatbinaryasglyphs.c index 78889757d..c6100ff87 100644 --- a/libc/testlib/formatbinaryasglyphs.c +++ b/libc/testlib/formatbinaryasglyphs.c @@ -20,9 +20,8 @@ #include "libc/testlib/testlib.h" #include "libc/x/x.h" -testonly void testlib_formatbinaryasglyphs(const char16_t *want, - const void *got, size_t n, - char **out_v1, char **out_v2) { +void testlib_formatbinaryasglyphs(const char16_t *want, const void *got, + size_t n, char **out_v1, char **out_v2) { if (n == -1ul) n = strlen16(want); *out_v1 = xasprintf("%`#.*hs", n, want); *out_v2 = xasprintf(" %`'#.*s", n, got); diff --git a/libc/testlib/formatbinaryashex.c b/libc/testlib/formatbinaryashex.c index 34dca18ce..43cd20930 100644 --- a/libc/testlib/formatbinaryashex.c +++ b/libc/testlib/formatbinaryashex.c @@ -21,9 +21,8 @@ #include "libc/testlib/testlib.h" #include "libc/x/x.h" -testonly void testlib_formatbinaryashex(const char *want, const void *got, - size_t n, char **out_v1, - char **out_v2) { +void testlib_formatbinaryashex(const char *want, const void *got, size_t n, + char **out_v1, char **out_v2) { size_t i; uint8_t b; char *gothex; diff --git a/libc/testlib/formatfloat.c b/libc/testlib/formatfloat.c index 0056a8ded..c5c028f30 100644 --- a/libc/testlib/formatfloat.c +++ b/libc/testlib/formatfloat.c @@ -22,6 +22,6 @@ #include "libc/x/x.h" #include "third_party/gdtoa/gdtoa.h" -testonly char *testlib_formatfloat(long double x) { +char *testlib_formatfloat(long double x) { return xasprintf("%.15Lg", x); } diff --git a/libc/testlib/formatint.c b/libc/testlib/formatint.c index b2e84a637..5aca7d16f 100644 --- a/libc/testlib/formatint.c +++ b/libc/testlib/formatint.c @@ -16,8 +16,8 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/intrin/bits.h" #include "libc/fmt/fmt.h" +#include "libc/intrin/bits.h" #include "libc/macros.internal.h" #include "libc/mem/mem.h" #include "libc/testlib/testlib.h" @@ -25,7 +25,7 @@ static size_t sbufi_; static char sbufs_[2][256]; -dontdiscard testonly char *testlib_formatint(intptr_t x) { +dontdiscard char *testlib_formatint(intptr_t x) { char *str = sbufi_ < ARRAYLEN(sbufs_) ? sbufs_[sbufi_++] : malloc(256); char *p = str; p += sprintf(p, "%ld\t(or %#lx", x, x); diff --git a/libc/testlib/formatrange.c b/libc/testlib/formatrange.c index dd7e80b4c..468abaacd 100644 --- a/libc/testlib/formatrange.c +++ b/libc/testlib/formatrange.c @@ -19,6 +19,6 @@ #include "libc/testlib/testlib.h" #include "libc/x/x.h" -dontdiscard testonly char *testlib_formatrange(intptr_t beg, intptr_t end) { +dontdiscard char *testlib_formatrange(intptr_t beg, intptr_t end) { return xasprintf("[%#ld,%#ld]", beg, end); } diff --git a/libc/testlib/formatstr.c b/libc/testlib/formatstr.c index 13313a03c..a836e6cd7 100644 --- a/libc/testlib/formatstr.c +++ b/libc/testlib/formatstr.c @@ -25,7 +25,7 @@ /** * Turns string into code. */ -dontdiscard testonly char *testlib_formatstr(size_t cw, const void *s, int n) { +dontdiscard char *testlib_formatstr(size_t cw, const void *s, int n) { if (s) { switch (cw) { case 1: diff --git a/libc/testlib/hexequals.c b/libc/testlib/hexequals.c index 2306a38a7..a7b2421ae 100644 --- a/libc/testlib/hexequals.c +++ b/libc/testlib/hexequals.c @@ -26,7 +26,7 @@ * * @see unhexstr() */ -testonly bool testlib_hexequals(const char *want, const void *got, size_t n) { +bool testlib_hexequals(const char *want, const void *got, size_t n) { size_t i; const unsigned char *p = (const unsigned char *)got; if (!got) return false; diff --git a/libc/testlib/runner.c b/libc/testlib/runner.c index e21ef413c..a9091c9dd 100644 --- a/libc/testlib/runner.c +++ b/libc/testlib/runner.c @@ -28,7 +28,7 @@ * @see libc/testlib/testlib.h * @see ape/ape.lds */ -testonly void testlib_runalltests(void) { +void testlib_runalltests(void) { if ((intptr_t)__testcase_end > (intptr_t)__testcase_start) { if (testlib_countfixtures(__combo_start, __combo_end)) { testlib_runcombos(__testcase_start, __testcase_end, __combo_start, diff --git a/libc/testlib/showerror.c b/libc/testlib/showerror.c index bb9efc127..546665e25 100644 --- a/libc/testlib/showerror.c +++ b/libc/testlib/showerror.c @@ -16,12 +16,12 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/intrin/atomic.h" -#include "libc/intrin/safemacros.internal.h" #include "libc/calls/calls.h" #include "libc/errno.h" #include "libc/fmt/fmt.h" +#include "libc/intrin/atomic.h" #include "libc/intrin/kprintf.h" +#include "libc/intrin/safemacros.internal.h" #include "libc/log/color.internal.h" #include "libc/log/internal.h" #include "libc/log/libfatal.internal.h" @@ -35,9 +35,9 @@ const char *testlib_showerror_isfatal; const char *testlib_showerror_macro; const char *testlib_showerror_symbol; -testonly void testlib_showerror(const char *file, int line, const char *func, - const char *method, const char *symbol, - const char *code, char *v1, char *v2) { +void testlib_showerror(const char *file, int line, const char *func, + const char *method, const char *symbol, const char *code, + char *v1, char *v2) { char *p; char hostname[128]; __stpcpy(hostname, "unknown"); @@ -56,9 +56,9 @@ testonly void testlib_showerror(const char *file, int line, const char *func, } /* TODO(jart): Pay off tech debt re duplication */ -testonly void testlib_showerror_(int line, const char *wantcode, - const char *gotcode, char *FREED_want, - char *FREED_got, const char *fmt, ...) { +void testlib_showerror_(int line, const char *wantcode, const char *gotcode, + char *FREED_want, char *FREED_got, const char *fmt, + ...) { int e; va_list va; char hostname[128]; diff --git a/libc/testlib/startswith.c b/libc/testlib/startswith.c index 79cf3e9eb..d1a9dfa5a 100644 --- a/libc/testlib/startswith.c +++ b/libc/testlib/startswith.c @@ -19,11 +19,10 @@ #include "libc/str/str.h" #include "libc/testlib/testlib.h" -testonly bool testlib_startswith(size_t cw, const void *s, const void *prefix) { +bool testlib_startswith(size_t cw, const void *s, const void *prefix) { if (s == prefix) return true; if (!s || !prefix) return false; - return cw == sizeof(wchar_t) - ? wcsstartswith(s, prefix) - : cw == sizeof(char16_t) ? startswith16(s, prefix) - : startswith(s, prefix); + return cw == sizeof(wchar_t) ? wcsstartswith(s, prefix) + : cw == sizeof(char16_t) ? startswith16(s, prefix) + : startswith(s, prefix); } diff --git a/libc/testlib/strcaseequals.c b/libc/testlib/strcaseequals.c index 1b069fa6f..e6c43b0ba 100644 --- a/libc/testlib/strcaseequals.c +++ b/libc/testlib/strcaseequals.c @@ -20,16 +20,15 @@ #include "libc/str/str.h" #include "libc/testlib/testlib.h" -testonly bool testlib_strcaseequals(size_t cw, const void *s1, const void *s2) { +bool testlib_strcaseequals(size_t cw, const void *s1, const void *s2) { return testlib_strncaseequals(cw, s1, s2, SIZE_MAX); } -testonly bool testlib_strncaseequals(size_t cw, const void *s1, const void *s2, - size_t n) { +bool testlib_strncaseequals(size_t cw, const void *s1, const void *s2, + size_t n) { if (s1 == s2) return true; if (!s1 || !s2) return false; - return (cw == sizeof(wchar_t) - ? wcsncasecmp(s1, s2, n) - : cw == sizeof(char16_t) ? strncasecmp16(s1, s2, n) - : strncasecmp(s1, s2, n)) == 0; + return (cw == sizeof(wchar_t) ? wcsncasecmp(s1, s2, n) + : cw == sizeof(char16_t) ? strncasecmp16(s1, s2, n) + : strncasecmp(s1, s2, n)) == 0; } diff --git a/libc/testlib/strequals.c b/libc/testlib/strequals.c index ef46f7c88..68acd5ed8 100644 --- a/libc/testlib/strequals.c +++ b/libc/testlib/strequals.c @@ -20,16 +20,14 @@ #include "libc/str/str.h" #include "libc/testlib/testlib.h" -testonly bool testlib_strequals(size_t cw, const void *s1, const void *s2) { +bool testlib_strequals(size_t cw, const void *s1, const void *s2) { return testlib_strnequals(cw, s1, s2, SIZE_MAX); } -testonly bool testlib_strnequals(size_t cw, const void *s1, const void *s2, - size_t n) { +bool testlib_strnequals(size_t cw, const void *s1, const void *s2, size_t n) { if (s1 == s2) return true; if (!s1 || !s2) return false; - return (cw == sizeof(wchar_t) - ? wcsncmp(s1, s2, n) - : cw == sizeof(char16_t) ? strncmp16(s1, s2, n) - : strncmp(s1, s2, n)) == 0; + return (cw == sizeof(wchar_t) ? wcsncmp(s1, s2, n) + : cw == sizeof(char16_t) ? strncmp16(s1, s2, n) + : strncmp(s1, s2, n)) == 0; } diff --git a/libc/testlib/testlib.h b/libc/testlib/testlib.h index 3e2fd0004..bef3f434b 100644 --- a/libc/testlib/testlib.h +++ b/libc/testlib/testlib.h @@ -72,7 +72,7 @@ COSMOPOLITAN_C_START_ #define __TEST_PROTOTYPE(S, N, A, K) \ void S##_##N(void); \ testfn_t S##_##N##_ptr[] A(S##_##N) = {S##_##N}; \ - testonly K void S##_##N(void) + K void S##_##N(void) #define __TEST_SECTION(NAME, CONTENT) \ ".section " NAME "\n" CONTENT "\n\t.previous\n" @@ -89,7 +89,7 @@ COSMOPOLITAN_C_START_ "\t.quad\t" STRINGIFY(GROUP##_##ENTRY)) \ __ROSTR("1:\t.asciz\t" STRINGIFY(#GROUP)) \ __ROSTR("2:\t.asciz\t" STRINGIFY(#ENTRY))); \ - testonly void GROUP##_##ENTRY(void) + void GROUP##_##ENTRY(void) /** * Enables setup and teardown of test directories. diff --git a/libc/testlib/testrunner.c b/libc/testlib/testrunner.c index 8a144a491..d1a16a99b 100644 --- a/libc/testlib/testrunner.c +++ b/libc/testlib/testrunner.c @@ -193,8 +193,7 @@ static void CheckForZombies(void) { /** * Runs all test case functions in sorted order. */ -testonly void testlib_runtestcases(testfn_t *start, testfn_t *end, - testfn_t warmup) { +void testlib_runtestcases(testfn_t *start, testfn_t *end, testfn_t warmup) { /* * getpid() calls are inserted to help visually see tests in traces * which can be performed on Linux, FreeBSD, OpenBSD, and XNU: diff --git a/test/libc/calls/signal_test.c b/test/libc/calls/signal_test.c index deef09aa7..2b7aaa21d 100644 --- a/test/libc/calls/signal_test.c +++ b/test/libc/calls/signal_test.c @@ -26,7 +26,7 @@ #include "libc/testlib/ezbench.h" #include "libc/testlib/testlib.h" -testonly void OnUsr1(int sig) { +void OnUsr1(int sig) { _exit(0); } diff --git a/test/libc/fmt/palandprintf_test.c b/test/libc/fmt/palandprintf_test.c index 9ac2165a0..86563ebcb 100644 --- a/test/libc/fmt/palandprintf_test.c +++ b/test/libc/fmt/palandprintf_test.c @@ -24,11 +24,11 @@ │ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN │ │ THE SOFTWARE. │ └─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/intrin/pushpop.h" -#include "libc/intrin/safemacros.internal.h" #include "libc/errno.h" #include "libc/fmt/fmt.h" #include "libc/fmt/itoa.h" +#include "libc/intrin/pushpop.h" +#include "libc/intrin/safemacros.internal.h" #include "libc/limits.h" #include "libc/math.h" #include "libc/mem/mem.h" @@ -541,14 +541,14 @@ TEST(sprintf, test_snprintf) { EXPECT_STREQ("-1", buffer); } -testonly void vsnprintf_builder_1(char *buf, ...) { +void vsnprintf_builder_1(char *buf, ...) { va_list args; va_start(args, buf); vsnprintf(buf, 100U, "%d", args); va_end(args); } -testonly void vsnprintf_builder_3(char *buf, ...) { +void vsnprintf_builder_3(char *buf, ...) { va_list args; va_start(args, buf); vsnprintf(buf, 100U, "%d %d %s", args); diff --git a/test/libc/mem/critbit0_test.c b/test/libc/mem/critbit0_test.c index 99651324a..b193be932 100644 --- a/test/libc/mem/critbit0_test.c +++ b/test/libc/mem/critbit0_test.c @@ -16,8 +16,8 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/mem/critbit0.h" #include "libc/intrin/bits.h" +#include "libc/mem/critbit0.h" #include "libc/mem/mem.h" #include "libc/runtime/runtime.h" #include "libc/str/str.h" @@ -29,25 +29,25 @@ struct Bog { const char *p[]; }; -static testonly dontdiscard struct Bog *NewBog(unsigned n) { +static dontdiscard struct Bog *NewBog(unsigned n) { struct Bog *res = malloc(sizeof(struct Bog) + sizeof(const char *) * n); res->i = 0; res->n = n; return res; } -static testonly void ClearBog(struct Bog *bog) { +static void ClearBog(struct Bog *bog) { bog->i = 0; } -static testonly void FreeBog(struct Bog **bog) { +static void FreeBog(struct Bog **bog) { free(*bog), *bog = NULL; } static const char *const elems[] = {"a", "aa", "aaz", "abz", "bba", "bbc", "bbd", NULL}; -testonly static void MakeTree(struct critbit0 *tree) { +static void MakeTree(struct critbit0 *tree) { memset(tree, 0, sizeof(*tree)); for (unsigned i = 0; elems[i]; ++i) { ASSERT_EQ(true, critbit0_insert(tree, elems[i])); @@ -84,7 +84,7 @@ TEST(critbit0, testDelete) { critbit0_clear(&tree); } -static testonly intptr_t allprefixed_cb(const char *elem, void *arg) { +static intptr_t allprefixed_cb(const char *elem, void *arg) { struct Bog *bog = arg; ASSERT_LT(bog->i, bog->n); bog->p[bog->i++] = elem; @@ -110,7 +110,7 @@ TEST(critbit0, testAllPrefixed) { FreeBog(&a); } -static testonly intptr_t allprefixed_cb_halt(const char *elem, void *arg) { +static intptr_t allprefixed_cb_halt(const char *elem, void *arg) { struct Bog *bog = arg; ASSERT_LT(bog->i, bog->n); bog->p[bog->i++] = elem; diff --git a/test/libc/str/strcmp_test.c b/test/libc/str/strcmp_test.c index eb953c56e..f2129fa8b 100644 --- a/test/libc/str/strcmp_test.c +++ b/test/libc/str/strcmp_test.c @@ -489,14 +489,14 @@ TEST(wcsncmp, testTwosComplementBane) { │ test/libc/str/strcmp_test.c § benchmarks ─╬─│┼ ╚────────────────────────────────────────────────────────────────────────────│*/ -testonly dontinline int strcmp_pure(const char *a, const char *b) { +dontinline int strcmp_pure(const char *a, const char *b) { for (; *a == *b; a++, b++) { if (!*a) break; } return (*a & 0xff) - (*b & 0xff); } -testonly dontinline int strcasecmp_pure(const char *a, const char *b) { +dontinline int strcasecmp_pure(const char *a, const char *b) { for (; *a && *b; a++, b++) { if (!(*a == *b || tolower(*a & 0xff) == tolower(*b & 0xff))) { break; diff --git a/test/libc/time/strftime_test.c b/test/libc/time/strftime_test.c index a70ea551d..18684fb0e 100644 --- a/test/libc/time/strftime_test.c +++ b/test/libc/time/strftime_test.c @@ -28,7 +28,7 @@ textstartup static void strftime_test_init(void) { } const void *const strftime_test_ctor[] initarray = {strftime_test_init}; -testonly char *FormatTime(const char *fmt, struct tm *tm) { +char *FormatTime(const char *fmt, struct tm *tm) { static char buf[64]; strftime(buf, sizeof(buf), fmt, tm); return &buf[0]; diff --git a/test/libc/xed/x86ild_lib.c b/test/libc/xed/x86ild_lib.c index 1cd65857c..095bd4dee 100644 --- a/test/libc/xed/x86ild_lib.c +++ b/test/libc/xed/x86ild_lib.c @@ -25,7 +25,7 @@ #include "test/libc/xed/lib.h" #include "third_party/xed/x86.h" -testonly dontdiscard uint8_t *unbingx86op(const char16_t *codez) { +dontdiscard uint8_t *unbingx86op(const char16_t *codez) { size_t len; len = strlen16(codez); return unbingbuf(xmalloc(ROUNDUP(len, 16)), len, codez, 0x90); @@ -34,7 +34,7 @@ testonly dontdiscard uint8_t *unbingx86op(const char16_t *codez) { /** * Long mode instruction length decoder. */ -testonly int ild(const char16_t *codez) { +int ild(const char16_t *codez) { int error; struct XedDecodedInst xedd; error = xed_instruction_length_decode( @@ -46,7 +46,7 @@ testonly int ild(const char16_t *codez) { /** * Real mode instruction length decoder. */ -testonly int ildreal(const char16_t *codez) { +int ildreal(const char16_t *codez) { int error; struct XedDecodedInst xedd; error = xed_instruction_length_decode( @@ -58,7 +58,7 @@ testonly int ildreal(const char16_t *codez) { /** * Legacy mode instruction length decoder. */ -testonly int ildlegacy(const char16_t *codez) { +int ildlegacy(const char16_t *codez) { int error; struct XedDecodedInst xedd; error = xed_instruction_length_decode( diff --git a/tool/emacs/c.lang b/tool/emacs/c.lang index f95fd4c23..c316300c3 100644 --- a/tool/emacs/c.lang +++ b/tool/emacs/c.lang @@ -84,7 +84,6 @@ Keywords={ "offsetof", "microarchitecture", "targetclones", -"testonly", "forcealignargpointer", "textexit", "externinline", diff --git a/tool/emacs/cosmo-c-keywords.el b/tool/emacs/cosmo-c-keywords.el index 34f61419b..7e166b8a6 100644 --- a/tool/emacs/cosmo-c-keywords.el +++ b/tool/emacs/cosmo-c-keywords.el @@ -26,7 +26,6 @@ "offsetof" "microarchitecture" "targetclones" - "testonly" "forcealignargpointer" "textexit" "externinline" diff --git a/tool/emacs/key.py b/tool/emacs/key.py index fb85e31e6..739d79c04 100644 --- a/tool/emacs/key.py +++ b/tool/emacs/key.py @@ -369,7 +369,6 @@ cosmo_kws = frozenset([ "scanfesque", "strftimeesque", "strlenesque", - "testonly", "textexit", "textreal", "textstartup", @@ -432,7 +431,6 @@ cosmo_kws = frozenset([ "scanfesque", "strftimeesque", "strlenesque", - "testonly", "textexit", "textreal", "textstartup",