Skip to content

Commit

Permalink
virtcontainers: Set correct Shmsize for ppc64le
Browse files Browse the repository at this point in the history
Fix the test case TestGetShmSizeBindMounted by
setting the right ShmSize for ppc64le.

Fixes: kata-containers#1702

Signed-off-by: Nitesh Konkar [email protected]
  • Loading branch information
nitkon committed May 17, 2019
1 parent 10c14bc commit 1789b65
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions virtcontainers/pkg/oci/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"path"
"path/filepath"
"reflect"
"runtime"
"strconv"
"testing"

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

size := 8192
if runtime.GOARCH == "ppc64le" {
// PAGE_SIZE on ppc64le is 65536
size = 65536
}

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

0 comments on commit 1789b65

Please sign in to comment.