Skip to content

Commit 8534436

Browse files
Fix for regression in modprobe script run
1 parent 5958f67 commit 8534436

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

lisa/tools/modprobe.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from typing import Any, Dict, List, Optional, Type, Union
99

1010
from lisa.executable import CustomScript, CustomScriptBuilder, ExecutableResult, Tool
11-
from lisa.tools import Cat, Chown, Dhclient
11+
from lisa.tools import Cat, Dhclient
1212
from lisa.tools.dmesg import Dmesg
1313
from lisa.tools.journalctl import Journalctl
1414
from lisa.tools.kernel_config import KLDStat
@@ -207,20 +207,14 @@ def reload(
207207
include_output=True,
208208
)
209209

210-
original_user = self.node.tools[Whoami].get_username()
211-
if original_user:
212-
self.node.tools[Chown].change_owner(
213-
file=Path(loop_process_pid_file_name), user=original_user
214-
)
215-
216210
cat = self.node.tools[Cat]
217211
tried_times: int = 0
218212
timer = create_timer()
219213
# Wait for the loop process to start and check its status
220214
while (timer.elapsed(False) < timeout) or tried_times < 1:
221215
tried_times += 1
222216
try:
223-
pid = cat.read(loop_process_pid_file_name, force_run=True)
217+
pid = cat.read(loop_process_pid_file_name, force_run=True, sudo=True)
224218
r = self.node.execute(
225219
f"ps -p {pid} > /dev/null && echo 'running' || echo 'not_running'",
226220
sudo=True,

0 commit comments

Comments
 (0)