From 08dd8e66bab82d260db2d8bdd7767602d1b2c01a Mon Sep 17 00:00:00 2001 From: Krishna Muriki Date: Sun, 5 Sep 2021 21:23:50 -0700 Subject: [PATCH] Revert "Fix a regression introduced by #6008 adding bind mounts without destination two times" This reverts commit 26a215ee89b420e68212eb3a3d20345689a88b74. --- e2e/actions/actions.go | 1 - e2e/actions/regressions.go | 33 ------------------- .../engine/singularity/config/config.go | 2 -- 3 files changed, 36 deletions(-) diff --git a/e2e/actions/actions.go b/e2e/actions/actions.go index 14feae8e9d..75986fe5ef 100644 --- a/e2e/actions/actions.go +++ b/e2e/actions/actions.go @@ -2270,7 +2270,6 @@ func E2ETests(env e2e.TestEnv) testhelper.Tests { "issue 5599": c.issue5599, // https://github.com/hpcng/singularity/issues/5599 "issue 5631": c.issue5631, // https://github.com/hpcng/singularity/issues/5631 "issue 5690": c.issue5690, // https://github.com/hpcng/singularity/issues/5690 - "issue 6165": c.issue6165, // https://github.com/hpcng/singularity/issues/6165 "network": c.actionNetwork, // test basic networking "binds": c.actionBinds, // test various binds "exit and signals": c.exitSignals, // test exit and signals propagation diff --git a/e2e/actions/regressions.go b/e2e/actions/regressions.go index 92ae5aeed8..8236710537 100644 --- a/e2e/actions/regressions.go +++ b/e2e/actions/regressions.go @@ -684,36 +684,3 @@ func (c actionTests) invalidRemote(t *testing.T) { ) } - -// Check that a bind mount without a destination is not added two times. -func (c actionTests) issue6165(t *testing.T) { - e2e.EnsureImage(t, c.env) - - workspace, cleanup := e2e.MakeTempDir(t, c.env.TestDir, "issue6165-", "") - defer e2e.Privileged(cleanup) - - hostCanaryFile := filepath.Join(workspace, "file") - - if err := fs.Touch(hostCanaryFile); err != nil { - t.Fatalf("failed to create canary_file: %s", err) - } - - c.env.RunSingularity( - t, - e2e.WithProfile(e2e.UserProfile), - e2e.WithCommand("exec"), - e2e.WithArgs( - "--contain", - "--bind", hostCanaryFile, - c.env.ImagePath, - "test", "-f", hostCanaryFile, - ), - e2e.ExpectExit( - 0, - e2e.ExpectError( - e2e.UnwantedContainMatch, - "destination is already in the mount point list", - ), - ), - ) -} diff --git a/pkg/runtime/engine/singularity/config/config.go b/pkg/runtime/engine/singularity/config/config.go index 8f8070de0b..402571c8de 100644 --- a/pkg/runtime/engine/singularity/config/config.go +++ b/pkg/runtime/engine/singularity/config/config.go @@ -408,8 +408,6 @@ func ParseBindPath(paths []string) ([]BindPath, error) { } binds = append(binds, bp) elem = 0 - bind = "" - continue } // new bind path bind = s