Skip to content

Commit

Permalink
fixup! drivers/exec: Don't inherit Nomad oom_score_adj value (#10698)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahmood Ali committed Jun 9, 2021
1 parent 9db0909 commit 19bef81
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/shared/executor/executor_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -470,14 +470,14 @@ func TestExecutor_DoesNotInheritOomScoreAdj(t *testing.T) {
testutil.ExecCompatible(t)

oomPath := "/proc/self/oom_score_adj"
origValue, err := os.ReadFile(oomPath)
origValue, err := ioutil.ReadFile(oomPath)
require.NoError(t, err, "reading oom_score_adj")

err = os.WriteFile(oomPath, []byte("-100"), 0644)
err = ioutil.WriteFile(oomPath, []byte("-100"), 0644)
require.NoError(t, err, "setting temporary oom_score_adj")

defer func() {
err := os.WriteFile(oomPath, origValue, 0644)
err := ioutil.WriteFile(oomPath, origValue, 0644)
require.NoError(t, err, "restoring oom_score_adj")
}()

Expand Down

0 comments on commit 19bef81

Please sign in to comment.