On Fri, May 8, 2026 at 12:22 AM Thomas Schwinge <[email protected]> wrote:
>
> Recent commit 4468e0da6e58f017faef1f248b4d1c4e27423b91
> "testsuite: Fix test requirements" added a 'dg-require-effective-target 
> signal'
> line to 'gcc.dg/plugin/diagnostic-test-paths-4.c', which regressed:
>
>     PASS: gcc.dg/plugin/diagnostic-test-paths-4.c 
> -fplugin=./diagnostic_plugin_test_paths.so  (test for warnings, line 
> [-13)-]{+14)+}
>     PASS: gcc.dg/plugin/diagnostic-test-paths-4.c 
> -fplugin=./diagnostic_plugin_test_paths.so  expected multiline pattern lines 
> [-33-83-]{+34-84+}
>     PASS: gcc.dg/plugin/diagnostic-test-paths-4.c 
> -fplugin=./diagnostic_plugin_test_paths.so (test for excess errors)
>     [-PASS:-]{+FAIL:+} gcc.dg/plugin/diagnostic-test-paths-4.c 
> [-diagnostic-test-paths-4.py::test_path-]{+diagnostic-test-paths-4.py::test_paths
>  - AssertionErro+}
>
> ..., as the latter file needs to be updated accordingly.
>
>         gcc/testsuite/
>         * gcc.dg/plugin/diagnostic-test-paths-4.py: Adjust.

 I wonder why this didn't fail for me. Maybe I don't have the
"correct" version of python installed ...
Is there a way to get this working without python? That is, rewrite it
directly to TCL?
Also is there a way to get this testcase to support relative line #s
instead of hard coding the line #s?

Thanks,
Andrea

> ---
>  gcc/testsuite/gcc.dg/plugin/diagnostic-test-paths-4.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gcc/testsuite/gcc.dg/plugin/diagnostic-test-paths-4.py 
> b/gcc/testsuite/gcc.dg/plugin/diagnostic-test-paths-4.py
> index d2bc67c52a2..ece5b7d849e 100644
> --- a/gcc/testsuite/gcc.dg/plugin/diagnostic-test-paths-4.py
> +++ b/gcc/testsuite/gcc.dg/plugin/diagnostic-test-paths-4.py
> @@ -19,7 +19,7 @@ def test_paths(html_tree):
>
>      quoted_src_tr = rows[0]
>      assert_quoted_line(quoted_src_tr,
> -                       '   13', '  fprintf(stderr, "LOG: %s", msg); /* { 
> dg-warning "call to \'fprintf\' from within signal handler" } */')
> +                       '   14', '  fprintf(stderr, "LOG: %s", msg); /* { 
> dg-warning "call to \'fprintf\' from within signal handler" } */')
>
>      annotation_tr = rows[1]
>      assert_annotation_line(annotation_tr,
> --
> 2.34.1
>

Reply via email to