Skip to content

[AI Generated] BugFix: ensure tar package is installed before use#4441

Open
LiliDeng wants to merge 1 commit intomainfrom
bugfix/tar-package-install_280426_084620
Open

[AI Generated] BugFix: ensure tar package is installed before use#4441
LiliDeng wants to merge 1 commit intomainfrom
bugfix/tar-package-install_280426_084620

Conversation

@LiliDeng
Copy link
Copy Markdown
Collaborator

Summary

On distro images that do not ship the GNU tar binary by default (e.g. Oracle Linux 10), the Tar tool's _check_exists() returned True unconditionally and _install() was not implemented. Any caller (such as Texinfo._install_from_src) hit tar: command not found (exit 127) when invoking tar.extract(), surfacing as:

AssertionError: [Failed to extract file to ...] tar: command not found

Fix

lisa/tools/tar.py:

  • _check_exists() now actually probes for the tar binary via command_exists() instead of always returning True.
  • _install() installs the tar package via the Posix OS package manager.
  • can_install is set to True so the framework triggers _install when the binary is missing.

The existing Suse-specific bzip2 dependency check is preserved.

Validation

Item Detail
Test case NetworkPerformace.perf_tcp_max_pps_synthetic
Image oracle oracle-linux ol10-lvm-gen2 10.0.1
VM size Standard_D2ds_v5
Region westus3
Result PASSED (was previously failing in Texinfo._install_from_srctar.extract)
Lint blackflake8pylint 10/10 ✓

Copilot AI review requested due to automatic review settings April 28, 2026 01:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes tool bootstrapping on POSIX distros that don’t ship tar by default by making Tar correctly detect the binary and install the required package when missing, preventing downstream failures (e.g., Texinfo._install_from_src calling tar.extract()).

Changes:

  • Implement real existence probing for tar via command_exists() (instead of returning True unconditionally).
  • Implement _install() to install the tar package via the POSIX package manager.
  • Enable framework-driven installation by setting can_install = True.

Comment thread lisa/tools/tar.py
Comment thread lisa/tools/tar.py
@github-actions
Copy link
Copy Markdown

✅ AI Test Selection — PASSED

1 test case(s) selected (view run)

Marketplace image: suse sles-15-sp6 gen2 latest

Count
✅ Passed 0
❌ Failed 0
⏭️ Skipped 1
Total 1
Test case details
Test Case Status Time (s) Message
verify_gpu_cuda_with_pytorch (lisa_0_0) ⏭️ SKIPPED 0.000 check skipped: OS type mismatch: ['requirements excludes Suse']

On distro images that do not ship the GNU tar binary by default
(e.g. Oracle Linux 10), the Tar tool's _check_exists() returned True
unconditionally and _install() was not implemented, so any caller
(such as Texinfo._install_from_src) hit "tar: command not found"
(exit 127) when invoking tar.extract().

This change implements proper installation:
- _check_exists() now actually probes for the tar binary via
  command_exists() instead of always returning True.
- _install() installs the "tar" package via the Posix OS package
  manager.
- can_install is set to True so the framework will trigger _install
  when the binary is missing.
@LiliDeng LiliDeng force-pushed the bugfix/tar-package-install_280426_084620 branch from eb193dd to 9e0b251 Compare April 28, 2026 02:21
@github-actions
Copy link
Copy Markdown

✅ AI Test Selection — PASSED

1 test case(s) selected (view run)

Marketplace image: suse sles-15-sp6 gen2 latest

Count
✅ Passed 0
❌ Failed 0
⏭️ Skipped 1
Total 1
Test case details
Test Case Status Time (s) Message
verify_gpu_cuda_with_pytorch (lisa_0_0) ⏭️ SKIPPED 0.000 check skipped: OS type mismatch: ['requirements excludes Suse']

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants