Provide ltp_skip_test_file var for LTP, set can_install to False for Swap tools#4287
Provide ltp_skip_test_file var for LTP, set can_install to False for Swap tools#4287
Conversation
7923afb to
a226caf
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds support for a new ltp_skip_test_file variable to the LTP test suite, allowing users to specify a file containing test names to skip. This is particularly useful for WSL environments where the traditional ltp_skip_test string variable has parsing issues with newline characters. The PR also includes unrelated changes to add can_install properties to swap-related tools and provides a WSL-specific skip file with 313 test names.
Changes:
- Added
ltp_skip_test_filevariable support to enable file-based skip test configuration as an alternative to the string-basedltp_skip_testvariable - Added
can_install = Falseproperties to SwapOn, SwapOff, MkSwap, and SwapInfoBSD tool classes - Created a WSL-specific skip file (wsl_ltp_skip_file.txt) containing 313 LTP tests to skip
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| lisa/tools/swap.py | Adds can_install property returning False to swap utility tools (SwapOn, SwapOff, MkSwap, SwapInfoBSD) |
| lisa/microsoft/testsuites/ltp/wsl_ltp_skip_file.txt | New file containing 313 LTP test names to skip for WSL environments |
| lisa/microsoft/testsuites/ltp/ltpsuite.py | Extracts ltp_skip_test_file variable and passes it to the LTP run_test method |
| lisa/microsoft/testsuites/ltp/ltp.py | Implements file copy logic to upload user-provided skip file to remote node when user_input_skip_file is provided |
Comments suppressed due to low confidence (1)
lisa/microsoft/testsuites/ltp/ltp.py:111
- The new user_input_skip_file parameter lacks documentation. Consider adding a docstring to the run_test method that explains all parameters, including this new one. The docstring should clarify that user_input_skip_file is a local file path that will be copied to the remote node and used as the skip file, and that it takes precedence over skip_tests.
def run_test(
self,
test_result: TestResult,
# empty ltp_tests will run LTP full test
ltp_tests: List[str],
skip_tests: List[str],
log_path: str,
user_input_skip_file: str = "",
block_device: Optional[str] = None,
temp_dir: str = "/tmp/",
ltp_run_timeout: int = 12000,
) -> List[LtpResult]:
|
@paxue what's the detailed issue? Can you elaborate a little bit? Thanks! |
remove --- from debug info Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Hi, lili, there is a “Quoting Hell” error like the following sample: The root cause of this failure is nested escaping (commonly known as “Quoting Hell”). When remotely invoke Windows wsl.exe over SSH, and then have WSL execute sh -c, our command string goes through three layers of parsing:
In our original command, the double quotes and newline characters after echo were truncated or misinterpreted during this multi-layer transmission process. Solution: |
thanks for the explanation, could you please try this way |
base64 method will work on short length of "skip_tests" string. For long string(4KB+) it will be out of input buffer. I will try another method |
Provide ltp_skip_test_file var for LTP to control the skipped tests
WSL won't work with traditional "ltp_skip_test" string because of the parsing '"'\n'"' issue.
Add can_install properties returning False to SwapOn, SwapOff, MkSwap, and SwapInfoBSD