Skip to content

Commit 7fd96c1

Browse files
committed
runtimetest: Fix check for device node
Signed-off-by: Mrunal Patel <[email protected]>
1 parent cc6b676 commit 7fd96c1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cmd/runtimetest/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ func validateDefaultDevices(spec *rspec.Spec) error {
283283
return err
284284
}
285285
} else {
286-
if fi.Mode() != os.ModeDevice {
286+
if fi.Mode()&os.ModeDevice != os.ModeDevice {
287287
return fmt.Errorf("file %v is not a device as expected", device)
288288
}
289289
}

test_runtime.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ tar -xf rootfs.tar.gz -C ${TESTDIR}
7878
cp runtimetest ${TESTDIR}
7979

8080
pushd $TESTDIR > /dev/null
81-
ocitools generate --output config.json "${TEST_ARGS[@]}" --rootfs '.'
81+
ocitools generate --tty --output config.json "${TEST_ARGS[@]}" --rootfs '.'
8282
popd > /dev/null
8383

8484
TESTCMD="${RUNTIME} start $(uuidgen)"

0 commit comments

Comments
 (0)