From f303d84f037d3f768f40a424e374cd1edd743483 Mon Sep 17 00:00:00 2001 From: dsengupta0628 Date: Sun, 26 Jul 2026 03:31:29 +0000 Subject: [PATCH] rootcause macos failure issue Signed-off-by: dsengupta0628 --- .github/workflows/ci.yml | 3 ++- search/test/search_network_sta_deep.ok | 8 +++---- search/test/search_network_sta_deep.tcl | 6 +++-- search/test/search_report_path_detail.ok | 14 +++++------ search/test/search_report_path_detail.tcl | 8 +++++-- search/test/search_search_arrival_required.ok | 8 +++---- .../test/search_search_arrival_required.tcl | 6 +++-- test/helpers.tcl | 24 +++++++++++++++++++ 8 files changed, 52 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4e3d1df9..e3ac92ee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -127,7 +127,7 @@ jobs: - name: Test run: | cd test - ./regression || (cat results/diffs && exit 1) + ./regression --output-on-failure - name: Upload Test Result uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 @@ -136,3 +136,4 @@ jobs: name: result-macos path: | test/results/* + */test/results/* diff --git a/search/test/search_network_sta_deep.ok b/search/test/search_network_sta_deep.ok index 9ce8d353..dc44e057 100644 --- a/search/test/search_network_sta_deep.ok +++ b/search/test/search_network_sta_deep.ok @@ -221,7 +221,6 @@ Path Type: max 17 default vmin clk ^ clk_src clk crpr_pin null 18 default ^max clk ^ clk_src clk crpr_pin null 19 default vmax clk ^ clk_src clk crpr_pin null -Longest hash bucket length 1 hash=6 --- report_clk_infos --- default/min clk ^ clk_src clk uncertain default/max clk ^ clk_src clk uncertain @@ -229,25 +228,24 @@ default/min clk v clk_src clk uncertain default/max clk v clk_src clk uncertain 4 clk infos --- report_tag_groups --- -Group 0 hash = 2697898004198490802 ( 79) +Group 0 hash = () 0 0 default ^min clk ^ clk_src clk crpr_pin null input in2 1 2 default ^max clk ^ clk_src clk crpr_pin null input in2 2 1 default vmin clk ^ clk_src clk crpr_pin null input in2 3 3 default vmax clk ^ clk_src clk crpr_pin null input in2 -Group 1 hash = 17966741373156438452 ( 88) +Group 1 hash = () 0 8 default ^min clk ^ (clock ideal) clk_src clk crpr_pin null 1 12 default ^max clk ^ (clock ideal) clk_src clk crpr_pin null 2 11 default vmin clk v (clock ideal) clk_src clk crpr_pin null 3 15 default vmax clk v (clock ideal) clk_src clk crpr_pin null -Group 2 hash = 17969506314027398258 ( 127) +Group 2 hash = () 0 16 default ^min clk ^ clk_src clk crpr_pin null 1 18 default ^max clk ^ clk_src clk crpr_pin null 2 17 default vmin clk ^ clk_src clk crpr_pin null 3 19 default vmax clk ^ clk_src clk crpr_pin null -Longest hash bucket length 1 hash=79 --- report_path_count_histogram --- 4 15 --- tag/group/path counts --- diff --git a/search/test/search_network_sta_deep.tcl b/search/test/search_network_sta_deep.tcl index 395ab230..1cbdf4c3 100644 --- a/search/test/search_network_sta_deep.tcl +++ b/search/test/search_network_sta_deep.tcl @@ -74,13 +74,15 @@ report_checks -path_delay max # Tag, group, info reporting ############################################################ puts "--- report_tags ---" -sta::report_tags +report_masked_hashes [make_result_file search_network_sta_deep_tags.txt] \ + sta::report_tags puts "--- report_clk_infos ---" sta::report_clk_infos puts "--- report_tag_groups ---" -sta::report_tag_groups +report_masked_hashes [make_result_file search_network_sta_deep_tag_groups.txt] \ + sta::report_tag_groups puts "--- report_path_count_histogram ---" sta::report_path_count_histogram diff --git a/search/test/search_report_path_detail.ok b/search/test/search_report_path_detail.ok index e6c6da33..a2c378bb 100644 --- a/search/test/search_report_path_detail.ok +++ b/search/test/search_report_path_detail.ok @@ -201,37 +201,37 @@ Endpoint count: 3 Path group names: clk out_group reg_group asynchronous {path delay} {gated clock} unconstrained --- find_requireds --- --- report internal debug --- -Group 0 hash = 2697898004198490802 ( 79) +Group 0 hash = () 0 0 default ^min clk ^ clk_src clk crpr_pin null input in2 1 2 default ^max clk ^ clk_src clk crpr_pin null input in2 2 1 default vmin clk ^ clk_src clk crpr_pin null input in2 3 3 default vmax clk ^ clk_src clk crpr_pin null input in2 -Group 1 hash = 1860950969858666218 ( 107) +Group 1 hash = () 0 4 default ^min clk ^ clk_src clk crpr_pin null input in1 Group -from {in1} 1 6 default ^max clk ^ clk_src clk crpr_pin null input in1 Group -from {in1} 2 5 default vmin clk ^ clk_src clk crpr_pin null input in1 Group -from {in1} 3 7 default vmax clk ^ clk_src clk crpr_pin null input in1 Group -from {in1} -Group 2 hash = 17966741373156438452 ( 88) +Group 2 hash = () 0 8 default ^min clk ^ (clock ideal) clk_src clk crpr_pin null 1 12 default ^max clk ^ (clock ideal) clk_src clk crpr_pin null 2 11 default vmin clk v (clock ideal) clk_src clk crpr_pin null 3 15 default vmax clk v (clock ideal) clk_src clk crpr_pin null -Group 3 hash = 17944144282683767210 ( 132) +Group 3 hash = () 0 16 default ^min clk ^ clk_src clk crpr_pin null Group -from {in1} 1 18 default ^max clk ^ clk_src clk crpr_pin null Group -from {in1} 2 17 default vmin clk ^ clk_src clk crpr_pin null Group -from {in1} 3 19 default vmax clk ^ clk_src clk crpr_pin null Group -from {in1} -Group 4 hash = 17969506314027398258 ( 127) +Group 4 hash = () 0 20 default ^min clk ^ clk_src clk crpr_pin null 1 22 default ^max clk ^ clk_src clk crpr_pin null 2 21 default vmin clk ^ clk_src clk crpr_pin null 3 23 default vmax clk ^ clk_src clk crpr_pin null -Group 5 hash = 17466906523001613852 ( 62) +Group 5 hash = () 0 20 default ^min clk ^ clk_src clk crpr_pin null 1 16 default ^min clk ^ clk_src clk crpr_pin null Group -from {in1} 2 22 default ^max clk ^ clk_src clk crpr_pin null @@ -241,7 +241,6 @@ Group 5 hash = 17466906523001613852 ( 62) 6 23 default vmax clk ^ clk_src clk crpr_pin null 7 19 default vmax clk ^ clk_src clk crpr_pin null Group -from {in1} -Longest hash bucket length 1 hash=62 0 default ^min clk ^ clk_src clk crpr_pin null input in2 1 default vmin clk ^ clk_src clk crpr_pin null input in2 2 default ^max clk ^ clk_src clk crpr_pin null input in2 @@ -266,7 +265,6 @@ Longest hash bucket length 1 hash=62 21 default vmin clk ^ clk_src clk crpr_pin null 22 default ^max clk ^ clk_src clk crpr_pin null 23 default vmax clk ^ clk_src clk crpr_pin null -Longest hash bucket length 1 hash=6 default/min clk ^ clk_src clk uncertain default/max clk ^ clk_src clk uncertain default/min clk v clk_src clk uncertain diff --git a/search/test/search_report_path_detail.tcl b/search/test/search_report_path_detail.tcl index f596c13f..93b20b1d 100644 --- a/search/test/search_report_path_detail.tcl +++ b/search/test/search_report_path_detail.tcl @@ -1,5 +1,7 @@ # Test ReportPath.cc, PathEnum.cc, PathExpanded.cc, PathGroup.cc # Exercises uncovered report path formats and path enumeration +source ../../test/helpers.tcl + read_liberty ../../test/nangate45/Nangate45_typ.lib read_verilog search_test1.v link_design search_test1 @@ -134,8 +136,10 @@ puts "--- find_requireds ---" sta::find_requireds puts "--- report internal debug ---" -sta::report_tag_groups -sta::report_tags +report_masked_hashes [make_result_file search_report_path_detail_tag_groups.txt] \ + sta::report_tag_groups +report_masked_hashes [make_result_file search_report_path_detail_tags.txt] \ + sta::report_tags sta::report_clk_infos sta::report_arrival_entries sta::report_required_entries diff --git a/search/test/search_search_arrival_required.ok b/search/test/search_search_arrival_required.ok index 0ac18b74..b04afaf2 100644 --- a/search/test/search_search_arrival_required.ok +++ b/search/test/search_search_arrival_required.ok @@ -23,7 +23,6 @@ min violations: 0 17 default vmin clk ^ clk_src clk crpr_pin null 18 default ^max clk ^ clk_src clk crpr_pin null 19 default vmax clk ^ clk_src clk crpr_pin null -Longest hash bucket length 1 hash=6 --- report_clk_infos --- default/min clk ^ clk_src clk uncertain default/max clk ^ clk_src clk uncertain @@ -31,25 +30,24 @@ default/min clk v clk_src clk uncertain default/max clk v clk_src clk uncertain 4 clk infos --- report_tag_groups --- -Group 0 hash = 2697898004198490802 ( 79) +Group 0 hash = () 0 0 default ^min clk ^ clk_src clk crpr_pin null input in2 1 2 default ^max clk ^ clk_src clk crpr_pin null input in2 2 1 default vmin clk ^ clk_src clk crpr_pin null input in2 3 3 default vmax clk ^ clk_src clk crpr_pin null input in2 -Group 1 hash = 17966741373156438452 ( 88) +Group 1 hash = () 0 8 default ^min clk ^ (clock ideal) clk_src clk crpr_pin null 1 12 default ^max clk ^ (clock ideal) clk_src clk crpr_pin null 2 11 default vmin clk v (clock ideal) clk_src clk crpr_pin null 3 15 default vmax clk v (clock ideal) clk_src clk crpr_pin null -Group 2 hash = 17969506314027398258 ( 127) +Group 2 hash = () 0 16 default ^min clk ^ clk_src clk crpr_pin null 1 18 default ^max clk ^ clk_src clk crpr_pin null 2 17 default vmin clk ^ clk_src clk crpr_pin null 3 19 default vmax clk ^ clk_src clk crpr_pin null -Longest hash bucket length 1 hash=79 --- report_path_count_histogram --- 4 15 --- report_arrival_entries --- diff --git a/search/test/search_search_arrival_required.tcl b/search/test/search_search_arrival_required.tcl index c0300a9d..9ec238c5 100644 --- a/search/test/search_search_arrival_required.tcl +++ b/search/test/search_search_arrival_required.tcl @@ -39,13 +39,15 @@ puts "min violations: [sta::endpoint_violation_count min]" # report internal structures ############################################################ puts "--- report_tags ---" -sta::report_tags +report_masked_hashes [make_result_file search_search_arrival_required_tags.txt] \ + sta::report_tags puts "--- report_clk_infos ---" sta::report_clk_infos puts "--- report_tag_groups ---" -sta::report_tag_groups +report_masked_hashes [make_result_file search_search_arrival_required_tag_groups.txt] \ + sta::report_tag_groups puts "--- report_path_count_histogram ---" sta::report_path_count_histogram diff --git a/test/helpers.tcl b/test/helpers.tcl index 01dab3d7..3f124b1a 100644 --- a/test/helpers.tcl +++ b/test/helpers.tcl @@ -67,6 +67,30 @@ proc diff_files_sorted { file1 file2 } { } } +# Run cmd with its report output captured to file, then echo the output +# with hash values masked and hash bucket reports dropped. +# std::unordered_set bucket counts and std::hash results are +# implementation defined, so report_tags/report_tag_groups hashes differ +# between libstdc++ (linux) and libc++ (macos). +proc report_masked_hashes { file cmd } { + sta::redirect_file_begin $file + set code [catch { uplevel 1 $cmd } result] + sta::redirect_file_end + if { $code } { + return -code $code $result + } + set stream [open $file r] + gets $stream line + while { ![eof $stream] } { + if { ![regexp {^Longest hash bucket} $line] } { + regsub {hash = \d+ \(\s*\d+\)} $line {hash = ()} line + puts $line + } + gets $stream line + } + close $stream +} + proc assert_file_nonempty { path } { if { ![file exists $path] || [file size $path] <= 0 } { error "expected non-empty file: $path"