diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-05-14 12:20:02 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-05-15 14:51:15 -0600 |
commit | 67cec6d2770aa14a13c89247612f16c628ebd54c (patch) | |
tree | 0a64beaa2f57f5b6e4db5e2ea84811cb05406958 /build-aux/measurestack/test_app_plugins.py | |
parent | f01b89b599d40df5d6c127310b0030cd41c8dc85 (diff) |
libmisc: Remove uses of printf
Diffstat (limited to 'build-aux/measurestack/test_app_plugins.py')
-rw-r--r-- | build-aux/measurestack/test_app_plugins.py | 32 |
1 files changed, 8 insertions, 24 deletions
diff --git a/build-aux/measurestack/test_app_plugins.py b/build-aux/measurestack/test_app_plugins.py index 8a29a12..808d55a 100644 --- a/build-aux/measurestack/test_app_plugins.py +++ b/build-aux/measurestack/test_app_plugins.py @@ -12,11 +12,11 @@ from .analyze import BaseName, QName def test_fct() -> None: - # 1. | a + | b + | c + | - # 2. | fmt_vsnprintf + | vprintf + | __lm_light_printf + | - # 3. | fmt_vfctprintf + | fmt_vfctprintf + | fmt_vfctprintf + | - # 4. | fmt_state_putchar + | fmt_state_putchar + | fmt_state_putchar + | - # 5. | _out_buffer + | stdio_buffered_printer + | libfmt_light_fct + | + # 1. | a + | b + | + # 2. | fmt_vsnprintf + | vprintf + | + # 3. | fmt_vfctprintf + | fmt_vfctprintf + | + # 4. | fmt_state_putchar + | fmt_state_putchar + | + # 5. | _out_buffer + | stdio_buffered_printer + | max_call_depth = 5 exp_a = ["a", "fmt_vsnprintf", "fmt_vfctprintf", "fmt_state_putchar", "_out_buffer"] exp_b = [ @@ -26,32 +26,19 @@ def test_fct() -> None: "fmt_state_putchar", "stdio_buffered_printer", ] - exp_c = [ - "c", - "__lm_light_printf", - "fmt_vfctprintf", - "fmt_state_putchar", - "libfmt_light_fct", - ] graph: typing.Sequence[tuple[str, typing.Collection[str]]] = [ # main.c ("a", {"fmt_vsnprintf"}), # _out_buffer ("b", {"vprintf"}), # stdio_buffered_printer - ("c", {"__lm_light_printf"}), # libfmt_light_printf # wrappers ("fmt_vsnprintf", {"fmt_vfctprintf"}), ("__wrap_vprintf", {"fmt_vfctprintf"}), - ("__lm_light_printf", {"fmt_vfctprintf"}), # printf.c ("fmt_vfctprintf", {"fmt_state_putchar"}), - ( - "fmt_state_putchar", - {"_out_buffer", "stdio_buffered_printer", "libfmt_light_fct"}, - ), + ("fmt_state_putchar", {"_out_buffer", "stdio_buffered_printer"}), # fcts ("_out_buffer", {}), ("stdio_buffered_printer", {}), - ("libfmt_light_fct", {}), ] graph_plugin = testutil.GraphProviderPlugin(max_call_depth, graph) @@ -62,10 +49,8 @@ def test_fct() -> None: # if rp2040: # __wrap_vprintf => fct=stdio_buffered_printer # stdio_vprintf => fct=stdio_buffered_printer - # __lm_light_printf => fct=libfmt_light_fct # if host: # __lm_printf => fct=libfmt_libc_fct - # __lm_light_printf => fct=libfmt_libc_fct app_plugins.PicoFmtPlugin("rp2040", []), ] @@ -85,7 +70,6 @@ def test_fct() -> None: graph_plugin.assert_nstatic(result.groups["Main"].rows[QName("a")].nstatic, exp_a) graph_plugin.assert_nstatic(result.groups["Main"].rows[QName("b")].nstatic, exp_b) - graph_plugin.assert_nstatic(result.groups["Main"].rows[QName("c")].nstatic, exp_c) def test_assert_formatter() -> None: @@ -124,9 +108,9 @@ def test_assert_formatter() -> None: ("conv_builtin", {"fmt_state_putchar"}), ("libfmt_conv_formatter", {"lib9p_msg_Rread_format"}), ("lib9p_msg_Rread_format", {"fmt_state_putchar", "fmt_state_printf"}), - ("fmt_state_putchar", {"stdio_buffered_printer", "libfmt_light_fct"}), + ("fmt_state_putchar", {"stdio_buffered_printer", "_out_buffer"}), ("stdio_buffered_printer", {}), - ("libfmt_light_fct", {}), # wrong fct + ("_out_buffer", {}), # wrong fct ] # 1 2 3 4 5 6 7 8 9 10 11 <= call_depth |