Skip to content

Commit 02101df

Browse files
committed
Revert "fix test"
This reverts commit 62c5fd9.
1 parent 5325ccd commit 02101df

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

test/e2e/storage/drivers/in_tree.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ import (
4343
"time"
4444

4545
"github.com/onsi/ginkgo/v2"
46-
4746
v1 "k8s.io/api/core/v1"
4847
rbacv1 "k8s.io/api/rbac/v1"
4948
storagev1 "k8s.io/api/storage/v1"
@@ -1224,12 +1223,7 @@ func (l *localDriver) PrepareTest(ctx context.Context, f *framework.Framework) *
12241223
framework.ExpectNoError(err)
12251224

12261225
l.hostExec = utils.NewHostExec(f)
1227-
// It is recommended to mount /tmp with options noexec, nodev, nosuid.
1228-
// tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noexec,relatime,seclabel,inode64)
1229-
// This prevents scripts and binaries from being executed from the /tmp directory.
1230-
// This can cause errors like "Permission denied" when executing files from `/tmp`.
1231-
// To pass the test that verifies the execution of files on a volume, we use `/var` instead of `/tmp`.
1232-
l.ltrMgr = utils.NewLocalResourceManager("local-driver", l.hostExec, "/var")
1226+
l.ltrMgr = utils.NewLocalResourceManager("local-driver", l.hostExec, "/tmp")
12331227

12341228
// This can't be done in SkipUnsupportedTest because the test framework is not initialized yet
12351229
if l.volumeType == utils.LocalVolumeGCELocalSSD {

test/e2e/storage/utils/local.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import (
2727
"strings"
2828

2929
"github.com/onsi/ginkgo/v2"
30-
3130
v1 "k8s.io/api/core/v1"
3231
"k8s.io/apimachinery/pkg/util/uuid"
3332
"k8s.io/kubernetes/test/e2e/framework"
@@ -216,7 +215,7 @@ func (l *ltrMgr) cleanupLocalVolumeDirectory(ctx context.Context, ltr *LocalTest
216215
func (l *ltrMgr) setupLocalVolumeDirectoryLink(ctx context.Context, node *v1.Node, parameters map[string]string) *LocalTestResource {
217216
hostDir := l.getTestDir()
218217
hostDirBackend := hostDir + "-backend"
219-
cmd := fmt.Sprintf("mkdir -p %s && ln -s %s %s", hostDirBackend, hostDirBackend, hostDir)
218+
cmd := fmt.Sprintf("mkdir %s && ln -s %s %s", hostDirBackend, hostDirBackend, hostDir)
220219
err := l.hostExec.IssueCommand(ctx, cmd, node)
221220
framework.ExpectNoError(err)
222221
return &LocalTestResource{
@@ -236,7 +235,7 @@ func (l *ltrMgr) cleanupLocalVolumeDirectoryLink(ctx context.Context, ltr *Local
236235

237236
func (l *ltrMgr) setupLocalVolumeDirectoryBindMounted(ctx context.Context, node *v1.Node, parameters map[string]string) *LocalTestResource {
238237
hostDir := l.getTestDir()
239-
cmd := fmt.Sprintf("mkdir -p %s && mount --bind %s %s", hostDir, hostDir, hostDir)
238+
cmd := fmt.Sprintf("mkdir %s && mount --bind %s %s", hostDir, hostDir, hostDir)
240239
err := l.hostExec.IssueCommand(ctx, cmd, node)
241240
framework.ExpectNoError(err)
242241
return &LocalTestResource{
@@ -256,7 +255,7 @@ func (l *ltrMgr) cleanupLocalVolumeDirectoryBindMounted(ctx context.Context, ltr
256255
func (l *ltrMgr) setupLocalVolumeDirectoryLinkBindMounted(ctx context.Context, node *v1.Node, parameters map[string]string) *LocalTestResource {
257256
hostDir := l.getTestDir()
258257
hostDirBackend := hostDir + "-backend"
259-
cmd := fmt.Sprintf("mkdir -p %s && mount --bind %s %s && ln -s %s %s", hostDirBackend, hostDirBackend, hostDirBackend, hostDirBackend, hostDir)
258+
cmd := fmt.Sprintf("mkdir %s && mount --bind %s %s && ln -s %s %s", hostDirBackend, hostDirBackend, hostDirBackend, hostDirBackend, hostDir)
260259
err := l.hostExec.IssueCommand(ctx, cmd, node)
261260
framework.ExpectNoError(err)
262261
return &LocalTestResource{

0 commit comments

Comments
 (0)