Skip to content

Add CVT no-extension test case (verify_asr_by_cvt_no_extension)#4514

Open
mohshei-786 wants to merge 4 commits into
microsoft:mainfrom
mohshei-786:user/mohshei/cvt-no-extension
Open

Add CVT no-extension test case (verify_asr_by_cvt_no_extension)#4514
mohshei-786 wants to merge 4 commits into
microsoft:mainfrom
mohshei-786:user/mohshei/cvt-no-extension

Conversation

@mohshei-786

Copy link
Copy Markdown

Summary

Add a new LISA test case verify_asr_by_cvt_no_extension that validates the ASR disk filter driver (involflt) without relying on Azure VM extensions. This mirrors the LinuxCVT ADO pipeline approach for environments where VM extensions are not available (e.g., SAIL OS, custom kernels).

Changes

New file: scripts/cvt_no_extension.sh

  • Full CVT test orchestration script (no extensions needed)
  • Downloads driver tarball + CVT test binaries from URLs
  • Loads driver via insmod (or uses pre-loaded driver)
  • Runs all 17 CVT test cases with retry logic
  • Generates cvt_status.json with per-test-case status tracking (matches private CVT pipeline format)
  • Handles DNS fixes, device node creation, VacpIOBarrierTimeout tuning
  • Identifies source (1GB) and target (10GB) disks by blockdev size

Modified: cvt.py

  • Added verify_asr_by_cvt_no_extension test case
  • Added helper functions: _get_driver_url(), _run_cvt_no_extension()
  • Added .json file collection in _copy_cvt_logs() for status file retrieval
  • Handles ready platform gracefully (no disk add/delete when not supported)

Test Results

All 17/17 CVT tests PASSED on SAIL OS VM (SLES 15 SP4, kernel 5.14.21-150400.22-default):

  • mixed, 16k_random, 16k_seq, 1mb_random, 1mb_seq, 4k_random, 4k_seq, 4mb_random, 4mb_seq, 512k_random, 512k_seq, 64k_random, 64k_seq, 8mb_random, 8mb_seq, 9mb_random, 9mb_seq

Total execution: ~138 minutes (8 min/test × 17 tests)

cvt_status.json Format

{
    "testStatus": "Succeeded",
    "startTime": "2026-06-01T11:05:57Z",
    "lastUpdated": "2026-06-01T13:23:10Z",
    "testDetails": {
        "vmName": "sail-cvt-test",
        "os": "SLES 15-SP4",
        "kernelVersion": "5.14.21-150400.22-default",
        "driverVersion": "9.65.7900.1",
        "productVersion": "9.65.7900.1",
        "testCases": [
            {"name": "mixed", "status": "Succeeded", "time": "593"},
            ...
        ]
    }
}

ADO Work Item

AB#38231853

Tools Used

powershell, grep, glob, view, edit, create, paramiko (SSH), bluebird

Add a new LISA test case that validates the ASR disk filter driver without
relying on Azure VM extensions. This mirrors the LinuxCVT ADO pipeline approach:
- Downloads driver tarball + CVT test binaries directly via URLs
- Loads driver via insmod (or uses pre-loaded driver)
- Runs all 17 CVT test cases with retry logic
- Generates cvt_status.json with per-test-case tracking (matches private CVT format)
- Copies .json status files along with logs for reporting

New files:
- scripts/cvt_no_extension.sh: Shell script handling full CVT flow
- Modified cvt.py: Added test case, helper functions, .json log collection

Tested: All 17/17 CVT tests passed on SAIL OS VM (SLES 15 SP4 kernel 5.14.21)

AB#38231853

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 3, 2026 04:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a “no VM extensions” execution path for ASR CVT by introducing a standalone runner script, wiring it into the existing LISA CVT suite, and enhancing log collection to include JSON status output.

Changes:

  • Add cvt_no_extension.sh to download CVT binaries/driver, load the driver, run CVT, and emit a cvt_status.json.
  • Extend _copy_cvt_logs to also collect *.json artifacts.
  • Add a new LISA test case that runs CVT without extensions and add URL defaults/OS-based driver URL selection.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

File Description
lisa/microsoft/testsuites/vm_extensions/scripts/cvt_no_extension.sh New no-extension CVT runner that also writes status JSON and orchestrates driver/binary setup.
lisa/microsoft/testsuites/vm_extensions/cvt.py Adds no-extension test flow + defaults; expands log copying to include JSON artifacts.

Comment thread lisa/microsoft/testsuites/vm_extensions/scripts/cvt_no_extension.sh
Comment thread lisa/microsoft/testsuites/vm_extensions/scripts/cvt_no_extension.sh
Comment thread lisa/microsoft/testsuites/vm_extensions/scripts/cvt_no_extension.sh Outdated
Comment thread lisa/microsoft/testsuites/vm_extensions/scripts/cvt_no_extension.sh
Comment thread lisa/microsoft/testsuites/vm_extensions/cvt.py
Comment thread lisa/microsoft/testsuites/vm_extensions/cvt.py
Fix 1: JSON testCases array uses multi-line format with proper awk insertion
       logic that handles commas between entries correctly.
