Don't assume ipcmk command supports size suffix.

Expand the use of "1M" to the corresponding number of bytes, since
support for size suffix was only added to `ipcmk` in util-linux 2.27
which is not yet available in some Linux distributions.

Tested by running `make test-e2e-node` against distributions with ipcmk
that supports and doesn't support the suffix syntax, all of them passed.
pull/6/head
Filipe Brandenburger 2018-01-03 10:58:39 -08:00
parent 70620cb9ea
commit 67869273a8
1 changed files with 1 additions and 1 deletions

View File

@ -150,7 +150,7 @@ var _ = framework.KubeDescribe("Security Context", func() {
hostSharedMemoryID := ""
BeforeEach(func() {
output, err := exec.Command("sh", "-c", "ipcmk -M 1M | awk '{print $NF}'").Output()
output, err := exec.Command("sh", "-c", "ipcmk -M 1048576 | awk '{print $NF}'").Output()
if err != nil {
framework.Failf("Failed to create the shared memory on the host: %v", err)
}