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

test/thp_disable: fix lint #2202

Merged
merged 1 commit into from
Jun 19, 2023
Merged

Conversation

rst0git
Copy link
Member

@rst0git rst0git commented Jun 18, 2023

The fail() macro provides a new line character at the end of the message. This patch fixes the following lint check that currently fails in CI:

$ git --no-pager grep -E '^\s*\<(pr_perror|fail)\>.*\\n"'
    test/zdtm/static/thp_disable.c:         fail("prctl(GET_THP_DISABLE) returned unexpected value: %d != 1\n", ret);
    test/zdtm/static/thp_disable.c:         fail("Flags changed %lx -> %lx\n", orig_flags, new_flags);
    test/zdtm/static/thp_disable.c:         fail("Madvs changed %lx -> %lx\n", orig_madv, new_madv);
    test/zdtm/static/thp_disable.c:         fail("post-migration prctl(GET_THP_DISABLE) returned unexpected value: %d != 1\n", ret);
    test/zdtm/static/thp_disable.c:         fail("Flags changed %lx -> %lx\n", orig_flags, new_flags);
    test/zdtm/static/thp_disable.c:         fail("Madvs changed %lx -> %lx\n", orig_madv, new_madv);

The fail() macro provides a new line character at the end of the
message. This patch fixes the following lint check that currently
fails in CI:

$ git --no-pager grep -E '^\s*\<(pr_perror|fail)\>.*\\n"'
test/zdtm/static/thp_disable.c:		fail("prctl(GET_THP_DISABLE) returned unexpected value: %d != 1\n", ret);
test/zdtm/static/thp_disable.c:		fail("Flags changed %lx -> %lx\n", orig_flags, new_flags);
test/zdtm/static/thp_disable.c:		fail("Madvs changed %lx -> %lx\n", orig_madv, new_madv);
test/zdtm/static/thp_disable.c:		fail("post-migration prctl(GET_THP_DISABLE) returned unexpected value: %d != 1\n", ret);
test/zdtm/static/thp_disable.c:		fail("Flags changed %lx -> %lx\n", orig_flags, new_flags);
test/zdtm/static/thp_disable.c:		fail("Madvs changed %lx -> %lx\n", orig_madv, new_madv);

Fixes: checkpoint-restore#2193

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
@codecov-commenter
Copy link

Codecov Report

Patch coverage has no change and project coverage change: -0.01 ⚠️

Comparison is base (9301aba) 70.71% compared to head (c5b3ddb) 70.71%.

❗ Current head c5b3ddb differs from pull request most recent head cb82940. Consider uploading reports for the commit cb82940 to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##           criu-dev    #2202      +/-   ##
============================================
- Coverage     70.71%   70.71%   -0.01%     
============================================
  Files           133      133              
  Lines         33238    33240       +2     
============================================
+ Hits          23504    23505       +1     
- Misses         9734     9735       +1     

see 7 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Snorch
Copy link
Member

Snorch commented Jun 19, 2023

@osctobe @avagin We have some more tests broken, e.g. after 0bd5abe4ed we have Centos7 test fail:

################### ALL TEST(S) PASSED (TOTAL 454/SKIPPED 1) ###################
Traceback (most recent call last):
  File "./test/zdtm.py", line 2854, in <module>
    opts['action'](opts)
  File "./test/zdtm.py", line 2427, in run_tests
    features[feat] = criu.check(feat)
  File "./test/zdtm.py", line 1507, in check
    return criu_cli.run("check", args, opts['criu_bin']) == 0
  File "./test/zdtm.py", line 903, in run
    return cr.wait(timeout=timeout)

@rst0git
Copy link
Member Author

rst0git commented Jun 19, 2023

@Snorch I've opened a GitHub issue to discuss this problem: #2203
Since Python 2 has been deprecated and CentOS 7 will be EOL soon, it might be better to drop compatibility support for Python 2.

@avagin avagin merged commit f018893 into checkpoint-restore:criu-dev Jun 19, 2023
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.

4 participants