-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix testCSCTriggerMapping test: avoid reading invalid data e.g empty line #43269
Conversation
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-43269/37670
Code check has found code style and quality issues which could be resolved by applying following patch(s)
|
a091c7d
to
c6fb83c
Compare
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-43269/37672
|
A new Pull Request was created by @smuzaffar (Malik Shahzad Muzaffar) for master. It involves the following packages:
@consuegs, @cmsbuild, @perrotta, @francescobrivio, @saumyaphor4252 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
please test |
please test for CMSSW_14_0_NONLTO_X |
for default (LTO based IBs) this test shows the following output
So empty line is still getting processed but |
@@ -22,7 +22,8 @@ void CSCTriggerMappingFromFile::fill(void) { | |||
if (line[0] != commentFlag[0]) { | |||
int i1, i2, i3, i4, i5, i6, i7, i8, i9, i10; | |||
std::istringstream is(line); | |||
is >> i1 >> i2 >> i3 >> i4 >> i5 >> i6 >> i7 >> i8 >> i9 >> i10; | |||
if (!(is >> i1 >> i2 >> i3 >> i4 >> i5 >> i6 >> i7 >> i8 >> i9 >> i10)) | |||
continue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cms-sw/alca-l2 , should we throw an exception/LogError instead of silently ignoring the bad input?
Thanks, Shahzad. The simple trap is fine. No need to do any sophisticated error trapping. Those tests are of historical interest only (I think). |
Could you please elaborate? If really those tests are not needed, then I would simply remove them, and save time to maintainers |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-01d980/35803/summary.html Comparison SummarySummary:
|
Andrea, I know of nobody having made use of those tests in at least 10 years. Mainly of course because code stabilized and is very rarely changed. With luck, over the next year, we'll find somebody to go through it all, and rationalize and otherwise clean it up. |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-01d980/35804/summary.html Comparison SummarySummary:
|
+1
|
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @antoniovilela, @rappoccio, @sextonkennedy (and backports should be raised in the release meeting by the corresponding L2) |
@cms-sw/orp-l2 , can you please review/sign this? |
+1 |
Fixes #43031
The empty or invalid lines in the mapping files were causing unit test to fail for NON-LTO build. This test was reading the following data
As there was no check for empty lines (or invalid format lines) the test continued to process the L32 and has reused the
i1, i2, i3, i4, i5, i6, i7, i8, i9
read from the lineL30
and seti10=0
. With some debug statements, the output from the tests wasLocal tests shows that unit test works in NONLTO IBs with this fix