René's URL Explorer Experiment


Title: Skip QemuImgTest when libvirt native library cannot load by codingkiddo · Pull Request #13086 · apache/cloudstack · GitHub

Open Graph Title: Skip QemuImgTest when libvirt native library cannot load by codingkiddo · Pull Request #13086 · apache/cloudstack

X Title: Skip QemuImgTest when libvirt native library cannot load by codingkiddo · Pull Request #13086 · apache/cloudstack

Description: Description QemuImgTest#setUp() currently checks whether qemu-img and libvirt are available before running the tests. The libvirt check catches LibvirtException, but native library loading failures such as UnsatisfiedLinkError can still escape and fail the test class. On macOS without libvirt.dylib available, the test fails during setup with: java.lang.UnsatisfiedLinkError: Unable to load library 'virt' This change catches LinkageError along with LibvirtException during the libvirt availability check, allowing the existing Assume.assumeTrue("libvirt not available", libVirtAvailable) to skip the test instead of failing the test class. However, when the native libvirt/JNA library itself cannot be loaded, the setup can fail with UnsatisfiedLinkError before the test reaches the assumption check. For example, on macOS without libvirt.dylib available, the test fails during setup with: java.lang.UnsatisfiedLinkError: Unable to load library 'virt' On Apple Silicon machines, this can also happen when the native library architecture is incompatible with the running JVM. This change catches LinkageError along with LibvirtException during the libvirt availability check. Since UnsatisfiedLinkError extends LinkageError, this allows native library loading failures to be treated the same way as unavailable libvirt: the test is skipped instead of failing the entire test run. Motivation and Context QemuImgTest depends on native libvirt availability. On many developer machines, especially macOS environments, libvirt may not be installed or the required native library may not be loadable. The existing test logic already treats unavailable libvirt as a skip condition. This change makes the availability check more robust by also handling native linkage failures. This avoids failing the test class when the environment does not have the required native libvirt setup, while keeping the actual test behavior unchanged when libvirt is available. What Changed Updated the exception handling in QemuImgTest#setUp() from: } catch (LibvirtException ignored) {} to: } catch (LibvirtException | LinkageError ignored) {} How Has This Been Tested? Tested locally with: mvn -pl plugins/hypervisors/kvm -Dtest=QemuImgTest test Before this change, the test failed during setup with: java.lang.UnsatisfiedLinkError: Unable to load library 'virt' After this change, the test is skipped when the native libvirt library is not available. Types of changes Bug fix Improvement New feature Breaking change Documentation update Checklist The change is limited to test setup behavior No production code behavior is changed Existing behavior is preserved when libvirt is available The test now skips instead of failing when native libvirt libraries cannot be loaded

Open Graph Description: Description QemuImgTest#setUp() currently checks whether qemu-img and libvirt are available before running the tests. The libvirt check catches LibvirtException, but native library loading failures...

X Description: Description QemuImgTest#setUp() currently checks whether qemu-img and libvirt are available before running the tests. The libvirt check catches LibvirtException, but native library loading failures...