Fix 2: Remove --no-check-certificate from wget; use system CAs by default.
       TLS bypass available via SKIP_TLS_VERIFY=1 env var (opt-in).
Fix 3: Check mkfs/mount exit codes and fail early with diagnostic output.
Fix 4: Guard against duplicate DNS entries in resolv.conf; log resolver state.
Fix 5: Use public script.command property instead of private _command/_cwd.
Fix 6: Remove unused data_disks parameter from _run_cvt_no_extension.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 3, 2026 06:59
@mohshei-786 mohshei-786 force-pushed the user/mohshei/cvt-no-extension branch from 5bbc8ae to 6a2cdd7 Compare June 3, 2026 06:59
@mohshei-786

Copy link
Copy Markdown
Author

All 6 review comments addressed in commit 6a2cdd7:

  1. JSON insertion logictestCases array now uses multi-line format; awk insertion matches ^\s*\] and handles comma placement correctly.
  2. wget --no-check-certificate — Removed. Uses system CAs by default; opt-in bypass via SKIP_TLS_VERIFY=1 env var.
  3. mkfs/mount exit codes — Now checked; logs blkid/mount diagnostics on failure before exiting.
  4. DNS /etc/resolv.conf — Guards against duplicate entries; logs resolver state before/after.
  5. Private _command/_cwd — Replaced with public script.command property.
  6. Unused data_disks param — Removed from signature and call site.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

Comment thread lisa/microsoft/testsuites/vm_extensions/scripts/cvt_no_extension.sh
Comment thread lisa/microsoft/testsuites/vm_extensions/scripts/cvt_no_extension.sh Outdated
Comment thread lisa/microsoft/testsuites/vm_extensions/scripts/cvt_no_extension.sh
Comment thread lisa/microsoft/testsuites/vm_extensions/cvt.py
Comment thread lisa/microsoft/testsuites/vm_extensions/cvt.py
Comment thread lisa/microsoft/testsuites/vm_extensions/cvt.py
mohshei-786 and others added 2 commits June 4, 2026 15:28
flake8:
- B014: Replace redundant (NotImplementedError, Exception) with Exception
- BLK100: Fix Black formatting for multi-line variable assignment

shellcheck:
- SC2155: Separate declare and assign for all local variables with subshells
- SC2086: Quote variables to prevent word splitting
- SC2181: Use direct exit code checks (if ! cmd) instead of \True
- SC2171: Quote literal brackets in --pair[] arguments
- SC1091: Add shellcheck disable for /etc/os-release source

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Also ensures file is stored with LF line endings (was CRLF in
working copy causing SC1017 in CI).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 4, 2026 10:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 10 comments.

Comment thread lisa/microsoft/testsuites/vm_extensions/scripts/cvt_no_extension.sh
Comment thread lisa/microsoft/testsuites/vm_extensions/scripts/cvt_no_extension.sh
Comment thread lisa/microsoft/testsuites/vm_extensions/scripts/cvt_no_extension.sh
Comment thread lisa/microsoft/testsuites/vm_extensions/scripts/cvt_no_extension.sh
Comment thread lisa/microsoft/testsuites/vm_extensions/scripts/cvt_no_extension.sh
Comment thread lisa/microsoft/testsuites/vm_extensions/scripts/cvt_no_extension.sh
Comment thread lisa/microsoft/testsuites/vm_extensions/scripts/cvt_no_extension.sh
Comment thread lisa/microsoft/testsuites/vm_extensions/cvt.py
Comment thread lisa/microsoft/testsuites/vm_extensions/cvt.py
Comment thread lisa/microsoft/testsuites/vm_extensions/cvt.py
@LiliDeng

LiliDeng commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

@mohshei-786 please check the error when run against canonical 0001-com-ubuntu-server-focal 20_04-lts-gen2 latest + verify_asr_by_cvt_no_extension



+ cvt_binaries_url=https://aka.ms/LinuxCVTTestBinaries

+ driver_tarball_url=

+ FAILED_TEST=1

+ PAS'
2026-06-08 13:50:48.897[2348][INFO] lisa.case[verify_asr_by_cvt_no_extension][lisa_0_0] cvt script stderr : ''
2026-06-08 13:50:48.897[2348][INFO] lisa.case[verify_asr_by_cvt_no_extension][lisa_0_0] cvt script exit code : '1'
2026-06-08 13:50:48.897[2348][DEBUG] lisa.env[generated_0].node[0].tool[find] initializing tool [find]

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants