Skip to content

Comments

CP-311612/CP-311613: make quicktests work if local storage is SMAPIv3#6908

Open
edwintorok wants to merge 2 commits intoxapi-project:masterfrom
edwintorok:private/edvint/quicktest-smapiv3
Open

CP-311612/CP-311613: make quicktests work if local storage is SMAPIv3#6908
edwintorok wants to merge 2 commits intoxapi-project:masterfrom
edwintorok:private/edvint/quicktest-smapiv3

Conversation

@edwintorok
Copy link
Member

Want to run quicktest on wider range of hardware, and some of them have a SMAPIv3 local SR, which identified some bugs in the quicktest.

Before:

┌──────────────────────────────────────────────────────────────────────────────┐
│ [FAIL]        cbt          0   vdi_data_destroy_test on SR [Local storage].  │
└──────────────────────────────────────────────────────────────────────────────┘
Enabling CBT on original VDI
ASSERT VDI.enable_cbt failed
ASSERT VDI field cbt_enabled should be the same
ASSERT VDI field is_a_snapshot should be the same
ASSERT VDI field location should be the same
ASSERT VDI field managed should be the same
ASSERT VDI field name_description should be the same
ASSERT VDI field name_label should be the same
ASSERT VDI field snapshot_of should be the same
ASSERT VDI field snapshot_time should be the same
ASSERT VDI field virtual_size should be the same
Snapshotting original VDI with CBT enabled
ASSERT VDI.snapshot failed, cbt_enabled field didn't carry over
ASSERT VDI field cbt_enabled should be the same
ASSERT VDI field is_a_snapshot should be the same
ASSERT VDI field location should be the same
ASSERT VDI field managed should be the same
ASSERT VDI field name_description should be the same
ASSERT VDI field name_label should be the same
ASSERT VDI field snapshot_of should be the same
ASSERT VDI field snapshot_time should be the same
ASSERT VDI field virtual_size should be the same
ASSERT VDI field cbt_enabled should be the same
ASSERT VDI field is_a_snapshot should be the same
ASSERT VDI field location should be the same
ASSERT VDI field managed should be the same
ASSERT VDI field name_description should be the same
ASSERT VDI field name_label should be the same
ASSERT VDI field snapshot_of should be the same
ASSERT VDI field snapshot_time should be the same
ASSERT VDI field virtual_size should be the same
Disabling CBT on original VDI
ASSERT VDI.disable_cbt failed
ASSERT VDI field cbt_enabled should be the same
ASSERT VDI field is_a_snapshot should be the same
ASSERT VDI field location should be the same
ASSERT VDI field managed should be the same
ASSERT VDI field name_description should be the same
ASSERT VDI field name_label should be the same
ASSERT VDI field snapshot_of should be the same
ASSERT VDI field snapshot_time should be the same
ASSERT VDI field virtual_size should be the same
Snapshotting original VDI with CBT disabled
ASSERT VDI.snapshot failed, cbt_enabled field didn't carry over
ASSERT VDI field cbt_enabled should be the same
ASSERT VDI field is_a_snapshot should be the same
ASSERT VDI field location should be the same
ASSERT VDI field managed should be the same
ASSERT VDI field name_description should be the same
ASSERT VDI field name_label should be the same
ASSERT VDI field snapshot_of should be the same
ASSERT VDI field snapshot_time should be the same
ASSERT VDI field virtual_size should be the same
ASSERT VDI field cbt_enabled should be the same
ASSERT VDI field is_a_snapshot should be the same
ASSERT VDI field location should be the same
ASSERT VDI field managed should be the same
ASSERT VDI field name_description should be the same
ASSERT VDI field name_label should be the same
ASSERT VDI field snapshot_of should be the same
ASSERT VDI field snapshot_time should be the same
ASSERT VDI field virtual_size should be the same
Destroying snapshot VDI data
ASSERT VDI.data_destroy failed to update VDI.type
ASSERT VDI snapshot cbt_enabled field erroneously set to false
[exception] Not_found
            Raised at Xapi_stdext_pervasives__Pervasiveext.finally in file "ocaml/libs/xapi-stdext/lib/xapi-stdext-pervasives/pervasiveext.ml", line 39, characters 6-15
            Called from Alcotest_engine__Core.Make.protect_test.(fun) in file "src/alcotest-engine/core.ml", line 186, characters 17-23
            Called from Alcotest_engine__Monad.Identity.catch in file "src/alcotest-engine/monad.ml", line 24, characters 31-35
│ [FAIL]        Quicktest_vdi_ops_data_integrity         12   VDI delta ex...  │
└──────────────────────────────────────────────────────────────────────────────┘
$ xe vdi-export uuid=60d45001-30c6-43a6-8cef-15667f2bf094 filename=/tmp/quicktest_export_60d45001-30c6-43a6-8cef-15667f2bf094 format=vhd base=984b7036-a9c1-40e6-9d55-dee56865c34a
ASSERT CLI failed: exit code=1 output=[] log=[The server failed to handle your request, due to an internal error. The given message may give details useful for debugging the problem.
message: Failure("Cannot compute differences on non-VHD images")
]
FAIL CLI failed: exit code=1 output=[] log=[The server failed to handle your request, due to an internal error. The given message may give details useful for debugging the problem.
message: Failure("Cannot compute differences on non-VHD images")
]
Raised at Xapi_stdext_pervasives__Pervasiveext.finally in file "ocaml/libs/xapi-stdext/lib/xapi-stdext-pervasives/pervasiveext.ml", line 39, characters 6-15
Called from Alcotest_engine__Core.Make.protect_test.(fun) in file "src/alcotest-engine/core.ml", line 186, characters 17-23
Called from Alcotest_engine__Monad.Identity.catch in file "src/alcotest-engine/monad.ml", line 24, characters 31-35

After:

./quicktest.exe -default-sr -run-only cbt
qcheck random seed: 971045138
Choosing template with name: Other install media
Choosing template with name: Other install media
Testing `Quicktests'.
This run has ID `VH4PCGGU'.

  [OK]          cbt          0   vdi_data_destroy_test on SR [Local storage].
  [OK]          cbt          1   vdi_clone_copy_test on SR [Local storage].
./quicktest.exe -default-sr -run-only Quicktest_vdi_ops_data_integrity
qcheck random seed: 333465499
Choosing template with name: Other install media
Choosing template with name: Other install media
Testing `Quicktests'.
This run has ID `QVNOMOLZ'.

  [OK]          Quicktest_vdi_ops_data_integrity          0   VDI.copy: small empty VDI on SR [Local storage].
  [OK]          Quicktest_vdi_ops_data_integrity          1   VDI.copy: small random VDI on SR [Local storage].
  [OK]          Quicktest_vdi_ops_data_integrity          2   VDI.copy: small full VDI on SR [Local storage].
  [OK]          Quicktest_vdi_ops_data_integrity          3   VDI.copy: ~2GiB empty VDI on SR [Local storage].
  [OK]          Quicktest_vdi_ops_data_integrity          4   VDI.copy: ~2GiB random VDI on SR [Local storage].
  [OK]          Quicktest_vdi_ops_data_integrity          5   VDI export/import to/from raw file: small empty VDI on SR [Local storage].
  [OK]          Quicktest_vdi_ops_data_integrity          6   VDI export/import to/from raw file: small random VDI on SR [Local storage].
  [OK]          Quicktest_vdi_ops_data_integrity          7   VDI export/import to/from raw file: small full VDI on SR [Local storage].
  [OK]          Quicktest_vdi_ops_data_integrity          8   VDI export/import to/from VHD file: small empty VDI on SR [Local storage].
  [OK]          Quicktest_vdi_ops_data_integrity          9   VDI export/import to/from VHD file: small random VDI on SR [Local storage].
  [OK]          Quicktest_vdi_ops_data_integrity         10   VDI export/import to/from VHD file: small full VDI on SR [Local storage].
  [OK]          Quicktest_vdi_ops_data_integrity         11   VDI export/import to/from TAR file: small empty VDI on SR [Local storage].
  [OK]          Quicktest_vdi_ops_data_integrity         12   VDI export/import to/from TAR file: small random VDI on SR [Local storage].
  [OK]          Quicktest_vdi_ops_data_integrity         13   VDI export/import to/from TAR file: small full VDI on SR [Local storage].
  [OK]          Quicktest_vdi_ops_data_integrity         14   VDI export/import to/from QCOW file: small empty VDI on SR [Local storage].
  [OK]          Quicktest_vdi_ops_data_integrity         15   VDI export/import to/from QCOW file: small random VDI on SR [Local storage].
  [OK]          Quicktest_vdi_ops_data_integrity         16   VDI export/import to/from QCOW file: small full VDI on SR [Local storage].
  [OK]          Quicktest_vdi_ops_data_integrity         17   VDI delta export/import to/from QCOW file: delta between empty & empty VDI on SR [Local storage].
  [OK]          Quicktest_vdi_ops_data_integrity         18   VDI delta export/import to/from QCOW file: delta between random & empty VDI on SR [Local storage].
  [OK]          Quicktest_vdi_ops_data_integrity         19   VDI delta export/import to/from QCOW file: delta between random & random VDI on SR [Local storage].
  [OK]          Quicktest_vdi_ops_data_integrity         20   VDI delta export/import to/from QCOW file: delta between full and empty VDI on SR [Local storage].
  [OK]          Quicktest_vdi_ops_data_integrity         21   VDI delta export/import to/from QCOW file: delta between full and random VDI on SR [Local storage].
  [OK]          Quicktest_vdi_ops_data_integrity         22   VDI delta export/import to/from QCOW file: delta between full and full VDI on SR [Local storage].

Full test results in `~/_build/_tests/Quicktests'.
Test Successful in 226.332s. 23 tests run.

This seems to be a SMAPIv1 specific implementation detail (content_id in
VDI.other-config), that is missing on SMAPIv3 SRs.

The rest of the test works on SMAPIv3, so skip just this step.

Signed-off-by: Edwin Török <edwin.torok@citrix.com>
VHD export takes various shortcuts, and delta export only works if the source is also VHD.
Otherwise it fails with:
`Failure("Cannot compute differences on non-VHD images")`

If the source is already qcow2, like for SMAPIv3, then this is not (yet)
expected to work, so skip those tests on SMAPIv3 for now.

Note that regular export works, it is just the delta export that fails (specifying `base=`
in `xe vdi-export`).

Signed-off-by: Edwin Török <edwin.torok@citrix.com>
@edwintorok edwintorok force-pushed the private/edvint/quicktest-smapiv3 branch from 4307165 to 8ac4476 Compare February 12, 2026 14:29
Qt_filter.SR.(all |> allowed_operations [`vdi_create; `vdi_destroy] |> not_iso)

let supported_srs test_case =
let supported_srs ?(f = Fun.id) test_case =
Copy link
Contributor

Choose a reason for hiding this comment

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

Is f the best name? Is this some filter or selector?

@psafont
Copy link
Member

psafont commented Feb 19, 2026

Can this be backported to 26.1?

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