Skip to content

Conversation

@guitargeek
Copy link
Contributor

More detail in the commit descriptions.

Good testing is imporant, so it's also important to follow predictable
conventions in unit tests. In RooFit, we have established that the name
of all test files should match the `test*.cxx` patters.

In this commit, all the files that don't match this pattern are renamed,
and code-formatted on this occasion.

Also, all the files in `roofit/roofitcore/test/TestStatistics` are
reformatted because they almost followed the style anyway.
So far, most of the `RooNLLVar` test in `testTestStatistics` were
hardcoded to only cover the BatchMode, but it's good if they also cover
the legacy RooFit. Hence, all these tests were converted to
parameterized tests that cover the BatchMode `"off"` and `"cpu"`.

In the same go, all the unit tests in the same file are updated to
silence unnecessary info printout.
@phsft-bot
Copy link

Starting build on ROOT-debian10-i386/soversion, ROOT-performance-centos8-multicore/cxx17, ROOT-ubuntu18.04/nortcxxmod, ROOT-ubuntu2004/python3, mac12/noimt, mac11/cxx14, windows10/cxx14
How to customize builds

@phsft-bot
Copy link

Starting build on ROOT-debian10-i386/soversion, ROOT-performance-centos8-multicore/cxx17, ROOT-ubuntu18.04/nortcxxmod, ROOT-ubuntu2004/python3, mac12/noimt, mac11/cxx14, windows10/cxx14
How to customize builds

@phsft-bot
Copy link

Build failed on ROOT-ubuntu18.04/nortcxxmod.
Running on sft-ubuntu-1804-2.cern.ch:/build/workspace/root-pullrequests-build
See console output.

Warnings:

  • [2023-01-09T23:30:21.736Z] /mnt/build/workspace/root-pullrequests-build/build/include/ROOT/RCsvDS.hxx:112:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-09T23:30:21.736Z] /mnt/build/workspace/root-pullrequests-build/build/include/ROOT/RSqliteDS.hxx:117:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-09T23:30:21.736Z] /mnt/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RCsvDS.hxx:114:114: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2023-01-09T23:30:21.994Z] /mnt/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RSqliteDS.hxx:118:81: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2023-01-09T23:30:22.251Z] /mnt/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RCsvDS.hxx:114:114: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2023-01-09T23:30:22.251Z] /mnt/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RSqliteDS.hxx:118:81: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2023-01-09T23:30:22.251Z] /mnt/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RCsvDS.hxx:114:114: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2023-01-09T23:30:41.110Z] /mnt/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RCsvDS.hxx:114:114: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2023-01-09T23:30:44.228Z] /mnt/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RSqliteDS.hxx:118:81: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2023-01-09T23:32:24.124Z] ./include/ROOT/RCsvDS.hxx:112:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]

And 1 more

@phsft-bot
Copy link

Build failed on ROOT-performance-centos8-multicore/cxx17.
Running on olbdw-01.cern.ch:/data/sftnight/workspace/root-pullrequests-build
See console output.

Warnings:

  • [2023-01-09T23:49:49.934Z] /data/sftnight/workspace/root-pullrequests-build/build/include/ROOT/RCsvDS.hxx:112:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-09T23:49:49.934Z] /data/sftnight/workspace/root-pullrequests-build/build/include/ROOT/RSqliteDS.hxx:117:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-09T23:49:50.190Z] /data/sftnight/workspace/root-pullrequests-build/build/include/ROOT/RNTupleDS.hxx:96:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-09T23:49:50.190Z] /data/sftnight/workspace/root-pullrequests-build/build/include/ROOT/RNTupleDS.hxx:98:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-09T23:50:03.570Z] /data/sftnight/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RCsvDS.hxx:114:114: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2023-01-09T23:50:03.570Z] /data/sftnight/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RSqliteDS.hxx:118:81: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2023-01-09T23:50:03.856Z] /data/sftnight/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RNTupleDS.hxx:97:86: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2023-01-09T23:50:03.856Z] /data/sftnight/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RNTupleDS.hxx:99:47: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2023-01-09T23:50:15.699Z] /data/sftnight/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RCsvDS.hxx:114:114: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2023-01-09T23:50:22.096Z] /data/sftnight/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RSqliteDS.hxx:118:81: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]

And 51 more

@phsft-bot
Copy link

Build failed on mac12/noimt.
Running on macphsft18.dyndns.cern.ch:/Users/sftnight/build/jenkins/workspace/root-pullrequests-build
See console output.

Warnings:

  • [2023-01-10T00:09:36.615Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/build/include/ROOT/RCsvDS.hxx:112:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-10T00:09:36.615Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/build/include/ROOT/RSqliteDS.hxx:117:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-10T00:09:36.616Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RCsvDS.hxx:112:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-10T00:09:37.145Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RCsvDS.hxx:112:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-10T00:09:37.145Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RSqliteDS.hxx:117:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-10T00:09:37.145Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RCsvDS.hxx:112:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-10T00:09:37.405Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RCsvDS.hxx:112:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-10T00:09:37.406Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RSqliteDS.hxx:117:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-10T00:09:37.406Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RSqliteDS.hxx:117:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]

@phsft-bot
Copy link

Build failed on ROOT-ubuntu2004/python3.
Running on root-ubuntu-2004-3.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build
See console output.

Warnings:

  • [2023-01-10T01:30:25.606Z] /home/sftnight/build/workspace/root-pullrequests-build/build/include/ROOT/RCsvDS.hxx:112:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-10T01:30:25.606Z] /home/sftnight/build/workspace/root-pullrequests-build/build/include/ROOT/RSqliteDS.hxx:117:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-10T01:30:25.896Z] /home/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RCsvDS.hxx:114:114: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2023-01-10T01:30:25.896Z] /home/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RCsvDS.hxx:114:114: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2023-01-10T01:30:25.896Z] /home/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RSqliteDS.hxx:118:81: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2023-01-10T01:30:26.175Z] /home/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RSqliteDS.hxx:118:81: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2023-01-10T01:30:29.616Z] /home/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RSqliteDS.hxx:118:81: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2023-01-10T01:30:29.616Z] /home/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RCsvDS.hxx:114:114: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2023-01-10T01:30:32.418Z] /home/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RCsvDS.hxx:114:114: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]

@phsft-bot
Copy link

Build failed on mac11/cxx14.
Running on macphsft23.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build
See console output.

Warnings:

  • [2023-01-10T04:42:59.176Z] /Users/sftnight/build/workspace/root-pullrequests-build/build/include/ROOT/RCsvDS.hxx:112:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-10T04:42:59.176Z] /Users/sftnight/build/workspace/root-pullrequests-build/build/include/ROOT/RSqliteDS.hxx:117:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-10T04:44:36.580Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RCsvDS.hxx:112:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-10T04:45:11.821Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RCsvDS.hxx:112:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-10T04:45:13.861Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RSqliteDS.hxx:117:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-10T04:45:19.333Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RCsvDS.hxx:112:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-10T04:45:31.580Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RSqliteDS.hxx:117:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-10T04:45:34.879Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RCsvDS.hxx:112:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-10T04:45:34.879Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RSqliteDS.hxx:117:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]

* The ERROR printouts in the `createNLLModularLAndOffset` test are
  actually expected, so we now silence them using the "hijack" mechanism
  and check if they are inside the string

* The `fitTo` test uses the multiprocess parallelization and can be
  turned on if roofit was built with `multiprocess`

* Some memory leaks were fixed too
@phsft-bot
Copy link

Starting build on ROOT-debian10-i386/soversion, ROOT-performance-centos8-multicore/cxx17, ROOT-ubuntu18.04/nortcxxmod, ROOT-ubuntu2004/python3, mac12/noimt, mac11/cxx14, windows10/cxx14
How to customize builds

@phsft-bot
Copy link

Starting build on ROOT-debian10-i386/soversion, ROOT-performance-centos8-multicore/cxx17, ROOT-ubuntu18.04/nortcxxmod, ROOT-ubuntu2004/python3, mac12/noimt, mac11/cxx14, windows10/cxx14
How to customize builds

@phsft-bot
Copy link

Build failed on mac12/noimt.
Running on macphsft18.dyndns.cern.ch:/Users/sftnight/build/jenkins/workspace/root-pullrequests-build
See console output.

Warnings:

  • [2023-01-10T15:32:27.297Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/roofit/roofitcore/test/testTestStatistics.cxx:44:36: warning: comparison of integers of different signs: 'std::size_t' (aka 'unsigned long') and 'Int_t' (aka 'int') [-Wsign-compare]

@phsft-bot
Copy link

Build failed on ROOT-ubuntu18.04/nortcxxmod.
Running on sft-ubuntu-1804-2.cern.ch:/build/workspace/root-pullrequests-build
See console output.

Warnings:

  • [2023-01-10T15:29:57.888Z] /mnt/build/workspace/root-pullrequests-build/root/roofit/roofitcore/test/testTestStatistics.cxx:44:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

@phsft-bot
Copy link

Build failed on ROOT-ubuntu2004/python3.
Running on root-ubuntu-2004-3.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build
See console output.

Warnings:

  • [2023-01-10T15:31:58.815Z] /home/sftnight/build/workspace/root-pullrequests-build/root/roofit/roofitcore/test/testTestStatistics.cxx:44:36: warning: comparison of integer expressions of different signedness: ‘std::size_t’ {aka ‘long unsigned int’} and ‘Int_t’ {aka ‘int’} [-Wsign-compare]

It's better to use Asimov datasets in the bin integration tests, because
like this there is no randomness and it's much easier to separate bias
from variance (as there is no variance).

Also, this commit avoids some code duplication in `testTestStatistics`
@phsft-bot
Copy link

Starting build on ROOT-debian10-i386/soversion, ROOT-performance-centos8-multicore/cxx17, ROOT-ubuntu18.04/nortcxxmod, ROOT-ubuntu2004/python3, mac12/noimt, mac11/cxx14, windows10/cxx14
How to customize builds

@guitargeek
Copy link
Contributor Author

Just a little fixup to fix the warning

@phsft-bot
Copy link

Build failed on mac12/noimt.
Running on macphsft17.dyndns.cern.ch:/Users/sftnight/build/jenkins/workspace/root-pullrequests-build
See console output.

Warnings:

  • [2023-01-10T16:28:20.446Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/core/base/src/TDirectory.cxx:1245:7: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]

Failing tests:

And 63 more

Copy link
Member

@lmoneta lmoneta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you Jonas for the improvements in the tests!

@guitargeek guitargeek merged commit 6e5d1d0 into root-project:master Jan 10, 2023
@guitargeek guitargeek deleted the roofitcore_tests_1 branch January 10, 2023 17:20
@phsft-bot
Copy link

Build failed on mac11/cxx14.
Running on macphsft20.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build
See console output.

Errors:

  • [2023-01-10T17:39:45.719Z] CMake Error at /Users/sftnight/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1138 (message):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants