diff options
-rwxr-xr-x | kokoro/gcp_ubuntu/run_tests.sh | 3 | ||||
-rw-r--r-- | pkg/sentry/fs/overlay.go | 2 | ||||
-rwxr-xr-x | runsc/test/image/install.sh | 9 |
3 files changed, 12 insertions, 2 deletions
diff --git a/kokoro/gcp_ubuntu/run_tests.sh b/kokoro/gcp_ubuntu/run_tests.sh index 2f5e375eb..5554350da 100755 --- a/kokoro/gcp_ubuntu/run_tests.sh +++ b/kokoro/gcp_ubuntu/run_tests.sh @@ -46,6 +46,9 @@ exit_code=${?} if [[ ${exit_code} -eq 0 ]]; then # image_test is tagged manual bazel test --test_output=errors --test_env=RUNSC_RUNTIME=${runtime} //runsc/test/image:image_test + bazel test --test_output=errors --test_env=RUNSC_RUNTIME=${runtime}-kvm //runsc/test/image:image_test + bazel test --test_output=errors --test_env=RUNSC_RUNTIME=${runtime}-nethost //runsc/test/image:image_test + bazel test --test_output=errors --test_env=RUNSC_RUNTIME=${runtime}-overlay //runsc/test/image:image_test exit_code=${?} fi diff --git a/pkg/sentry/fs/overlay.go b/pkg/sentry/fs/overlay.go index 90d21642e..a63f00e0e 100644 --- a/pkg/sentry/fs/overlay.go +++ b/pkg/sentry/fs/overlay.go @@ -113,7 +113,7 @@ func NewOverlayRoot(ctx context.Context, upper *Inode, lower *Inode, flags Mount // - lower must not require that file objects be revalidated. // - lower must not have dynamic file/directory content. func NewOverlayRootFile(ctx context.Context, upperMS *MountSource, lower *Inode, flags MountSourceFlags) (*Inode, error) { - if IsRegular(lower.StableAttr) { + if !IsRegular(lower.StableAttr) { return nil, fmt.Errorf("lower Inode is not a regular file") } msrc := newOverlayMountSource(upperMS, lower.MountSource, flags) diff --git a/runsc/test/image/install.sh b/runsc/test/image/install.sh index 94832dbe4..c110d96f9 100755 --- a/runsc/test/image/install.sh +++ b/runsc/test/image/install.sh @@ -75,10 +75,17 @@ if [[ ${uninstall} == 0 ]]; then mkdir -p "${logdir}" sudo -n chmod a+wx "${logdir}" - sudo -n "${dockercfg}" runtime-add "${runtime}" "${runsc}" --debug-log-dir "${logdir}" --debug --strace --log-packets + declare -r args="--debug-log-dir "${logdir}" --debug --strace --log-packets" + sudo -n "${dockercfg}" runtime-add "${runtime}" "${runsc}" ${args} + sudo -n "${dockercfg}" runtime-add "${runtime}"-kvm "${runsc}" --platform=kvm ${args} + sudo -n "${dockercfg}" runtime-add "${runtime}"-hostnet "${runsc}" --network=host ${args} + sudo -n "${dockercfg}" runtime-add "${runtime}"-overlay "${runsc}" --overlay ${args} else sudo -n "${dockercfg}" runtime-rm "${runtime}" + sudo -n "${dockercfg}" runtime-rm "${runtime}"-kvm + sudo -n "${dockercfg}" runtime-rm "${runtime}"-hostnet + sudo -n "${dockercfg}" runtime-rm "${runtime}"-overlay fi echo "Restarting docker service..." |