Skip to content

Commit 4273419

Browse files
authored
Fix test cases for Azure Linux (#4152)
* Fix test cases for Azure Linux * Handle review comments * Fix circular dependency * Fix CI issues * Fix ci issue
1 parent a0cb529 commit 4273419

3 files changed

Lines changed: 14 additions & 3 deletions

File tree

lisa/features/serial_console.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ class SerialConsole(Feature):
6363
# more NUMA nodes on AMD processors.
6464
# The call trace is annoying but does not affect correct operation of the VM.
6565
re.compile(r"(.*RIP: 0010:topology_sane.isra.*)$", re.MULTILINE),
66+
re.compile(
67+
r".*EFI stub:.*FIRMWARE BUG: kernel image not aligned on 64k boundary.*",
68+
re.IGNORECASE,
69+
),
6670
]
6771

6872
# Patterns for extracting error codes from panic messages

lisa/microsoft/testsuites/stress/tlb_stress.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from lisa.executable import Tool
1212
from lisa.messages import TestStatus, send_sub_test_result_message
1313
from lisa.testsuite import TestResult
14-
from lisa.tools import Dmesg
14+
from lisa.tools import Chmod, Dmesg, Mkdir
1515
from lisa.util import LisaException, UnsupportedDistroException
1616

1717
if TYPE_CHECKING:
@@ -714,7 +714,8 @@ def _deploy_tlb_program(self) -> None:
714714
remote_node = cast(RemoteNode, self.node)
715715

716716
# Create working directory
717-
self.node.execute(f"mkdir -p {self._work}", sudo=True)
717+
self.node.tools[Mkdir].create_directory(self._work, sudo=True)
718+
self.node.tools[Chmod].chmod(path=self._work, permission="777", sudo=True)
718719

719720
# Get the C program from the same directory
720721
c_program_path = Path(__file__).parent / "tlb_flush_stress.c"

lisa/tools/modprobe.py

Lines changed: 7 additions & 1 deletion
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, Dhclient
11+
from lisa.tools import Cat, Chown, Dhclient
1212
from lisa.tools.dmesg import Dmesg
1313
from lisa.tools.journalctl import Journalctl
1414
from lisa.tools.kernel_config import KLDStat
@@ -207,6 +207,12 @@ 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+
210216
cat = self.node.tools[Cat]
211217
tried_times: int = 0
212218
timer = create_timer()

0 commit comments

Comments
 (0)