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

criu: move sigact dump/restore code into sigact.c #2361

Merged
merged 1 commit into from May 25, 2024

Conversation

arnavbhatt288
Copy link
Contributor

Move sigact dump/restore code into sigact.c

Resolves: #336

@arnavbhatt288 arnavbhatt288 force-pushed the criu-dev branch 2 times, most recently from dc6854f to 986ebfe Compare March 10, 2024 11:12
criu/sigact.c Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Mar 15, 2024

Codecov Report

Attention: Patch coverage is 45.31250% with 70 lines in your changes are missing coverage. Please review.

Project coverage is 70.76%. Comparing base (cb39c62) to head (ff41d2e).
Report is 4 commits behind head on criu-dev.

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

Files Patch % Lines
criu/sigact.c 45.31% 70 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           criu-dev    #2361      +/-   ##
============================================
+ Coverage     70.21%   70.76%   +0.54%     
============================================
  Files           132      136       +4     
  Lines         34372    32963    -1409     
============================================
- Hits          24134    23325     -809     
+ Misses        10238     9638     -600     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

criu/sigact.c Show resolved Hide resolved
criu/sigact.c Outdated Show resolved Hide resolved
criu/cr-restore.c Outdated Show resolved Hide resolved
criu/sigact.c Outdated Show resolved Hide resolved
@avagin
Copy link
Member

avagin commented Mar 25, 2024

criu: move sigact dump/restore code into sigact.c
Move sigact dump/restore code into sigact.c

  • Need to separate subject from body with a blank line.
  • The body should not repeat the subject.

criu/cr-restore.c Show resolved Hide resolved
criu/include/sigact.h Show resolved Hide resolved
criu/parasite-syscall.c Show resolved Hide resolved
@Snorch
Copy link
Member

Snorch commented Apr 16, 2024

Please delete #include "images/sa.pb-c.h" from criu/parasite-syscall.c as it becomes unused AFAICS after this PR.

Seperate sigact dump/restore code from cr-restore.c and parasite-syscall.c into sigact.c

Signed-off-by: Arnav Bhatt <arnav@ghativega.in>
@Snorch
Copy link
Member

Snorch commented May 20, 2024

Test errors:

  1. Fedora ASAN Test / build
    Error is
2024-04-21T22:05:17.5751499Z ------------------------ grep Error ------------------------
2024-04-21T22:05:17.5752133Z b'(00.134397) cg: Restoring cgroup property value [0] to [zdtmtst/bar/notify_on_release]'
2024-04-21T22:05:17.5752883Z b'(00.134415) cg: Restoring cgroup property value [] to [zdtmtst/bar/cgroup.procs]'
2024-04-21T22:05:17.5753563Z b'(00.134438) cg: Restoring cgroup property value [] to [zdtmtst/bar/tasks]'
2024-04-21T22:05:17.5754964Z b'(00.134454) cg: Restoring cgroup property value [0] to [zdtmtst/foo/cgroup.clone_children]'
2024-04-21T22:05:17.5756990Z b'(00.134469) Error (criu/cgroup.c:1434): cg: bad cgroup path: zdtmtst/foo/cgroup.clone_children: No such file or directory'
2024-04-21T22:05:17.5758464Z b'(00.135163) mnt: Switching to new ns to clean ghosts'
2024-04-21T22:05:17.5759064Z b'(00.135316) Error (criu/cr-restore.c:2310): Restoring FAILED.'
2024-04-21T22:05:17.5759578Z ------------------------ ERROR OVER ------------------------
2024-04-21T22:05:17.5760092Z ############## Test zdtm/static/cgroupv2_00 FAIL at CRIU restore ###############

It seems that there is no more of this cgroup.clone_children file in cgroup-v2:

[linux]$ git grep clone_children | grep cgroup-v2
Documentation/admin-guide/cgroup-v2.rst:- "cgroup.clone_children" is removed.

This is not related to this PR.
2) CRIU Image Streamer Test / build (pull_request)

2024-04-21T22:05:07.9500880Z ========================= Test zdtm/static/fpu03 PASS ==========================
2024-04-21T22:05:07.9501386Z ========================== Run zdtm/static/fpu03 in h ==========================
2024-04-21T22:05:07.9501931Z Start test
2024-04-21T22:05:07.9502255Z ./fpu03 --pidfile=fpu03.pid --outfile=fpu03.out
2024-04-21T22:05:07.9502667Z Run criu-image-streamer in capture mode
2024-04-21T22:05:07.9502980Z Run criu dump
2024-04-21T22:05:07.9503264Z Run criu-image-streamer in extract mode
2024-04-21T22:05:07.9503644Z Run criu-image-streamer in serve mode
2024-04-21T22:05:07.9503952Z Run criu restore
2024-04-21T22:05:07.9504208Z Traceback (most recent call last):
2024-04-21T22:05:07.9504686Z   File "/home/runner/work/criu/criu/test/zdtm.py", line 2847, in <module>
2024-04-21T22:05:07.9505157Z     fork_zdtm()
2024-04-21T22:05:07.9505554Z   File "/home/runner/work/criu/criu/test/zdtm.py", line 2838, in fork_zdtm
2024-04-21T22:05:07.9506083Z     do_run_test(tinfo[0], tinfo[1], tinfo[2], tinfo[3])
2024-04-21T22:05:07.9506614Z   File "/home/runner/work/criu/criu/test/zdtm.py", line 1932, in do_run_test
2024-04-21T22:05:07.9507101Z     cr(cr_api, t, opts)
2024-04-21T22:05:07.9507489Z   File "/home/runner/work/criu/criu/test/zdtm.py", line 1609, in cr
2024-04-21T22:05:07.9507988Z     os.environ["ZDTM_TEST_PID"] = str(test.getpid())
2024-04-21T22:05:07.9508498Z   File "/home/runner/work/criu/criu/test/zdtm.py", line 561, in getpid
2024-04-21T22:05:07.9509167Z     self.__pid = rpidfile(self.__pidfile())
2024-04-21T22:05:07.9509654Z   File "/home/runner/work/criu/criu/test/zdtm.py", line 339, in rpidfile
2024-04-21T22:05:07.9510114Z     with open(path) as fd:
2024-04-21T22:05:07.9510648Z FileNotFoundError: [Errno 2] No such file or directory: 'zdtm/static/fpu03.pid'

This one I'm not sure.
3) Compat Tests / build (GCC) (pull_request) is same as in here #2380 (review) - unrelated.

@avagin
Copy link
Member

avagin commented May 21, 2024

LGTM

@avagin avagin merged commit 1a848fe into checkpoint-restore:criu-dev May 25, 2024
35 of 39 checks passed
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.

Move sigact dump/restore code into separate file
4 participants