Skip to content
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 test listing behavior and enabling/disabling tests #227

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

busykai
Copy link
Contributor

@busykai busykai commented May 26, 2023

The tests listing (options -l, --list-tests, --list-groups) are not
taking into account the set of tests specified on the command line,
either test list, built in tests list, or --enable/--disable options.

Before any option modifying the actual test list were ignored by the
list options. With this change, the actual tests that would be executed
are listed. However, the default behavior of 'opendcdiag -l' stays the
same.

Some examples illustrating the new behavior:

$ ./builddir/opendcdiag -vv -l -e eigen_svd -e zstd1
1 eigen_svd            "Eigen SVD (Singular Value Decomposition) solving payload, which issues a bunch of matrix multiplies underneath"
2 zstd1                "ZStandard compression test - ZStandard compression and decompression with random data (level 1)" 

Groups:
@compression           "Tests that drive compression routines in various libraries"
  zstd1
@math                  "Tests that perform math using, e.g., Eigen"
  eigen_svd
$ ./builddir/opendcdiag -vv -l -e eigen_svd -e zstd1 --disable=zstd1
1 eigen_svd            "Eigen SVD (Singular Value Decomposition) solving payload, which issues a bunch of matrix multiplies underneath"

Groups:
@compression           "Tests that drive compression routines in various libraries"
@math                  "Tests that perform math using, e.g., Eigen"
  eigen_svd
$ cat testlist
eigen_svd
zstd1
$ ./builddir/opendcdiag -vv -l --test-list-file=testlist
1 eigen_svd            "Eigen SVD (Singular Value Decomposition) solving payload, which issues a bunch of matrix multiplies underneath"
2 zstd1                "ZStandard compression test - ZStandard compression and decompression with random data (level 1)" 

Groups:
@compression           "Tests that drive compression routines in various libraries"
  zstd1
@math                  "Tests that perform math using, e.g., Eigen"
  eigen_svd
$ ./builddir/opendcdiag -vv -l --test-list-file=testlist --disable=eigen_svd
1 zstd1                "ZStandard compression test - ZStandard compression and decompression with random data (level 1)" 

Groups:
@compression           "Tests that drive compression routines in various libraries"
  zstd1

Additionally, issue #213 is fixed.

@busykai busykai force-pushed the kai/test-list-fixups branch 2 times, most recently from 26165c2 to 6388f4c Compare May 26, 2023 18:53
thiagomacieira
thiagomacieira previously approved these changes May 26, 2023
@@ -3707,19 +3709,6 @@ int main(int argc, char **argv)
if (sApp->total_retest_count < -1 || sApp->retest_count == 0)
sApp->total_retest_count = 10 * sApp->retest_count; // by default, 100

load_cpu_info(sApp->enabled_cpus);
Copy link
Contributor

Choose a reason for hiding this comment

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

(GitHub doesn't let me comment on a line more than 3 lines away from a line you modified)
The thermal monitor and the MCE counter are now initialised before the CPU info is loaded. That's not an issue today, but I'd rather that was kept.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I generally moved everything related to the execution past modifying the test lists, basically to avoid executing anythin in vain. However, yes, we can keep topology initialization at the beginning.

cpu_specific_init();
random_global_init(seed);
background_scan_init();

Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick: unnecessary extra line. In fact, remove both and let the SSL init be merged into this section.

@@ -2592,6 +2592,8 @@ static struct test *get_next_test(int tc)
}

auto next_test = test_selector->get_next_test();
while (next_test && next_test->quality_level < sApp->requested_quality)
Copy link
Contributor

Choose a reason for hiding this comment

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

We already have this code somewhere...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Apparently we don't. Otherwise #213 would not have existed. We have similar code in test listings...

The tests listing (options -l, --list-tests, --list-groups) are not
taking into account the set of tests specified on the command line,
either test list, built in tests list, or --enable/--disable options.

Before any option modifying the actual test list were ignored by the
list options. With this change, the actual tests that would be executed
are listed. However, the default behavior of 'opendcdiag -l' stays the
same.

Some examples illustrating the new behavior:

$ ./builddir/opendcdiag -vv -l -e eigen_svd -e zstd1
1 eigen_svd            "Eigen SVD (Singular Value Decomposition) solving payload, which issues a bunch of matrix multiplies underneath"
2 zstd1                "ZStandard compression test - ZStandard compression and decompression with random data (level 1)"

Groups:
@Compression           "Tests that drive compression routines in various libraries"
  zstd1
@math                  "Tests that perform math using, e.g., Eigen"
  eigen_svd
$ ./builddir/opendcdiag -vv -l -e eigen_svd -e zstd1 --disable=zstd1
1 eigen_svd            "Eigen SVD (Singular Value Decomposition) solving payload, which issues a bunch of matrix multiplies underneath"

Groups:
@Compression           "Tests that drive compression routines in various libraries"
@math                  "Tests that perform math using, e.g., Eigen"
  eigen_svd
$ cat testlist
eigen_svd
zstd1
$ ./builddir/opendcdiag -vv -l --test-list-file=testlist
1 eigen_svd            "Eigen SVD (Singular Value Decomposition) solving payload, which issues a bunch of matrix multiplies underneath"
2 zstd1                "ZStandard compression test - ZStandard compression and decompression with random data (level 1)"

Groups:
@Compression           "Tests that drive compression routines in various libraries"
  zstd1
@math                  "Tests that perform math using, e.g., Eigen"
  eigen_svd
$ ./builddir/opendcdiag -vv -l --test-list-file=testlist --disable=eigen_svd
1 zstd1                "ZStandard compression test - ZStandard compression and decompression with random data (level 1)"

Groups:
@Compression           "Tests that drive compression routines in various libraries"
  zstd1

Signed-off-by: Arzhan Kinzhalin <arzhan.i.kinzhalin@intel.com>
Or tests that were specified on the command line (either via -e or a test
list), but that are lower quality than requested.

Fixes #213.

Signed-off-by: Arzhan Kinzhalin <arzhan.i.kinzhalin@intel.com>
@mrkz
Copy link
Contributor

mrkz commented Aug 3, 2023

Actually, this also fixes one of the itches I noticed previously about listing --beta tests (i.e: currently, If the --beta flag is provided after any -l --list* option, it's ignored), which is something I was going to send a PR to fix too (but then I noticed this change and it's the exact same change (saving options from the big switch and process them afterward), so looking forward to getting this one merged instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants