Skip to content

Commit 1789b65

Browse files
committed
virtcontainers: Set correct Shmsize for ppc64le
Fix the test case TestGetShmSizeBindMounted by setting the right ShmSize for ppc64le. Fixes: kata-containers#1702 Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
1 parent 10c14bc commit 1789b65

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

virtcontainers/pkg/oci/utils_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313
"path"
1414
"path/filepath"
1515
"reflect"
16+
"runtime"
1617
"strconv"
1718
"testing"
1819

@@ -816,6 +817,10 @@ func TestGetShmSizeBindMounted(t *testing.T) {
816817
assert.Nil(t, err)
817818

818819
size := 8192
820+
if runtime.GOARCH == "ppc64le" {
821+
// PAGE_SIZE on ppc64le is 65536
822+
size = 65536
823+
}
819824

820825
shmOptions := "mode=1777,size=" + strconv.Itoa(size)
821826
err = unix.Mount("shm", shmPath, "tmpfs", unix.MS_NOEXEC|unix.MS_NOSUID|unix.MS_NODEV, shmOptions)

0 commit comments

Comments
 (0)