@@ -29,6 +29,10 @@ func TestSandboxMemoryIntegrity(t *testing.T) {
2929
3030 envdClient := setup .GetEnvdClient (t , t .Context ())
3131
32+ installCmd := `apt-get update && apt-get install -y time`
33+ err := utils .ExecCommandAsRoot (t , t .Context (), sbx , envdClient , "bash" , "-c" , installCmd )
34+ require .NoError (t , err )
35+
3236 tmpfsFile := "/mnt/testfile"
3337
3438 percentageOfFreeMemoryToUse := 80
@@ -53,7 +57,7 @@ USED_MEM_MB_AFTER=$(free -m | awk '/^Mem:/ {print $3}')
5357echo "Used memory after tmpfs mount and file fill: ${USED_MEM_MB_AFTER} MB"
5458` , percentageOfFreeMemoryToUse , percentageOfFreeMemoryToUse , percentageOfFreeMemoryToUse , tmpfsFile )
5559
56- _ , err : = utils .ExecCommandAsRootWithOutput (t , t .Context (), sbx , envdClient , "bash" , "-c" , memCmd )
60+ _ , err = utils .ExecCommandAsRootWithOutput (t , t .Context (), sbx , envdClient , "bash" , "-c" , memCmd )
5761 require .NoError (t , err )
5862
5963 hashCmd := fmt .Sprintf (`sha256sum "%s" | awk '{print $1}'` , tmpfsFile )
@@ -98,7 +102,7 @@ echo "Used memory after tmpfs mount and file fill: ${USED_MEM_MB_AFTER} MB"
98102
99103 envdClient := setup .GetEnvdClient (t , t .Context ())
100104
101- installCmd := `apt-get update && apt-get install -y stress-ng`
105+ installCmd := `apt-get update && apt-get install -y stress-ng time `
102106 err := utils .ExecCommandAsRoot (t , t .Context (), sbx , envdClient , "bash" , "-c" , installCmd )
103107 require .NoError (t , err )
104108
0 commit comments