CINXE.COM

Testing - QEMU

<!DOCTYPE html> <html class="client-nojs" lang="en" dir="ltr"> <head> <meta charset="UTF-8"/> <title>Testing - QEMU</title> <script>document.documentElement.className="client-js";RLCONF={"wgBreakFrames":true,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgRequestId":"3bd8320c4a305f962406b51c","wgCSPNonce":false,"wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"Testing","wgTitle":"Testing","wgCurRevisionId":12042,"wgRevisionId":12042,"wgArticleId":375,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":[],"wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgRelevantPageName":"Testing","wgRelevantArticleId":375,"wgIsProbablyEditable":false,"wgRelevantPageIsProbablyEditable":false,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgVector2022PreviewPages":[]};RLSTATE={"skins.vector.user.styles":"ready","site.styles":"ready", "user.styles":"ready","skins.vector.user":"ready","user":"ready","user.options":"loading","mediawiki.special":"ready","mediawiki.ui.button":"ready","skins.vector.styles":"ready","skins.vector.icons":"ready","mediawiki.ui.icon":"ready","jquery.tablesorter.styles":"ready"};RLPAGEMODULES=["site","mediawiki.page.ready","jquery.tablesorter","mediawiki.toc","skins.vector.js","skins.vector.es6"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.implement("user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"});});});</script> <link rel="stylesheet" href="/load.php?lang=en&amp;modules=jquery.tablesorter.styles%7Cmediawiki.special%7Cmediawiki.ui.button%2Cicon%7Cskins.vector.icons%2Cstyles&amp;only=styles&amp;skin=vector-2022"/> <script async="" src="/load.php?lang=en&amp;modules=startup&amp;only=scripts&amp;raw=1&amp;skin=vector-2022"></script> <meta name="generator" content="MediaWiki 1.39.7"/> <meta name="format-detection" content="telephone=no"/> <meta name="viewport" content="width=1000"/> <link rel="icon" href="/favicon.ico"/> <link rel="search" type="application/opensearchdescription+xml" href="/opensearch_desc.php" title="QEMU (en)"/> <link rel="EditURI" type="application/rsd+xml" href="https://wiki.qemu.org/api.php?action=rsd"/> <link rel="license" href="http://www.gnu.org/licenses/old-licenses/fdl-1.2.txt"/> <link rel="alternate" type="application/atom+xml" title="QEMU Atom feed" href="/index.php?title=Special:RecentChanges&amp;feed=atom"/> </head> <body class="skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Testing rootpage-Testing skin-vector-2022 action-view vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-language-alert-in-sidebar-disabled vector-feature-sticky-header-disabled vector-feature-sticky-header-edit-disabled vector-feature-table-of-contents-disabled vector-feature-visual-enhancement-next-disabled"><div class="mw-page-container"> <span id="top-page"></span> <a class="mw-jump-link" href="#content">Jump to content</a> <div class="mw-page-container-inner"> <input type="checkbox" id="mw-sidebar-checkbox" class="mw-checkbox-hack-checkbox" > <header class="mw-header"> <div class="mw-header-aside"> <label id="mw-sidebar-button" class="mw-checkbox-hack-button mw-ui-icon mw-ui-button mw-ui-quiet mw-ui-icon-element" for="mw-sidebar-checkbox" role="button" aria-controls="mw-panel" data-event-name="ui.sidebar" tabindex="0" title="Main menu"> <span>Toggle sidebar</span> </label> <a href="/Main_Page" class="mw-logo"> <span class="mw-logo-container"> <img class="mw-logo-wordmark" alt="QEMU" src="/images/Qemu-logo-small.png" style="width: 9.375em; height: 3em;"> </span> </a> </div> <div class="mw-header-content"> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box-collapses vector-search-box-show-thumbnail vector-search-box-auto-expand-width vector-search-box"> <a href="/Special:Search" title="Search QEMU [f]" accesskey="f" class="mw-ui-button mw-ui-quiet mw-ui-icon mw-ui-icon-element mw-ui-icon-wikimedia-search search-toggle"> <span>Search</span> </a> <div> <form action="/index.php" id="searchform" class="vector-search-box-form"> <div id="simpleSearch" class="vector-search-box-inner" data-search-loc="header-moved"> <input class="vector-search-box-input" type="search" name="search" placeholder="Search QEMU" aria-label="Search QEMU" autocapitalize="sentences" title="Search QEMU [f]" accesskey="f" id="searchInput" > <input type="hidden" name="title" value="Special:Search"> <input id="mw-searchButton" class="searchButton mw-fallbackSearchButton" type="submit" name="fulltext" title="Search the pages for this text" value="Search"> <input id="searchButton" class="searchButton" type="submit" name="go" title="Go to a page with this exact name if it exists" value="Go"> </div> </form> </div> </div> <nav class="vector-user-links" aria-label="Personal tools" role="navigation" > <div id="p-vector-user-menu-overflow" class="vector-menu mw-portlet mw-portlet-vector-user-menu-overflow emptyPortlet vector-user-menu-overflow" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"></ul> </div> </div> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal vector-user-menu vector-user-menu-logged-out vector-menu-dropdown" title="More options" > <input type="checkbox" id="p-personal-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-personal" class="vector-menu-checkbox" /> <label id="p-personal-label" for="p-personal-checkbox" class="vector-menu-heading mw-ui-button mw-ui-quiet mw-ui-icon mw-ui-icon-element mw-ui-icon-ellipsis mw-ui-icon-wikimedia-ellipsis" > <span class="vector-menu-heading-label">Personal tools</span> </label> <div class="vector-menu-content"> <div class="vector-user-menu-create-account"><a href="/index.php?title=Special:CreateAccount&amp;returnto=Testing" class="vector-menu-content-item user-links-collapsible-item" title="You are encouraged to create an account and log in; however, it is not mandatory"><span class="mw-ui-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>Create account</span></a></div> <div class="vector-user-menu-login"><a href="/index.php?title=Special:UserLogin&amp;returnto=Testing" class="vector-menu-content-item vector-menu-content-item-login" title="You are encouraged to log in; however, it is not mandatory [o]" accesskey="o"><span class="mw-ui-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>Log in</span></a></div> <ul class="vector-menu-content-list"></ul> </div> </div> </nav> </div> </header> <div class="vector-sidebar-container "> <div id="mw-navigation"> <nav id="mw-panel" class="mw-sidebar" aria-label="Site" role="navigation"> <div id="p-Link_to_website" class="vector-menu mw-portlet mw-portlet-Link_to_website vector-menu-portal portal" > <div id="p-Link_to_website-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">Link to website</span> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"><li id="n-About-QEMU" class="mw-list-item"><a href="/QEMU:About"><span>About QEMU</span></a></li></ul> </div> </div> <div id="p-Get" class="vector-menu mw-portlet mw-portlet-Get vector-menu-portal portal" > <div id="p-Get-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">Get</span> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"><li id="n-Download" class="mw-list-item"><a href="/Download"><span>Download</span></a></li><li id="n-License" class="mw-list-item"><a href="/License"><span>License</span></a></li></ul> </div> </div> <div id="p-Contribute" class="vector-menu mw-portlet mw-portlet-Contribute vector-menu-portal portal" > <div id="p-Contribute-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">Contribute</span> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"><li id="n-Start-Here" class="mw-list-item"><a href="/Contribute"><span>Start Here</span></a></li><li id="n-Report-a-Bug" class="mw-list-item"><a href="/Contribute/ReportABug"><span>Report a Bug</span></a></li><li id="n-Report-a-security-issue" class="mw-list-item"><a href="/SecurityProcess"><span>Report a security issue</span></a></li><li id="n-Submit-a-Patch" class="mw-list-item"><a href="/Contribute/SubmitAPatch"><span>Submit a Patch</span></a></li><li id="n-Mailing-Lists" class="mw-list-item"><a href="/Contribute/MailingLists"><span>Mailing Lists</span></a></li><li id="n-Testing-QEMU" class="mw-list-item"><a href="/Testing"><span>Testing QEMU</span></a></li></ul> </div> </div> <div id="p-Learn" class="vector-menu mw-portlet mw-portlet-Learn vector-menu-portal portal" > <div id="p-Learn-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">Learn</span> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"><li id="n-Documentation" class="mw-list-item"><a href="/Documentation"><span>Documentation</span></a></li><li id="n-Links" class="mw-list-item"><a href="/Links"><span>Links</span></a></li></ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb vector-menu-portal portal" > <div id="p-tb-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">Tools</span> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"><li id="t-whatlinkshere" class="mw-list-item"><a href="/Special:WhatLinksHere/Testing" title="A list of all wiki pages that link here [j]" accesskey="j"><span>What links here</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/Special:RecentChangesLinked/Testing" rel="nofollow" title="Recent changes in pages linked from this page [k]" accesskey="k"><span>Related changes</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/Special:SpecialPages" title="A list of all special pages [q]" accesskey="q"><span>Special pages</span></a></li><li id="t-print" class="mw-list-item"><a href="javascript:print();" rel="alternate" title="Printable version of this page [p]" accesskey="p"><span>Printable version</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/index.php?title=Testing&amp;oldid=12042" title="Permanent link to this revision of this page"><span>Permanent link</span></a></li><li id="t-info" class="mw-list-item"><a href="/index.php?title=Testing&amp;action=info" title="More information about this page"><span>Page information</span></a></li></ul> </div> </div> </nav> </div> </div> <div class="vector-sitenotice-container"> <div id="siteNotice"></div> </div> <input type="checkbox" id="vector-toc-collapsed-checkbox" class="mw-checkbox-hack-checkbox"> <div class="mw-table-of-contents-container"> <div class="vector-sticky-toc-container mw-sticky-header-element"> <nav id="mw-panel-toc" class="sidebar-toc" role="navigation" aria-labelledby="sidebar-toc-label" data-event-name="ui.sidebar-toc"> <div id="sidebar-toc-label" class="sidebar-toc-header"> <p class="sidebar-toc-title"> Contents <button class="vector-toc-uncollapse-button">move to sidebar</button> <button class="vector-toc-collapse-button">hide</button> </p> </div> <ul class="sidebar-toc-contents" id="mw-panel-toc-list"> <li id="toc-mw-content-text" class="sidebar-toc-list-item sidebar-toc-level-1"> <a href="#top-page" class="sidebar-toc-link"> <div class="sidebar-toc-text">Beginning</div> </a> </li> <li id="toc-Continuous_Integration" class="sidebar-toc-list-item sidebar-toc-level-1"> <a class="sidebar-toc-link" href="#Continuous_Integration"> <div class="sidebar-toc-text"> <span class="sidebar-toc-numb">1</span>Continuous Integration</div> </a> <ul id="toc-Continuous_Integration-sublist" class="sidebar-toc-list"> </ul> </li> <li id="toc-Tests_included_in_the_QEMU_source" class="sidebar-toc-list-item sidebar-toc-level-1"> <a class="sidebar-toc-link" href="#Tests_included_in_the_QEMU_source"> <div class="sidebar-toc-text"> <span class="sidebar-toc-numb">2</span>Tests included in the QEMU source</div> </a> <button aria-controls="toc-Tests_included_in_the_QEMU_source-sublist" class="mw-ui-icon mw-ui-icon-wikimedia-expand mw-ui-icon-small sidebar-toc-toggle"> Toggle Tests included in the QEMU source subsection </button> <ul id="toc-Tests_included_in_the_QEMU_source-sublist" class="sidebar-toc-list"> <li id="toc-make_check" class="sidebar-toc-list-item sidebar-toc-level-2"> <a class="sidebar-toc-link" href="#make_check"> <div class="sidebar-toc-text"> <span class="sidebar-toc-numb">2.1</span>make check</div> </a> <ul id="toc-make_check-sublist" class="sidebar-toc-list"> </ul> </li> <li id="toc-make_check-tcg" class="sidebar-toc-list-item sidebar-toc-level-2"> <a class="sidebar-toc-link" href="#make_check-tcg"> <div class="sidebar-toc-text"> <span class="sidebar-toc-numb">2.2</span>make check-tcg</div> </a> <ul id="toc-make_check-tcg-sublist" class="sidebar-toc-list"> </ul> </li> <li id="toc-qemu-iotests" class="sidebar-toc-list-item sidebar-toc-level-2"> <a class="sidebar-toc-link" href="#qemu-iotests"> <div class="sidebar-toc-text"> <span class="sidebar-toc-numb">2.3</span>qemu-iotests</div> </a> <ul id="toc-qemu-iotests-sublist" class="sidebar-toc-list"> </ul> </li> <li id="toc-make_docker" class="sidebar-toc-list-item sidebar-toc-level-2"> <a class="sidebar-toc-link" href="#make_docker"> <div class="sidebar-toc-text"> <span class="sidebar-toc-numb">2.4</span>make docker</div> </a> <ul id="toc-make_docker-sublist" class="sidebar-toc-list"> </ul> </li> <li id="toc-device-crash-test_script" class="sidebar-toc-list-item sidebar-toc-level-2"> <a class="sidebar-toc-link" href="#device-crash-test_script"> <div class="sidebar-toc-text"> <span class="sidebar-toc-numb">2.5</span>device-crash-test script</div> </a> <ul id="toc-device-crash-test_script-sublist" class="sidebar-toc-list"> </ul> </li> <li id="toc-make_check-functional" class="sidebar-toc-list-item sidebar-toc-level-2"> <a class="sidebar-toc-link" href="#make_check-functional"> <div class="sidebar-toc-text"> <span class="sidebar-toc-numb">2.6</span>make check-functional</div> </a> <ul id="toc-make_check-functional-sublist" class="sidebar-toc-list"> </ul> </li> </ul> </li> <li id="toc-System_emulation" class="sidebar-toc-list-item sidebar-toc-level-1"> <a class="sidebar-toc-link" href="#System_emulation"> <div class="sidebar-toc-text"> <span class="sidebar-toc-numb">3</span>System emulation</div> </a> <ul id="toc-System_emulation-sublist" class="sidebar-toc-list"> </ul> </li> <li id="toc-User_mode_emulation" class="sidebar-toc-list-item sidebar-toc-level-1"> <a class="sidebar-toc-link" href="#User_mode_emulation"> <div class="sidebar-toc-text"> <span class="sidebar-toc-numb">4</span>User mode emulation</div> </a> <ul id="toc-User_mode_emulation-sublist" class="sidebar-toc-list"> </ul> </li> <li id="toc-Dynamic_code_analysis" class="sidebar-toc-list-item sidebar-toc-level-1"> <a class="sidebar-toc-link" href="#Dynamic_code_analysis"> <div class="sidebar-toc-text"> <span class="sidebar-toc-numb">5</span>Dynamic code analysis</div> </a> <button aria-controls="toc-Dynamic_code_analysis-sublist" class="mw-ui-icon mw-ui-icon-wikimedia-expand mw-ui-icon-small sidebar-toc-toggle"> Toggle Dynamic code analysis subsection </button> <ul id="toc-Dynamic_code_analysis-sublist" class="sidebar-toc-list"> <li id="toc-Valgrind" class="sidebar-toc-list-item sidebar-toc-level-2"> <a class="sidebar-toc-link" href="#Valgrind"> <div class="sidebar-toc-text"> <span class="sidebar-toc-numb">5.1</span>Valgrind</div> </a> <ul id="toc-Valgrind-sublist" class="sidebar-toc-list"> </ul> </li> <li id="toc-clang_UBSan" class="sidebar-toc-list-item sidebar-toc-level-2"> <a class="sidebar-toc-link" href="#clang_UBSan"> <div class="sidebar-toc-text"> <span class="sidebar-toc-numb">5.2</span>clang UBSan</div> </a> <ul id="toc-clang_UBSan-sublist" class="sidebar-toc-list"> </ul> </li> </ul> </li> <li id="toc-Static_code_analysis" class="sidebar-toc-list-item sidebar-toc-level-1"> <a class="sidebar-toc-link" href="#Static_code_analysis"> <div class="sidebar-toc-text"> <span class="sidebar-toc-numb">6</span>Static code analysis</div> </a> <button aria-controls="toc-Static_code_analysis-sublist" class="mw-ui-icon mw-ui-icon-wikimedia-expand mw-ui-icon-small sidebar-toc-toggle"> Toggle Static code analysis subsection </button> <ul id="toc-Static_code_analysis-sublist" class="sidebar-toc-list"> <li id="toc-ccc-analyzer_(clang)" class="sidebar-toc-list-item sidebar-toc-level-2"> <a class="sidebar-toc-link" href="#ccc-analyzer_(clang)"> <div class="sidebar-toc-text"> <span class="sidebar-toc-numb">6.1</span>ccc-analyzer (clang)</div> </a> <ul id="toc-ccc-analyzer_(clang)-sublist" class="sidebar-toc-list"> </ul> </li> <li id="toc-smatch" class="sidebar-toc-list-item sidebar-toc-level-2"> <a class="sidebar-toc-link" href="#smatch"> <div class="sidebar-toc-text"> <span class="sidebar-toc-numb">6.2</span>smatch</div> </a> <ul id="toc-smatch-sublist" class="sidebar-toc-list"> </ul> </li> <li id="toc-Coverity" class="sidebar-toc-list-item sidebar-toc-level-2"> <a class="sidebar-toc-link" href="#Coverity"> <div class="sidebar-toc-text"> <span class="sidebar-toc-numb">6.3</span>Coverity</div> </a> <ul id="toc-Coverity-sublist" class="sidebar-toc-list"> </ul> </li> </ul> </li> <li id="toc-Avocado_and_Avocado-VT" class="sidebar-toc-list-item sidebar-toc-level-1"> <a class="sidebar-toc-link" href="#Avocado_and_Avocado-VT"> <div class="sidebar-toc-text"> <span class="sidebar-toc-numb">7</span>Avocado and Avocado-VT</div> </a> <ul id="toc-Avocado_and_Avocado-VT-sublist" class="sidebar-toc-list"> </ul> </li> <li id="toc-Testing_related_meetings" class="sidebar-toc-list-item sidebar-toc-level-1"> <a class="sidebar-toc-link" href="#Testing_related_meetings"> <div class="sidebar-toc-text"> <span class="sidebar-toc-numb">8</span>Testing related meetings</div> </a> <ul id="toc-Testing_related_meetings-sublist" class="sidebar-toc-list"> </ul> </li> <li id="toc-See_Also" class="sidebar-toc-list-item sidebar-toc-level-1"> <a class="sidebar-toc-link" href="#See_Also"> <div class="sidebar-toc-text"> <span class="sidebar-toc-numb">9</span>See Also</div> </a> <ul id="toc-See_Also-sublist" class="sidebar-toc-list"> </ul> </li> </ul> </nav> </div> </div> <div class="mw-content-container"> <main id="content" class="mw-body" role="main"> <a id="top"></a> <header class="mw-body-header"> <label id="vector-toc-collapsed-button" class="mw-ui-button mw-ui-quiet mw-ui-icon mw-ui-icon-element mw-ui-icon-wikimedia-listBullet mw-checkbox-hack-button" for="vector-toc-collapsed-checkbox" role="button" aria-controls="toc-toggle-list" data-event-name="vector.toc-toggle-list" tabindex="0" title="Table of Contents"> Toggle the table of contents </label> <h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-main">Testing</span></h1> </header> <nav class="vector-article-toolbar" aria-label="Tools" role="navigation"> <div class="mw-article-toolbar-container"> <div id="left-navigation"> <div id="p-associated-pages" class="vector-menu mw-portlet mw-portlet-associated-pages vector-menu-tabs" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"><li id="ca-nstab-main" class="selected mw-list-item"><a href="/Testing" title="View the content page [c]" accesskey="c"><span>Page</span></a></li><li id="ca-talk" class="mw-list-item"><a href="/Talk:Testing" rel="discussion" title="Discussion about the content page [t]" accesskey="t"><span>Discussion</span></a></li></ul> </div> </div> <div id="p-variants" class="vector-menu mw-portlet mw-portlet-variants emptyPortlet vector-menu-dropdown" > <input type="checkbox" id="p-variants-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-variants" class="vector-menu-checkbox" aria-label="Change language variant" /> <label id="p-variants-label" for="p-variants-checkbox" class="vector-menu-heading " > <span class="vector-menu-heading-label">English</span> </label> <div class="vector-menu-content"> <ul class="vector-menu-content-list"></ul> </div> </div> </div> <div id="right-navigation" class="vector-collapsible "> <div id="p-views" class="vector-menu mw-portlet mw-portlet-views vector-menu-tabs" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"><li id="ca-view" class="selected mw-list-item"><a href="/Testing"><span>Read</span></a></li><li id="ca-viewsource" class="mw-list-item"><a href="/index.php?title=Testing&amp;action=edit" title="This page is protected.&#10;You can view its source [e]" accesskey="e"><span>View source</span></a></li><li id="ca-history" class="mw-list-item"><a href="/index.php?title=Testing&amp;action=history" title="Past revisions of this page [h]" accesskey="h"><span>View history</span></a></li></ul> </div> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-menu-dropdown vector-has-collapsible-items" title="More options" > <input type="checkbox" id="p-cactions-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-cactions" class="vector-menu-checkbox" /> <label id="p-cactions-label" for="p-cactions-checkbox" class="vector-menu-heading " > <span class="vector-menu-heading-label">More</span> </label> <div class="vector-menu-content"> <ul class="vector-menu-content-list"><li id="ca-more-view" class="selected vector-more-collapsible-item mw-list-item"><a href="/Testing"><span>Read</span></a></li><li id="ca-more-viewsource" class="vector-more-collapsible-item mw-list-item"><a href="/index.php?title=Testing&amp;action=edit"><span>View source</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/index.php?title=Testing&amp;action=history"><span>View history</span></a></li></ul> </div> </div> </div> </div> </nav> <div id="bodyContent" class="vector-body" data-mw-ve-target-container> <div class="mw-body-subheader"> <div class="mw-indicators"> </div> <div id="siteSub" class="noprint">From QEMU</div> </div> <div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-parser-output"><mw:tocplace></mw:tocplace> <h2><span class="mw-headline" id="Continuous_Integration"><a href="/Testing/CI" title="Testing/CI">Continuous Integration</a></span></h2> <p>Continuous Integration for the project is a distributed affair spread across a number of public CI services. However our primary CI loop is run on GitLab with other services filling in gaps in it's coverage. </p><p>There is a strong preference for tests to be directly runable with our existing make infrastructure. The public services to run tests all offer free tier accounts for FLOSS developers so people can run their own tests with the same CI setup although generally these need public repositories. </p> <table class="wikitable sortable" border="1"> <tbody><tr> <th>System </th> <th>Focus </th> <th>Status </th></tr> <tr valign="top"> <td><a href="/Testing/CI/GitLabCI" title="Testing/CI/GitLabCI">GitLab CI</a> </td> <td>Majority of CI testing (builds x86 &amp; cross), various check targets </td> <td><a rel="nofollow" class="external free" href="https://gitlab.com/qemu-project/qemu/badges/master/pipeline.svg">https://gitlab.com/qemu-project/qemu/badges/master/pipeline.svg</a> <a rel="nofollow" class="external autonumber" href="https://gitlab.com/qemu-project/qemu/pipelines/charts">[1]</a> </td></tr> <tr> <td><a href="/Testing/CI/CirrusCI" title="Testing/CI/CirrusCI">Cirrus CI</a> </td> <td>FreeBSD, MacOS and Windows MSYS2 compile and test </td> <td><a rel="nofollow" class="external free" href="https://api.cirrus-ci.com/github/qemu/qemu.svg">https://api.cirrus-ci.com/github/qemu/qemu.svg</a> <a rel="nofollow" class="external autonumber" href="https://cirrus-ci.com/github/qemu/qemu">[2]</a> </td></tr> <tr> <td><a href="/Testing/CI/Travis" title="Testing/CI/Travis">Travis</a> </td> <td>non-x86 hosts, mostly deprecated </td> <td><img src="https://api.travis-ci.org/qemu/qemu.png?branch=master&amp;file=qemu.png" alt="qemu.png?branch=master&amp;file=qemu.png" /> <a rel="nofollow" class="external autonumber" href="https://travis-ci.org/qemu/qemu">[3]</a> </td></tr> <tr> <td><a href="/Testing#Coverity" title="Testing">Coverity</a> </td> <td>Static analysis </td> <td><a rel="nofollow" class="external free" href="https://scan.coverity.com/projects/378/badge.svg?flat=1&amp;foo=qemu.svg">https://scan.coverity.com/projects/378/badge.svg?flat=1&amp;foo=qemu.svg</a> <a rel="nofollow" class="external autonumber" href="https://scan.coverity.com/projects/qemu?tab=overview">[4]</a> </td></tr> <tr> <td><a href="/Testing/CI/Patchew" title="Testing/CI/Patchew">Patchew</a> </td> <td>Apply and test patches as they are sent on the mailing list. </td> <td><a rel="nofollow" class="external free" href="https://patchew.org/QEMU/badge.svg">https://patchew.org/QEMU/badge.svg</a> <a rel="nofollow" class="external autonumber" href="http://patchew.org/QEMU/info">[5]</a> </td></tr> <tr> <td><a href="/Documentation" title="Documentation">Documentation</a> </td> <td>Build the RST portions of the doc/ subtree </td> <td><a rel="nofollow" class="external free" href="https://readthedocs.org/projects/qemu/badge/?version=latest&amp;foo=qemu.svg">https://readthedocs.org/projects/qemu/badge/?version=latest&amp;foo=qemu.svg</a> <a rel="nofollow" class="external autonumber" href="https://readthedocs.org/projects/qemu/builds/">[6]</a> </td></tr></tbody></table> <h2><span class="mw-headline" id="Tests_included_in_the_QEMU_source">Tests included in the QEMU source</span></h2> <p>QEMU includes a test suite comprising: </p> <ul><li>unit tests for library code</li> <li><a href="/Features/QTest" title="Features/QTest">QTest</a>-based tests, which inject predefined stimuli into the device emulation code.</li> <li><a href="/Testing/QemuIoTests" title="Testing/QemuIoTests">qemu-iotests</a>, a regression test suite for the block layer code.</li></ul> <p>Run <b>make check-help</b> for a full breakdown of the various sub-checks that can be run. We also have a <a rel="nofollow" class="external text" href="https://gitlab.com/qemu-project/qemu/-/blob/master/docs/devel/testing.rst">documentation in the source tree</a>. </p> <h3><span class="mw-headline" id="make_check"><tt>make check</tt></span></h3> <p>The unit tests and QTest-based can be run with "<tt>make check</tt>". Use "<tt>make check-help</tt>" to see a list of other available test targets and parameters (for example, you can use "<tt>make check SPEED=slow V=1</tt>" for a verbose, more thorough test run). These unit tests are used in <a href="#Continuous_Integration">our continuous integration</a> systems, based on <a href="/Testing/Travis" class="mw-redirect" title="Testing/Travis">Travis</a> and <a href="/Testing/CI/Patchew" title="Testing/CI/Patchew">Patchew</a>. </p><p>Currently <b>make check</b> includes the following: </p> <ul><li>check-qapi-schema</li> <li>check-unit</li> <li>check-qtest</li> <li>check-decodetree</li> <li>check-block</li></ul> <h3><span class="mw-headline" id="make_check-tcg"><tt>make check-tcg</tt></span></h3> <p>This will attempt to build tests to be run under QEMU for all the enabled guest architectures. You can either supply cross compilers to configure or will attempt to fall-back to precanned docker images with them. </p> <h3><span class="mw-headline" id="qemu-iotests">qemu-iotests</span></h3> <blockquote><p><i>Main article: <a href="/Testing/QemuIoTests" title="Testing/QemuIoTests">Testing/QemuIoTests</a></i></p></blockquote> <p>A subset of the qemu-iotests is run from the toplevel build directory with <tt>make check-block</tt>. A full version of the testsuite, taking around half an hour to run, is run with <tt>make check-block SPEED=thorough</tt>. For full control over the iotests, <tt>cd tests/qemu-iotests/</tt> and run <tt>./check --help</tt> for further information. </p> <h3><span class="mw-headline" id="make_docker"><tt>make docker</tt></span></h3> <p>The build system supports a number of Docker build targets which allow the source tree to be built and tested on a number of different Linux distributions regardless of your host. See <a href="/Testing/DockerBuild" title="Testing/DockerBuild">Testing/DockerBuild</a> for more information. </p> <h3><span class="mw-headline" id="device-crash-test_script">device-crash-test script</span></h3> <p>The <tt>scripts/device-crash-test</tt> script can be used to run QEMU with multiple <tt>-machine</tt> and <tt>-device</tt> combinations, to look for obvious crashes machine or device code. </p> <h3><span class="mw-headline" id="make_check-functional"><tt>make check-functional</tt></span></h3> <p>This make target runs the tests under <tt>tests/functional</tt>, which are higher level functional tests. </p><p>These tests are written in Python, see <a rel="nofollow" class="external autonumber" href="https://www.qemu.org/docs/master/devel/testing/functional.html">[7]</a> for details. </p> <h2><span class="mw-headline" id="System_emulation">System emulation</span></h2> <p>Various machines are tested in the functional framework, have a look at the <a href="/Testing/Machines" title="Testing/Machines">Testing/Machines</a> page and the test sources to see which files are downloaded/used. </p><p>We also have <a href="/Testing/System_Images" title="Testing/System Images">a collection of links to disk images</a> which can be used to test system emulation. </p> <h2><span class="mw-headline" id="User_mode_emulation">User mode emulation</span></h2> <p>Here are some links to executables that can be used to test Linux user mode emulation: </p> <ul><li><a rel="nofollow" class="external text" href="https://kos.to/linux-user-busyboxes-0.1.tar.xz">linux-user-busyboxes-0.1.tar.xz</a> - Collection of static busybox binaries for almost all Linux target architectures that QEMU simulates. For quick smoke testing of Linux user mode emulation.</li></ul> <p>It is also possible to <a href="/Testing/LTP" title="Testing/LTP">run the Linux Test Project's syscall test suite under the Linux user mode emulation</a>. </p> <h2><span class="mw-headline" id="Dynamic_code_analysis">Dynamic code analysis</span></h2> <p>This includes any test to detect memory leaks, reads of uninitialised memory, buffer overflows or other forms of illegal memory access, that needs QEMU to be run, not merely compiled. </p> <h3><span class="mw-headline" id="Valgrind">Valgrind</span></h3> <p>Typically these kind of tests are done using <a href="/Documentation/Debugging_with_Valgrind" title="Documentation/Debugging with Valgrind">Valgrind</a> on a Linux host. Any of the disk images and executables listed above can be used in such tests. </p> <pre># Simple i386 boot test (BIOS only) with Valgrind. valgrind --leak-check=full --track-origins=yes --verbose qemu-system-i386 </pre> <h3><span class="mw-headline" id="clang_UBSan">clang UBSan</span></h3> <p>The [<a rel="nofollow" class="external text" href="https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html">clang undefined behavior sanitizer</a>] can be used to warn about accidental uses of C undefined behavior when QEMU is run. To use it you first need to configure and build QEMU with a clang compiler with the right options: </p> <pre>mkdir build/clang (cd build/clang &amp;&amp; ../../configure --cc=clang --cxx=clang++ \ '--extra-cflags=-fsanitize=undefined -fno-sanitize=shift-base') make -C build/clang -j8 </pre> <p>(The -fno-sanitize=shift-base is a workaround for [<a rel="nofollow" class="external text" href="https://bugs.llvm.org/show_bug.cgi?id=25552">LLVM bug 25552</a>] where it did not correctly suppress some shift-related warnings when -fwrapv was in use. If you're using a clang where that bug is fixed, likely 3.9 or better, you can drop it.) </p><p>Then when you run the resulting QEMU binaries messages will be printed when UB is invoked: </p> <pre>hw/core/loader.c:67:15: runtime error: null pointer passed as argument 1, which is declared to never be null </pre> <p>See the clang documentation for more information including how to produce stack backtraces on errors. </p> <h2><span class="mw-headline" id="Static_code_analysis">Static code analysis</span></h2> <p>There are a number of tools which analyse C code and try to detect typical errors. None of these tools is perfect, so using different tools with QEMU will detect more bugs. Be prepared to also get lots of false warnings! </p> <h3><span id="ccc-analyzer_.28clang.29"></span><span class="mw-headline" id="ccc-analyzer_(clang)">ccc-analyzer (clang)</span></h3> <p>This is an example used on Debian. It needs package clang. </p> <pre># Start from the root directory with QEMU code. mkdir -f bin/debug/ccc-analyzer cd bin/debug/ccc-analyzer ../../../configure --enable-debug --enable-trace-backend=stderr \ --cc=/usr/share/clang/scan-build/ccc-analyzer --disable-docs make </pre> <p><br /> </p> <h3><span class="mw-headline" id="smatch">smatch</span></h3> <p>Here is a typical example using smatch (from <a rel="nofollow" class="external free" href="git://repo.or.cz/smatch.git">git://repo.or.cz/smatch.git</a>): </p> <pre># Start from the root directory with QEMU code. mkdir -f bin/debug/smatch cd bin/debug/smatch CHECK="smatch" ../../../configure --enable-debug --cc=cgcc --host-cc=cgcc make </pre> <p>This example expects that smatch and cgcc are installed in your PATH (if not, you must add absolute paths to the example). </p> <h3><span class="mw-headline" id="Coverity">Coverity</span></h3> <p>Periodic scans of QEMU are done on the public Coverity Scan service (scan.coverity.com). You can request access on their website, and the administrator will grant it if you are an active participant in QEMU development. </p><p>Coverity is confused slightly by multiple definitions of functions with the same name. For this reason, Coverity scans are done as follows: </p> <pre>mkdir cov-int ./configure --audio-drv-list=oss,alsa,sdl,pa --disable-werror make libqemustub.a cov-build --dir cov-int make tar cvf - cov-int | xz &gt; cov-int.tar.xz </pre> <p>Notice that libqemustub.a is ignored by Coverity. This is because some stubs call <tt>abort()</tt> and this causes dead-code false positives. The file cov-int.tar.xz can then be uploaded to <a rel="nofollow" class="external text" href="https://scan.coverity.com/projects/378/builds/new">Coverity Scan's "Submit build" page</a>. Customarily, the "project version" is set to the output of <tt>git describe HEAD</tt> and the "description/tag" is set to "commit XYZ" where XYZ is the <b>full</b> SHA1 hash of the commit. </p> <h2><span class="mw-headline" id="Avocado_and_Avocado-VT">Avocado and Avocado-VT</span></h2> <p>Avocado is a generic testing framework. </p><p>Avocado-VT is the culmination of the old "virt-test" project (and previously known as KVM autotest) with a compatibility layer with to make it run under Avocado. Avocado-VT adds extensive support for Virtualization testing, including first level support for testing QEMU. </p><p>To get started with Avocado-VT please visit: </p> <ul><li><a rel="nofollow" class="external free" href="http://avocado-vt.readthedocs.io">http://avocado-vt.readthedocs.io</a></li> <li><a rel="nofollow" class="external free" href="https://github.com/avocado-framework/avocado-vt">https://github.com/avocado-framework/avocado-vt</a></li></ul> <p>To learn more about Avocado please visit: </p> <ul><li><a rel="nofollow" class="external free" href="http://avocado-framework.readthedocs.io">http://avocado-framework.readthedocs.io</a></li> <li><a rel="nofollow" class="external free" href="https://github.com/avocado-framework/avocado">https://github.com/avocado-framework/avocado</a></li></ul> <p><br /> After installing it, you can use Avocado-VT tests with your own build of QEMU: </p> <pre>avocado run boot --vt-qemu-bin /path/to/qemu-system-x86_64 </pre> <h2><span class="mw-headline" id="Testing_related_meetings">Testing related meetings</span></h2> <p>There's a regular meeting about QEMU testing automation, Avocado's role in that, CI efforts and related topics. </p><p>The meetings will take place every Tuesday from 6:00 AM to 7:00 AM, (GMT-05:00) Eastern Time - New York. </p><p>The meeting ID is 2282383352, and it can be used in any of the following ways to join the meeting: </p> <ul><li>Using your browser: <a rel="nofollow" class="external free" href="https://bluejeans.com/2282383352">https://bluejeans.com/2282383352</a></li> <li>Using one of the apps: <a rel="nofollow" class="external free" href="https://www.bluejeans.com/downloads">https://www.bluejeans.com/downloads</a></li> <li>Dialing to one of these numbers: <a rel="nofollow" class="external free" href="https://www.bluejeans.com/numbers">https://www.bluejeans.com/numbers</a></li></ul> <p>We have been using a public Trello board to keep track of the ongoing tasks: </p> <ul><li><a rel="nofollow" class="external free" href="https://trello.com/b/6Qi1pxVn/avocado-qemu">https://trello.com/b/6Qi1pxVn/avocado-qemu</a></li></ul> <p>Meeting agenda, notes and meeting minutes are tracked at: </p> <ul><li><a rel="nofollow" class="external free" href="https://public.etherpad-mozilla.org/p/AvocadoQEMU">https://public.etherpad-mozilla.org/p/AvocadoQEMU</a></li></ul> <h2><span class="mw-headline" id="See_Also">See Also</span></h2> <ul><li><a rel="nofollow" class="external text" href="https://github.com/ehabkost/gdb-qemu">gdb-qemu</a>, a set of scripts that look for compatibility bugs by poking at QEMU internal data structures using GDB</li></ul> <p>The following sub-pages exist: </p> <div class="mw-prefixindex-body"><ul class="mw-prefixindex-list"><li><div class="allpagesredirect"><a href="/Testing/Acceptance" class="mw-redirect" title="Testing/Acceptance">Testing/Acceptance</a></div></li> <li><a href="/Testing/CCWTestDevice" title="Testing/CCWTestDevice">Testing/CCWTestDevice</a></li> <li><a href="/Testing/CI" title="Testing/CI">Testing/CI</a></li> <li><a href="/Testing/CI/CirrusCI" title="Testing/CI/CirrusCI">Testing/CI/CirrusCI</a></li> <li><a href="/Testing/CI/GitLabCI" title="Testing/CI/GitLabCI">Testing/CI/GitLabCI</a></li> <li><a href="/Testing/CI/Integrated" title="Testing/CI/Integrated">Testing/CI/Integrated</a></li> <li><a href="/Testing/CI/KubernetesRunners" title="Testing/CI/KubernetesRunners">Testing/CI/KubernetesRunners</a></li> <li><a href="/Testing/CI/Patchew" title="Testing/CI/Patchew">Testing/CI/Patchew</a></li> <li><a href="/Testing/CI/Shippable" title="Testing/CI/Shippable">Testing/CI/Shippable</a></li> <li><a href="/Testing/CI/TransientFailures" title="Testing/CI/TransientFailures">Testing/CI/TransientFailures</a></li> <li><a href="/Testing/CI/Travis" title="Testing/CI/Travis">Testing/CI/Travis</a></li> <li><a href="/Testing/CI/TroublesomeTests" title="Testing/CI/TroublesomeTests">Testing/CI/TroublesomeTests</a></li> <li><a href="/Testing/DockerBuild" title="Testing/DockerBuild">Testing/DockerBuild</a></li> <li><a href="/Testing/LAVA" title="Testing/LAVA">Testing/LAVA</a></li> <li><a href="/Testing/LTP" title="Testing/LTP">Testing/LTP</a></li> <li><a href="/Testing/Linaro/TCWG_GNU_QEMU_Tests" title="Testing/Linaro/TCWG GNU QEMU Tests">Testing/Linaro/TCWG GNU QEMU Tests</a></li> <li><a href="/Testing/Machines" title="Testing/Machines">Testing/Machines</a></li> <li><a href="/Testing/QemuIoTests" title="Testing/QemuIoTests">Testing/QemuIoTests</a></li> <li><a href="/Testing/System_Images" title="Testing/System Images">Testing/System Images</a></li> <li><div class="allpagesredirect"><a href="/Testing/Travis" class="mw-redirect" title="Testing/Travis">Testing/Travis</a></div></li> <li><a href="/Testing/Windows" title="Testing/Windows">Testing/Windows</a></li> </ul></div> <!-- NewPP limit report Cached time: 20250408205736 Cache expiry: 0 Reduced expiry: true Complications: [show鈥恡oc] CPU time usage: 0.029 seconds Real time usage: 0.033 seconds Preprocessor visited node count: 88/1000000 Post鈥恊xpand include size: 1335/2097152 bytes Template argument size: 54/2097152 bytes Highest expansion depth: 3/100 Expensive parser function count: 0/100 Unstrip recursion depth: 0/20 Unstrip post鈥恊xpand size: 2144/5000000 bytes --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 8.950 1 -total 42.93% 3.842 1 Special:PrefixIndex/Testing/ 31.82% 2.848 1 Template:Src 21.98% 1.967 1 Template:CIStatus --> </div> <div class="printfooter" data-nosnippet="">Retrieved from "<a dir="ltr" href="https://wiki.qemu.org/index.php?title=Testing&amp;oldid=12042">https://wiki.qemu.org/index.php?title=Testing&amp;oldid=12042</a>"</div></div> <div id="catlinks" class="catlinks catlinks-allhidden" data-mw="interface"></div> </div> </main> </div> <div class="mw-footer-container"> <footer id="footer" class="mw-footer" role="contentinfo" > <ul id="footer-info"> <li id="footer-info-lastmod"> This page was last edited on 17 December 2024, at 14:52.</li> <li id="footer-info-copyright">Content is available under <a class="external" rel="nofollow" href="http://www.gnu.org/licenses/old-licenses/fdl-1.2.txt">GNU Free Documentation License 1.2</a>.<br />QEMU is a trademark of Fabrice Bellard.<br /></li> </ul> <ul id="footer-places"> <li id="footer-places-about"><a href="/QEMU:About">About QEMU</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-copyrightico"><a href="http://www.gnu.org/licenses/old-licenses/fdl-1.2.txt"><img src="/resources/assets/licenses/gnu-fdl.png" alt="GNU Free Documentation License 1.2" width="88" height="31" loading="lazy"/></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/"><img src="/resources/assets/poweredby_mediawiki_88x31.png" alt="Powered by MediaWiki" srcset="/resources/assets/poweredby_mediawiki_132x47.png 1.5x, /resources/assets/poweredby_mediawiki_176x62.png 2x" width="88" height="31" loading="lazy"/></a></li> </ul> </footer> </div> </div> </div> <script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgPageParseReport":{"limitreport":{"cputime":"0.029","walltime":"0.033","ppvisitednodes":{"value":88,"limit":1000000},"postexpandincludesize":{"value":1335,"limit":2097152},"templateargumentsize":{"value":54,"limit":2097152},"expansiondepth":{"value":3,"limit":100},"expensivefunctioncount":{"value":0,"limit":100},"unstrip-depth":{"value":0,"limit":20},"unstrip-size":{"value":2144,"limit":5000000},"timingprofile":["100.00% 8.950 1 -total"," 42.93% 3.842 1 Special:PrefixIndex/Testing/"," 31.82% 2.848 1 Template:Src"," 21.98% 1.967 1 Template:CIStatus"]},"cachereport":{"timestamp":"20250408205736","ttl":0,"transientcontent":true}}});mw.config.set({"wgBackendResponseTime":156});});</script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10