@@ -84,7 +84,7 @@ function runc_restore_with_pipes() {
8484 shift
8585
8686 ret=0
87- __runc --criu " $CRIU " restore -d --work-path " $workdir " --image-path ./image-dir " $@ " " $name " < & ${in_r} >& ${out_w} 2>& ${err_w} || ret=$?
87+ __runc restore -d --work-path " $workdir " --image-path ./image-dir " $@ " " $name " < & ${in_r} >& ${out_w} 2>& ${err_w} || ret=$?
8888 if [ " $ret " -ne 0 ]; then
8989 echo " __runc restore $name failed (status: $ret )"
9090 exec {err_w}>& -
@@ -109,15 +109,15 @@ function simple_cr() {
109109
110110 for _ in $( seq 2) ; do
111111 # checkpoint the running container
112- runc --criu " $CRIU " " $@ " checkpoint --work-path ./work-dir test_busybox
112+ runc " $@ " checkpoint --work-path ./work-dir test_busybox
113113 grep -B 5 Error ./work-dir/dump.log || true
114114 [ " $status " -eq 0 ]
115115
116116 # after checkpoint busybox is no longer running
117117 testcontainer test_busybox checkpointed
118118
119119 # restore from checkpoint
120- runc --criu " $CRIU " " $@ " restore -d --work-path ./work-dir --console-socket " $CONSOLE_SOCKET " test_busybox
120+ runc " $@ " restore -d --work-path ./work-dir --console-socket " $CONSOLE_SOCKET " test_busybox
121121 grep -B 5 Error ./work-dir/restore.log || true
122122 [ " $status " -eq 0 ]
123123
@@ -162,12 +162,12 @@ function simple_cr() {
162162 testcontainer test_busybox running
163163
164164 # runc should fail with absolute parent image path.
165- runc --criu " $CRIU " checkpoint --parent-path " $( pwd) " /parent-dir --work-path ./work-dir --image-path ./image-dir test_busybox
165+ runc checkpoint --parent-path " $( pwd) " /parent-dir --work-path ./work-dir --image-path ./image-dir test_busybox
166166 [[ " ${output} " == * " --parent-path" * ]]
167167 [ " $status " -ne 0 ]
168168
169169 # runc should fail with invalid parent image path.
170- runc --criu " $CRIU " checkpoint --parent-path ./parent-dir --work-path ./work-dir --image-path ./image-dir test_busybox
170+ runc checkpoint --parent-path ./parent-dir --work-path ./work-dir --image-path ./image-dir test_busybox
171171 [[ " ${output} " == * " --parent-path" * ]]
172172 [ " $status " -ne 0 ]
173173}
@@ -178,7 +178,7 @@ function simple_cr() {
178178
179179 # test checkpoint pre-dump
180180 mkdir parent-dir
181- runc --criu " $CRIU " checkpoint --pre-dump --image-path ./parent-dir test_busybox
181+ runc checkpoint --pre-dump --image-path ./parent-dir test_busybox
182182 [ " $status " -eq 0 ]
183183
184184 # busybox should still be running
@@ -187,7 +187,7 @@ function simple_cr() {
187187 # checkpoint the running container
188188 mkdir image-dir
189189 mkdir work-dir
190- runc --criu " $CRIU " checkpoint --parent-path ../parent-dir --work-path ./work-dir --image-path ./image-dir test_busybox
190+ runc checkpoint --parent-path ../parent-dir --work-path ./work-dir --image-path ./image-dir test_busybox
191191 grep -B 5 Error ./work-dir/dump.log || true
192192 [ " $status " -eq 0 ]
193193
@@ -203,7 +203,7 @@ function simple_cr() {
203203
204204@test " checkpoint --lazy-pages and restore" {
205205 # check if lazy-pages is supported
206- if ! " ${CRIU} " check --feature uffd-noncoop; then
206+ if ! criu check --feature uffd-noncoop; then
207207 skip " this criu does not support lazy migration"
208208 fi
209209
@@ -224,7 +224,7 @@ function simple_cr() {
224224 # TCP port for lazy migration
225225 port=27277
226226
227- __runc --criu " $CRIU " checkpoint --lazy-pages --page-server 0.0.0.0:${port} --status-fd ${lazy_w} --work-path ./work-dir --image-path ./image-dir test_busybox &
227+ __runc checkpoint --lazy-pages --page-server 0.0.0.0:${port} --status-fd ${lazy_w} --work-path ./work-dir --image-path ./image-dir test_busybox &
228228 cpt_pid=$!
229229
230230 # wait for lazy page server to be ready
@@ -242,7 +242,7 @@ function simple_cr() {
242242 [ -e image-dir/inventory.img ]
243243
244244 # Start CRIU in lazy-daemon mode
245- ${CRIU} lazy-pages --page-server --address 127.0.0.1 --port ${port} -D image-dir &
245+ criu lazy-pages --page-server --address 127.0.0.1 --port ${port} -D image-dir &
246246 lp_pid=$!
247247
248248 # Restore lazily from checkpoint.
@@ -264,7 +264,7 @@ function simple_cr() {
264264
265265@test " checkpoint and restore in external network namespace" {
266266 # check if external_net_ns is supported; only with criu 3.10++
267- if ! " ${CRIU} " check --feature external_net_ns; then
267+ if ! criu check --feature external_net_ns; then
268268 # this criu does not support external_net_ns; skip the test
269269 skip " this criu does not support external network namespaces"
270270 fi
@@ -290,15 +290,15 @@ function simple_cr() {
290290 for _ in $( seq 2) ; do
291291 # checkpoint the running container; this automatically tells CRIU to
292292 # handle the network namespace defined in config.json as an external
293- runc --criu " $CRIU " checkpoint --work-path ./work-dir test_busybox
293+ runc checkpoint --work-path ./work-dir test_busybox
294294 grep -B 5 Error ./work-dir/dump.log || true
295295 [ " $status " -eq 0 ]
296296
297297 # after checkpoint busybox is no longer running
298298 testcontainer test_busybox checkpointed
299299
300300 # restore from checkpoint; this should restore the container into the existing network namespace
301- runc --criu " $CRIU " restore -d --work-path ./work-dir --console-socket " $CONSOLE_SOCKET " test_busybox
301+ runc restore -d --work-path ./work-dir --console-socket " $CONSOLE_SOCKET " test_busybox
302302 grep -B 5 Error ./work-dir/restore.log || true
303303 [ " $status " -eq 0 ]
304304
@@ -341,7 +341,7 @@ function simple_cr() {
341341 testcontainer test_busybox running
342342
343343 # checkpoint the running container
344- runc --criu " $CRIU " checkpoint --work-path ./work-dir test_busybox
344+ runc checkpoint --work-path ./work-dir test_busybox
345345 grep -B 5 Error ./work-dir/dump.log || true
346346 [ " $status " -eq 0 ]
347347 ! test -f ./work-dir/" $tmplog1 "
@@ -352,7 +352,7 @@ function simple_cr() {
352352
353353 test -f ./work-dir/" $tmplog2 " && unlink ./work-dir/" $tmplog2 "
354354 # restore from checkpoint
355- runc --criu " $CRIU " restore -d --work-path ./work-dir --console-socket " $CONSOLE_SOCKET " test_busybox
355+ runc restore -d --work-path ./work-dir --console-socket " $CONSOLE_SOCKET " test_busybox
356356 grep -B 5 Error ./work-dir/restore.log || true
357357 [ " $status " -eq 0 ]
358358 ! test -f ./work-dir/" $tmplog1 "
@@ -386,7 +386,7 @@ function simple_cr() {
386386 testcontainer test_busybox running
387387
388388 # checkpoint the running container
389- runc --criu " $CRIU " checkpoint --work-path ./work-dir test_busybox
389+ runc checkpoint --work-path ./work-dir test_busybox
390390 grep -B 5 Error ./work-dir/dump.log || true
391391 [ " $status " -eq 0 ]
392392
@@ -398,7 +398,7 @@ function simple_cr() {
398398 rm -rf " ${bind1:? } " /*
399399
400400 # restore from checkpoint
401- runc --criu " $CRIU " restore -d --work-path ./work-dir --console-socket " $CONSOLE_SOCKET " test_busybox
401+ runc restore -d --work-path ./work-dir --console-socket " $CONSOLE_SOCKET " test_busybox
402402 grep -B 5 Error ./work-dir/restore.log || true
403403 [ " $status " -eq 0 ]
404404
0 commit comments