From d81da042cdaaa0c16df6ff6aabccafd558235588 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Thu, 30 Oct 2025 18:32:25 -0400 Subject: [PATCH] Tests: Rename tests to match warning name --- test_regress/t/t_lint_eofline.out | 3 -- test_regress/t/t_lint_eofnewline.out | 3 ++ ...t_lint_eofline.py => t_lint_eofnewline.py} | 2 +- ...line_bad.out => t_lint_eofnewline_bad.out} | 4 +- ...ofline_bad.py => t_lint_eofnewline_bad.py} | 4 +- ...ofline_vlt.py => t_lint_eofnewline_vlt.py} | 6 +-- ...line_vlt.vlt => t_lint_eofnewline_vlt.vlt} | 0 .../t/t_lint_removed_unused_loop_bad.out | 42 ------------------- .../t/t_lint_unusedloop_removed_bad.out | 42 +++++++++++++++++++ ...ad.py => t_lint_unusedloop_removed_bad.py} | 0 ..._bad.v => t_lint_unusedloop_removed_bad.v} | 0 ..._wait_bad.out => t_lint_waitconst_bad.out} | 0 ...nt_wait_bad.py => t_lint_waitconst_bad.py} | 0 13 files changed, 53 insertions(+), 53 deletions(-) delete mode 100644 test_regress/t/t_lint_eofline.out create mode 100644 test_regress/t/t_lint_eofnewline.out rename test_regress/t/{t_lint_eofline.py => t_lint_eofnewline.py} (92%) rename test_regress/t/{t_lint_eofline_bad.out => t_lint_eofnewline_bad.out} (66%) rename test_regress/t/{t_lint_eofline_bad.py => t_lint_eofnewline_bad.py} (86%) rename test_regress/t/{t_lint_eofline_vlt.py => t_lint_eofnewline_vlt.py} (82%) rename test_regress/t/{t_lint_eofline_vlt.vlt => t_lint_eofnewline_vlt.vlt} (100%) delete mode 100644 test_regress/t/t_lint_removed_unused_loop_bad.out create mode 100644 test_regress/t/t_lint_unusedloop_removed_bad.out rename test_regress/t/{t_lint_removed_unused_loop_bad.py => t_lint_unusedloop_removed_bad.py} (100%) rename test_regress/t/{t_lint_removed_unused_loop_bad.v => t_lint_unusedloop_removed_bad.v} (100%) rename test_regress/t/{t_lint_wait_bad.out => t_lint_waitconst_bad.out} (100%) rename test_regress/t/{t_lint_wait_bad.py => t_lint_waitconst_bad.py} (100%) diff --git a/test_regress/t/t_lint_eofline.out b/test_regress/t/t_lint_eofline.out deleted file mode 100644 index 3de26aff4..000000000 --- a/test_regress/t/t_lint_eofline.out +++ /dev/null @@ -1,3 +0,0 @@ -`line 1 "obj_vlt/t_lint_eofline/t_lint_eofline_bad.v" 1 - -`line 2 "obj_vlt/t_lint_eofline/t_lint_eofline_bad.v" 0 diff --git a/test_regress/t/t_lint_eofnewline.out b/test_regress/t/t_lint_eofnewline.out new file mode 100644 index 000000000..2e8889ddb --- /dev/null +++ b/test_regress/t/t_lint_eofnewline.out @@ -0,0 +1,3 @@ +`line 1 "obj_vlt/t_lint_eofnewline/t_lint_eofnewline_bad.v" 1 + +`line 2 "obj_vlt/t_lint_eofnewline/t_lint_eofnewline_bad.v" 0 diff --git a/test_regress/t/t_lint_eofline.py b/test_regress/t/t_lint_eofnewline.py similarity index 92% rename from test_regress/t/t_lint_eofline.py rename to test_regress/t/t_lint_eofnewline.py index 0c46692ef..7f0f9a1c3 100755 --- a/test_regress/t/t_lint_eofline.py +++ b/test_regress/t/t_lint_eofnewline.py @@ -10,7 +10,7 @@ import vltest_bootstrap test.scenarios('vlt') -test.top_filename = test.obj_dir + "/t_lint_eofline_bad.v" +test.top_filename = test.obj_dir + "/t_lint_eofnewline_bad.v" def gen(filename): diff --git a/test_regress/t/t_lint_eofline_bad.out b/test_regress/t/t_lint_eofnewline_bad.out similarity index 66% rename from test_regress/t/t_lint_eofline_bad.out rename to test_regress/t/t_lint_eofnewline_bad.out index cc52c6298..829c3e364 100644 --- a/test_regress/t/t_lint_eofline_bad.out +++ b/test_regress/t/t_lint_eofnewline_bad.out @@ -1,5 +1,5 @@ -%Warning-EOFNEWLINE: obj_vlt/t_lint_eofline_bad/t_lint_eofline_bad.v:4:10: Missing newline at end of file (POSIX 3.206). - : ... Suggest add newline. +%Warning-EOFNEWLINE: obj_vlt/t_lint_eofnewline_bad/t_lint_eofnewline_bad.v:4:10: Missing newline at end of file (POSIX 3.206). + : ... Suggest add newline. 4 | endmodule | ^ ... For warning description see https://verilator.org/warn/EOFNEWLINE?v=latest diff --git a/test_regress/t/t_lint_eofline_bad.py b/test_regress/t/t_lint_eofnewline_bad.py similarity index 86% rename from test_regress/t/t_lint_eofline_bad.py rename to test_regress/t/t_lint_eofnewline_bad.py index c39e86fc6..a3278118b 100755 --- a/test_regress/t/t_lint_eofline_bad.py +++ b/test_regress/t/t_lint_eofnewline_bad.py @@ -10,12 +10,12 @@ import vltest_bootstrap test.scenarios('vlt') -test.top_filename = test.obj_dir + "/t_lint_eofline_bad.v" +test.top_filename = test.obj_dir + "/t_lint_eofnewline_bad.v" def gen(filename): with open(filename, 'w', encoding="utf8") as fh: - fh.write("// Generated by t_lint_eofline_bad.py\n") + fh.write("// Generated by t_lint_eofnewline_bad.py\n") fh.write("module t;\n") fh.write("// No newline below:\n") fh.write("endmodule") diff --git a/test_regress/t/t_lint_eofline_vlt.py b/test_regress/t/t_lint_eofnewline_vlt.py similarity index 82% rename from test_regress/t/t_lint_eofline_vlt.py rename to test_regress/t/t_lint_eofnewline_vlt.py index 43944fe94..b56a9c954 100755 --- a/test_regress/t/t_lint_eofline_vlt.py +++ b/test_regress/t/t_lint_eofnewline_vlt.py @@ -10,12 +10,12 @@ import vltest_bootstrap test.scenarios('vlt') -test.top_filename = test.obj_dir + "/t_lint_eofline_bad.v" +test.top_filename = test.obj_dir + "/t_lint_eofnewline_bad.v" def gen(filename): with open(filename, 'w', encoding="utf8") as fh: - fh.write("// Generated by t_lint_eofline_bad.py\n") + fh.write("// Generated by t_lint_eofnewline_bad.py\n") fh.write("module t;\n") fh.write("// No newline below:\n") fh.write("endmodule") @@ -24,6 +24,6 @@ def gen(filename): gen(test.top_filename) -test.lint(verilator_flags2=["--lint-only -Wall -Wno-DECLFILENAME t/t_lint_eofline_vlt.vlt"]) +test.lint(verilator_flags2=["--lint-only -Wall -Wno-DECLFILENAME t/t_lint_eofnewline_vlt.vlt"]) test.passes() diff --git a/test_regress/t/t_lint_eofline_vlt.vlt b/test_regress/t/t_lint_eofnewline_vlt.vlt similarity index 100% rename from test_regress/t/t_lint_eofline_vlt.vlt rename to test_regress/t/t_lint_eofnewline_vlt.vlt diff --git a/test_regress/t/t_lint_removed_unused_loop_bad.out b/test_regress/t/t_lint_removed_unused_loop_bad.out deleted file mode 100644 index 0874c3069..000000000 --- a/test_regress/t/t_lint_removed_unused_loop_bad.out +++ /dev/null @@ -1,42 +0,0 @@ -%Warning-UNUSEDLOOP: t/t_lint_removed_unused_loop_bad.v:169:7: Loop condition is always false - : ... note: In instance 't.with_always' - 169 | while(0); - | ^~~~~ - ... For warning description see https://verilator.org/warn/UNUSEDLOOP?v=latest - ... Use "/* verilator lint_off UNUSEDLOOP */" and lint_on around source to disable this message. -%Warning-UNUSEDLOOP: t/t_lint_removed_unused_loop_bad.v:155:7: Loop condition is always false - : ... note: In instance 't.non_parametrized_initial' - 155 | while(0); - | ^~~~~ -%Warning-UNUSEDLOOP: t/t_lint_removed_unused_loop_bad.v:158:7: Loop condition is always false - : ... note: In instance 't.non_parametrized_initial' - 158 | do ; while(0); - | ^~ -%Warning-UNUSEDLOOP: t/t_lint_removed_unused_loop_bad.v:114:7: Loop condition is always false - 114 | while(always_zero < 0) begin - | ^~~~~ -%Warning-UNUSEDLOOP: t/t_lint_removed_unused_loop_bad.v:156:7: Loop condition is always false - 156 | while(always_false); - | ^~~~~ -%Warning-UNUSEDLOOP: t/t_lint_removed_unused_loop_bad.v:157:7: Loop condition is always false - 157 | while(always_zero < 0); - | ^~~~~ -%Warning-UNUSEDLOOP: t/t_lint_removed_unused_loop_bad.v:171:7: Loop condition is always false - 171 | while(always_false) begin - | ^~~~~ -%Warning-UNUSEDLOOP: t/t_lint_removed_unused_loop_bad.v:181:7: Loop condition is always false - 181 | while(always_zero) begin - | ^~~~~ -%Warning-UNUSEDLOOP: t/t_lint_removed_unused_loop_bad.v:185:7: Loop condition is always false - 185 | for (int i = 0; always_zero; i++) - | ^~~ -%Warning-UNUSEDLOOP: t/t_lint_removed_unused_loop_bad.v:190:7: Loop condition is always false - 190 | for (int i = 0; i < always_zero; i++) - | ^~~ -%Warning-UNUSEDLOOP: t/t_lint_removed_unused_loop_bad.v:136:7: Loop is not used and will be optimized out - 136 | while(param_unused_while < always_zero) begin - | ^~~~~ -%Warning-UNUSEDLOOP: t/t_lint_removed_unused_loop_bad.v:280:7: Loop is not used and will be optimized out - 280 | while (m_2_ticked); - | ^~~~~ -%Error: Exiting due to diff --git a/test_regress/t/t_lint_unusedloop_removed_bad.out b/test_regress/t/t_lint_unusedloop_removed_bad.out new file mode 100644 index 000000000..6b9831f18 --- /dev/null +++ b/test_regress/t/t_lint_unusedloop_removed_bad.out @@ -0,0 +1,42 @@ +%Warning-UNUSEDLOOP: t/t_lint_unusedloop_removed_bad.v:169:7: Loop condition is always false + : ... note: In instance 't.with_always' + 169 | while(0); + | ^~~~~ + ... For warning description see https://verilator.org/warn/UNUSEDLOOP?v=latest + ... Use "/* verilator lint_off UNUSEDLOOP */" and lint_on around source to disable this message. +%Warning-UNUSEDLOOP: t/t_lint_unusedloop_removed_bad.v:155:7: Loop condition is always false + : ... note: In instance 't.non_parametrized_initial' + 155 | while(0); + | ^~~~~ +%Warning-UNUSEDLOOP: t/t_lint_unusedloop_removed_bad.v:158:7: Loop condition is always false + : ... note: In instance 't.non_parametrized_initial' + 158 | do ; while(0); + | ^~ +%Warning-UNUSEDLOOP: t/t_lint_unusedloop_removed_bad.v:114:7: Loop condition is always false + 114 | while(always_zero < 0) begin + | ^~~~~ +%Warning-UNUSEDLOOP: t/t_lint_unusedloop_removed_bad.v:156:7: Loop condition is always false + 156 | while(always_false); + | ^~~~~ +%Warning-UNUSEDLOOP: t/t_lint_unusedloop_removed_bad.v:157:7: Loop condition is always false + 157 | while(always_zero < 0); + | ^~~~~ +%Warning-UNUSEDLOOP: t/t_lint_unusedloop_removed_bad.v:171:7: Loop condition is always false + 171 | while(always_false) begin + | ^~~~~ +%Warning-UNUSEDLOOP: t/t_lint_unusedloop_removed_bad.v:181:7: Loop condition is always false + 181 | while(always_zero) begin + | ^~~~~ +%Warning-UNUSEDLOOP: t/t_lint_unusedloop_removed_bad.v:185:7: Loop condition is always false + 185 | for (int i = 0; always_zero; i++) + | ^~~ +%Warning-UNUSEDLOOP: t/t_lint_unusedloop_removed_bad.v:190:7: Loop condition is always false + 190 | for (int i = 0; i < always_zero; i++) + | ^~~ +%Warning-UNUSEDLOOP: t/t_lint_unusedloop_removed_bad.v:136:7: Loop is not used and will be optimized out + 136 | while(param_unused_while < always_zero) begin + | ^~~~~ +%Warning-UNUSEDLOOP: t/t_lint_unusedloop_removed_bad.v:280:7: Loop is not used and will be optimized out + 280 | while (m_2_ticked); + | ^~~~~ +%Error: Exiting due to diff --git a/test_regress/t/t_lint_removed_unused_loop_bad.py b/test_regress/t/t_lint_unusedloop_removed_bad.py similarity index 100% rename from test_regress/t/t_lint_removed_unused_loop_bad.py rename to test_regress/t/t_lint_unusedloop_removed_bad.py diff --git a/test_regress/t/t_lint_removed_unused_loop_bad.v b/test_regress/t/t_lint_unusedloop_removed_bad.v similarity index 100% rename from test_regress/t/t_lint_removed_unused_loop_bad.v rename to test_regress/t/t_lint_unusedloop_removed_bad.v diff --git a/test_regress/t/t_lint_wait_bad.out b/test_regress/t/t_lint_waitconst_bad.out similarity index 100% rename from test_regress/t/t_lint_wait_bad.out rename to test_regress/t/t_lint_waitconst_bad.out diff --git a/test_regress/t/t_lint_wait_bad.py b/test_regress/t/t_lint_waitconst_bad.py similarity index 100% rename from test_regress/t/t_lint_wait_bad.py rename to test_regress/t/t_lint_waitconst_bad.py