Opengraph URL: https://github.com/apache/cloudstack/pull/13086

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:c07b9b65-85d6-7c93-e0ba-5dfec3e3ef2f
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB204:1C8A4F:52D655:71AA54:6A511DA1
html-safe-nonce3442948da05e34e8147f357a4942c57a356810318cd6df95b195036effdc63e5
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMjA0OjFDOEE0Rjo1MkQ2NTU6NzFBQTU0OjZBNTExREExIiwidmlzaXRvcl9pZCI6IjEyMTczMDQzNDQ5MzEyODA5OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac0cd296ee5a8e714ce2196c9c704c7fc87ff32ec7c0db9b327cd29a103fe68264
hovercard-subject-tagpull_request:3602250814
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/apache/cloudstack/pull/13086/files
twitter:imagehttps://avatars.githubusercontent.com/u/57634134?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/57634134?s=400&v=4
og:image:altDescription QemuImgTest#setUp() currently checks whether qemu-img and libvirt are available before running the tests. The libvirt check catches LibvirtException, but native library loading failures...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonef0f0f3a40c5b69803a8255a8e44323880bf9c4db54d5c076f2130bedf2a1dde5
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/apache/cloudstack git https://github.com/apache/cloudstack.git
octolytics-dimension-user_id47359
octolytics-dimension-user_loginapache
octolytics-dimension-repository_id9759448
octolytics-dimension-repository_nwoapache/cloudstack
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id9759448
octolytics-dimension-repository_network_root_nwoapache/cloudstack
turbo-body-classeslogged-out env-production page-responsive
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release44909533816f7f99ff04e7a0fe692733af67ed84
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/apache/cloudstack/pull/13086/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fapache%2Fcloudstack%2Fpull%2F13086%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fapache%2Fcloudstack%2Fpull%2F13086%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=apache%2Fcloudstack
Reloadhttps://github.com/apache/cloudstack/pull/13086/files
Reloadhttps://github.com/apache/cloudstack/pull/13086/files
Reloadhttps://github.com/apache/cloudstack/pull/13086/files
Please reload this pagehttps://github.com/apache/cloudstack/pull/13086/files
apache https://github.com/apache
cloudstackhttps://github.com/apache/cloudstack
Notifications https://github.com/login?return_to=%2Fapache%2Fcloudstack
Fork 1.3k https://github.com/login?return_to=%2Fapache%2Fcloudstack
Star 3k https://github.com/login?return_to=%2Fapache%2Fcloudstack
Code https://github.com/apache/cloudstack
Issues 540 https://github.com/apache/cloudstack/issues
Pull requests 261 https://github.com/apache/cloudstack/pulls
Discussions https://github.com/apache/cloudstack/discussions
Actions https://github.com/apache/cloudstack/actions
Projects https://github.com/apache/cloudstack/projects
Wiki https://github.com/apache/cloudstack/wiki
Security and quality 0 https://github.com/apache/cloudstack/security
Insights https://github.com/apache/cloudstack/pulse
Code https://github.com/apache/cloudstack
Issues https://github.com/apache/cloudstack/issues
Pull requests https://github.com/apache/cloudstack/pulls
Discussions https://github.com/apache/cloudstack/discussions
Actions https://github.com/apache/cloudstack/actions
Projects https://github.com/apache/cloudstack/projects
Wiki https://github.com/apache/cloudstack/wiki
Security and quality https://github.com/apache/cloudstack/security
Insights https://github.com/apache/cloudstack/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fapache%2Fcloudstack%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fapache%2Fcloudstack%2Fissues%2Fnew%2Fchoose
DaanHooglandhttps://github.com/DaanHoogland
apache:mainhttps://github.com/apache/cloudstack/tree/main
codingkiddo:skip-qemu-img-test-when-libvirt-native-library-unavailablehttps://github.com/codingkiddo/cloudstack/tree/skip-qemu-img-test-when-libvirt-native-library-unavailable
Conversation 10 https://github.com/apache/cloudstack/pull/13086
Commits 6 https://github.com/apache/cloudstack/pull/13086/commits
Checks 28 https://github.com/apache/cloudstack/pull/13086/checks
Files changed https://github.com/apache/cloudstack/pull/13086/files
Please reload this pagehttps://github.com/apache/cloudstack/pull/13086/files
Skip QemuImgTest when libvirt native library cannot load https://github.com/apache/cloudstack/pull/13086/files#top
Show all changes 6 commits https://github.com/apache/cloudstack/pull/13086/files
6168ae3 Skip QemuImgTest when libvirt native library cannot load Apr 29, 2026 https://github.com/apache/cloudstack/pull/13086/commits/6168ae3ca918573c25a980dc54789668d10688e4
5f16427 Narrow native libvirt loading error handling in QemuImgTest Apr 29, 2026 https://github.com/apache/cloudstack/pull/13086/commits/5f16427c3deb49ce1f0169e4088db02c53b1c9c3
81f4e1d Merge branch 'main' into skip-qemu-img-test-when-libvirt-native-libra… codingkiddo Apr 30, 2026 https://github.com/apache/cloudstack/pull/13086/commits/81f4e1dff39527a51e52e3edcde0d1e78feee65e
d6f499c Merge branch 'main' into skip-qemu-img-test-when-libvirt-native-libra… codingkiddo May 1, 2026 https://github.com/apache/cloudstack/pull/13086/commits/d6f499cf9987c61fda1b82c88c7b16407e723e8d
47af0e6 Merge branch 'main' into skip-qemu-img-test-when-libvirt-native-libra… codingkiddo May 1, 2026 https://github.com/apache/cloudstack/pull/13086/commits/47af0e6c2d06f10bbea1c8ad9682475c55f0fe10
39ad0a4 Merge branch 'main' into skip-qemu-img-test-when-libvirt-native-libra… codingkiddo May 2, 2026 https://github.com/apache/cloudstack/pull/13086/commits/39ad0a407d42aa64d95d2a775953778e733e567f
Clear filters https://github.com/apache/cloudstack/pull/13086/files
Please reload this pagehttps://github.com/apache/cloudstack/pull/13086/files
Please reload this pagehttps://github.com/apache/cloudstack/pull/13086/files
plugins/hypervisors/kvm/src/test/java/org/apache/cloudstack/utils/qemu/QemuImgTest.javahttps://github.com/apache/cloudstack/pull/13086/files#diff-92ea0cea3cc4a3ef18bb5ae6842c5de7ec6893851fd91e49597026583ee75f75
View file https://github.com/codingkiddo/cloudstack/blob/39ad0a407d42aa64d95d2a775953778e733e567f/plugins/hypervisors/kvm/src/test/java/org/apache/cloudstack/utils/qemu/QemuImgTest.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/apache/cloudstack/pull/13086/{{ revealButtonHref }}
https://github.com/apache/cloudstack/pull/13086/files#diff-92ea0cea3cc4a3ef18bb5ae6842c5de7ec6893851fd91e49597026583ee75f75
https://github.com/apache/cloudstack/pull/13086/files#diff-92ea0cea3cc4a3ef18bb5ae6842c5de7ec6893851fd91e49597026583ee75f75
Please reload this pagehttps://github.com/apache/cloudstack/pull/13086/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.