automated testing of debian packages · need to make a few packages build faster "make...
TRANSCRIPT
![Page 1: Automated Testing of Debian Packages · Need to make a few packages build faster "make -j" : no common interface (#209008) Some packages fail to build when using several CPUs Solutions](https://reader033.vdocument.in/reader033/viewer/2022042412/5f2c73291e22fc70ec21fe40/html5/thumbnails/1.jpg)
Introduction Lintian and Linda Rebuilding packages Piuparts Structuring QA Conclusion
Automated Testing of Debian Packages
Holger Levsen – [email protected] Nussbaum – [email protected]
Holger Levsen and Lucas Nussbaum Automated Testing of Debian Packages 1 / 31
![Page 2: Automated Testing of Debian Packages · Need to make a few packages build faster "make -j" : no common interface (#209008) Some packages fail to build when using several CPUs Solutions](https://reader033.vdocument.in/reader033/viewer/2022042412/5f2c73291e22fc70ec21fe40/html5/thumbnails/2.jpg)
Introduction Lintian and Linda Rebuilding packages Piuparts Structuring QA Conclusion
Summary
1 Introduction
2 Lintian and Linda
3 Rebuilding packages
4 Piuparts
5 Structuring QA
6 Conclusion
Holger Levsen and Lucas Nussbaum Automated Testing of Debian Packages 2 / 31
![Page 3: Automated Testing of Debian Packages · Need to make a few packages build faster "make -j" : no common interface (#209008) Some packages fail to build when using several CPUs Solutions](https://reader033.vdocument.in/reader033/viewer/2022042412/5f2c73291e22fc70ec21fe40/html5/thumbnails/3.jpg)
Introduction Lintian and Linda Rebuilding packages Piuparts Structuring QA Conclusion
Debian’s Quality Popcon data Automated Testing
Summary
1 IntroductionDebian’s QualityPopcon dataAutomated Testing
2 Lintian and Linda
3 Rebuilding packages
4 Piuparts
5 Structuring QA
6 ConclusionHolger Levsen and Lucas Nussbaum Automated Testing of Debian Packages 3 / 31
![Page 4: Automated Testing of Debian Packages · Need to make a few packages build faster "make -j" : no common interface (#209008) Some packages fail to build when using several CPUs Solutions](https://reader033.vdocument.in/reader033/viewer/2022042412/5f2c73291e22fc70ec21fe40/html5/thumbnails/4.jpg)
Introduction Lintian and Linda Rebuilding packages Piuparts Structuring QA Conclusion
Debian’s Quality Popcon data Automated Testing
Debian’s Quality
Ask around : considered quite good compared to otherdistrosA lot of packages, all supported in the same way :
10316 source packages in etch/main18167 binary packages in etch/main
Holger Levsen and Lucas Nussbaum Automated Testing of Debian Packages 4 / 31
![Page 5: Automated Testing of Debian Packages · Need to make a few packages build faster "make -j" : no common interface (#209008) Some packages fail to build when using several CPUs Solutions](https://reader033.vdocument.in/reader033/viewer/2022042412/5f2c73291e22fc70ec21fe40/html5/thumbnails/5.jpg)
Introduction Lintian and Linda Rebuilding packages Piuparts Structuring QA Conclusion
Debian’s Quality Popcon data Automated Testing
Packages installations according to popcon
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0 5000 10000 15000 20000 25000 30000
perc
enta
ge o
f pac
kage
s
installations
18167 packages in etch/main (max : 27700 installations)1591 packages have less than 10 installations8985 packages have less than 100 installations15321 packages have less than 1000 installations
⇒ Most packages don’t have a lot of installationsHolger Levsen and Lucas Nussbaum Automated Testing of Debian Packages 5 / 31
![Page 6: Automated Testing of Debian Packages · Need to make a few packages build faster "make -j" : no common interface (#209008) Some packages fail to build when using several CPUs Solutions](https://reader033.vdocument.in/reader033/viewer/2022042412/5f2c73291e22fc70ec21fe40/html5/thumbnails/6.jpg)
Introduction Lintian and Linda Rebuilding packages Piuparts Structuring QA Conclusion
Debian’s Quality Popcon data Automated Testing
Automated Testing
A way to :give the same level of attention to all packages in Debiannot only rely on humans to find bugsavoid regressionskeep maintainers busy :-)
Holger Levsen and Lucas Nussbaum Automated Testing of Debian Packages 6 / 31
![Page 7: Automated Testing of Debian Packages · Need to make a few packages build faster "make -j" : no common interface (#209008) Some packages fail to build when using several CPUs Solutions](https://reader033.vdocument.in/reader033/viewer/2022042412/5f2c73291e22fc70ec21fe40/html5/thumbnails/7.jpg)
Introduction Lintian and Linda Rebuilding packages Piuparts Structuring QA Conclusion
Introduction Example output Future work
Summary
1 Introduction
2 Lintian and LindaIntroductionExample outputFuture work
3 Rebuilding packages
4 Piuparts
5 Structuring QA
6 ConclusionHolger Levsen and Lucas Nussbaum Automated Testing of Debian Packages 7 / 31
![Page 8: Automated Testing of Debian Packages · Need to make a few packages build faster "make -j" : no common interface (#209008) Some packages fail to build when using several CPUs Solutions](https://reader033.vdocument.in/reader033/viewer/2022042412/5f2c73291e22fc70ec21fe40/html5/thumbnails/8.jpg)
Introduction Lintian and Linda Rebuilding packages Piuparts Structuring QA Conclusion
Introduction Example output Future work
Lintian and Linda
Static checks on Debian packagesLintian : (mostly in) Perl, Linda : PythonEasy to run them yourselfGenerates lots of warnings and errors (somefalse-positives, too)See http://lintian.debian.org/ (not up to date)
Holger Levsen and Lucas Nussbaum Automated Testing of Debian Packages 8 / 31
![Page 9: Automated Testing of Debian Packages · Need to make a few packages build faster "make -j" : no common interface (#209008) Some packages fail to build when using several CPUs Solutions](https://reader033.vdocument.in/reader033/viewer/2022042412/5f2c73291e22fc70ec21fe40/html5/thumbnails/9.jpg)
Introduction Lintian and Linda Rebuilding packages Piuparts Structuring QA Conclusion
Introduction Example output Future work
Example Lintian output
belpic (maintainer : Wouter Verhelst) :W: belpic source: diff-contains-substvars debian/substvarsE: libbeidlibopensc2: postinst-must-call-ldconfig usr/lib/libbeidpkcs11.so.2.1.0E: libbeid2: postinst-must-call-ldconfig usr/lib/libbeidlibjni.so.2.7.2W: beidgui: binary-without-manpage beidguiW: beidgui: non-dev-pkg-with-shlib-symlink usr/lib/libbeidgui.so.1.5.0 usr/lib/libbeidgui.soE: beidgui: no-shlibs-control-file usr/lib/libbeidgui.so.1.5.0W: beidgui: postrm-should-call-ldconfig usr/lib/libbeidgui.so.1.5.0W: beidgui: package-name-doesnt-match-sonames libbeidgui1W: beid-tools: binary-without-manpage beidcrldW: beid-tools: binary-without-manpage beidpcscdW: beid-tools: init.d-script-missing-lsb-section /etc/init.d/beid
⇒ As I said, probably many false positives :-)
Holger Levsen and Lucas Nussbaum Automated Testing of Debian Packages 9 / 31
![Page 10: Automated Testing of Debian Packages · Need to make a few packages build faster "make -j" : no common interface (#209008) Some packages fail to build when using several CPUs Solutions](https://reader033.vdocument.in/reader033/viewer/2022042412/5f2c73291e22fc70ec21fe40/html5/thumbnails/10.jpg)
Introduction Lintian and Linda Rebuilding packages Piuparts Structuring QA Conclusion
Introduction Example output Future work
Future work
Make maintainers use them ! (ideas ?)Fix bugs (or use overrides if false positives)And mostly infrastructure work :
Work on lintian.debian.orgRegular runsFile bugs ?
Holger Levsen and Lucas Nussbaum Automated Testing of Debian Packages 10 / 31
![Page 11: Automated Testing of Debian Packages · Need to make a few packages build faster "make -j" : no common interface (#209008) Some packages fail to build when using several CPUs Solutions](https://reader033.vdocument.in/reader033/viewer/2022042412/5f2c73291e22fc70ec21fe40/html5/thumbnails/11.jpg)
Introduction Lintian and Linda Rebuilding packages Piuparts Structuring QA Conclusion
Introduction Tools Resources usage Parallel rebuilds Future work
Summary
1 Introduction
2 Lintian and Linda
3 Rebuilding packagesIntroductionToolsResources usageParallel rebuildsFuture work
4 Piuparts
5 Structuring QA
6 Conclusion
Holger Levsen and Lucas Nussbaum Automated Testing of Debian Packages 11 / 31
![Page 12: Automated Testing of Debian Packages · Need to make a few packages build faster "make -j" : no common interface (#209008) Some packages fail to build when using several CPUs Solutions](https://reader033.vdocument.in/reader033/viewer/2022042412/5f2c73291e22fc70ec21fe40/html5/thumbnails/12.jpg)
Introduction Lintian and Linda Rebuilding packages Piuparts Structuring QA Conclusion
Introduction Tools Resources usage Parallel rebuilds Future work
Rebuilding packagespackages with "Arch : all" are only built on thedeveloper’s machinepackages with "Arch : any" are only built automaticallybefore they reach unstable (and only on $ARCH !=Uploader’s arch)
After that, the build environment changes :newer/older compiler and librariesbuild-dependencies not available anymore (b-deps are notconsidered for testing propagation)
Problems :Everyone should be able to build your packageStable releases must be self-contained (securityupgrades !)
Holger Levsen and Lucas Nussbaum Automated Testing of Debian Packages 12 / 31
![Page 13: Automated Testing of Debian Packages · Need to make a few packages build faster "make -j" : no common interface (#209008) Some packages fail to build when using several CPUs Solutions](https://reader033.vdocument.in/reader033/viewer/2022042412/5f2c73291e22fc70ec21fe40/html5/thumbnails/13.jpg)
Introduction Lintian and Linda Rebuilding packages Piuparts Structuring QA Conclusion
Introduction Tools Resources usage Parallel rebuilds Future work
Rebuilding packages : tools
pbuilder :builds a package inside a chrootvery easy to set upyou should use it !use cowbuilder for faster builds (cowdancer package)
sbuild (the Debian package) :relies on schrootharder to set up, but more powerful
Holger Levsen and Lucas Nussbaum Automated Testing of Debian Packages 13 / 31
![Page 14: Automated Testing of Debian Packages · Need to make a few packages build faster "make -j" : no common interface (#209008) Some packages fail to build when using several CPUs Solutions](https://reader033.vdocument.in/reader033/viewer/2022042412/5f2c73291e22fc70ec21fe40/html5/thumbnails/14.jpg)
Introduction Lintian and Linda Rebuilding packages Piuparts Structuring QA Conclusion
Introduction Tools Resources usage Parallel rebuilds Future work
Rebuilding packages : resources usage
Rebuilding all packages in Debian Etch :about 10 days on a single computer
Most packages are fast to build :
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
1 10 100 1000 10000
F(x
)
package build time (s), logarithmic scale
Holger Levsen and Lucas Nussbaum Automated Testing of Debian Packages 14 / 31
![Page 15: Automated Testing of Debian Packages · Need to make a few packages build faster "make -j" : no common interface (#209008) Some packages fail to build when using several CPUs Solutions](https://reader033.vdocument.in/reader033/viewer/2022042412/5f2c73291e22fc70ec21fe40/html5/thumbnails/15.jpg)
Introduction Lintian and Linda Rebuilding packages Piuparts Structuring QA Conclusion
Introduction Tools Resources usage Parallel rebuilds Future work
Rebuilding packages : resources usage (2)But some packages take a long time :
Source package Timeopenoffice.org 7 h 14 min
latex-cjk-chinese-arphic 6 h 18 minlinux-2.6 5 h 43 mingcc-4.1 2 h 52 mingcj-4.1 2 h 44 min
gnat-4.1 1 h 52 mingcc-3.4 1 h 50 min
installation-guide 1 h 45 minaxiom 1 h 44 mk3d 1 h 39 min
(On Dual-Opteron 2 GHz, 2 GB RAM)
Holger Levsen and Lucas Nussbaum Automated Testing of Debian Packages 15 / 31
![Page 16: Automated Testing of Debian Packages · Need to make a few packages build faster "make -j" : no common interface (#209008) Some packages fail to build when using several CPUs Solutions](https://reader033.vdocument.in/reader033/viewer/2022042412/5f2c73291e22fc70ec21fe40/html5/thumbnails/16.jpg)
Introduction Lintian and Linda Rebuilding packages Piuparts Structuring QA Conclusion
Introduction Tools Resources usage Parallel rebuilds Future work
Parallel Rebuilds
Easy to distribute over several nodes :Since October, several rebuilds on Grid’5000(french experimental grid platform, with 2500 CPUs)⇒ Full rebuild in about 7.5 hours, on about 40 nodes
. . .
node 40
node 39
node 37
node 38
node 1
openoffice.org
linux−2.6
~ 7.5 hours
Holger Levsen and Lucas Nussbaum Automated Testing of Debian Packages 16 / 31
![Page 17: Automated Testing of Debian Packages · Need to make a few packages build faster "make -j" : no common interface (#209008) Some packages fail to build when using several CPUs Solutions](https://reader033.vdocument.in/reader033/viewer/2022042412/5f2c73291e22fc70ec21fe40/html5/thumbnails/17.jpg)
Introduction Lintian and Linda Rebuilding packages Piuparts Structuring QA Conclusion
Introduction Tools Resources usage Parallel rebuilds Future work
Parallel Rebuilds
Using more nodes is uselessNeed to make a few packages build faster"make -j" :
no common interface (#209008)Some packages fail to build when using several CPUs
Solutions :Work on #209008Work on those few packagesIgnore those packages
Holger Levsen and Lucas Nussbaum Automated Testing of Debian Packages 17 / 31
![Page 18: Automated Testing of Debian Packages · Need to make a few packages build faster "make -j" : no common interface (#209008) Some packages fail to build when using several CPUs Solutions](https://reader033.vdocument.in/reader033/viewer/2022042412/5f2c73291e22fc70ec21fe40/html5/thumbnails/18.jpg)
Introduction Lintian and Linda Rebuilding packages Piuparts Structuring QA Conclusion
Introduction Tools Resources usage Parallel rebuilds Future work
Future Work
Test build scripts (rebuild after change, clean rule, etc)Compare build results with what is in the archive
First results are quite depressingBuild in "strange" environments and compare results
Holger Levsen and Lucas Nussbaum Automated Testing of Debian Packages 18 / 31
![Page 19: Automated Testing of Debian Packages · Need to make a few packages build faster "make -j" : no common interface (#209008) Some packages fail to build when using several CPUs Solutions](https://reader033.vdocument.in/reader033/viewer/2022042412/5f2c73291e22fc70ec21fe40/html5/thumbnails/19.jpg)
Introduction Lintian and Linda Rebuilding packages Piuparts Structuring QA Conclusion
Introduction False positives Future work
Summary
1 Introduction
2 Lintian and Linda
3 Rebuilding packages
4 PiupartsIntroductionFalse positivesFuture work
5 Structuring QA
6 ConclusionHolger Levsen and Lucas Nussbaum Automated Testing of Debian Packages 19 / 31
![Page 20: Automated Testing of Debian Packages · Need to make a few packages build faster "make -j" : no common interface (#209008) Some packages fail to build when using several CPUs Solutions](https://reader033.vdocument.in/reader033/viewer/2022042412/5f2c73291e22fc70ec21fe40/html5/thumbnails/20.jpg)
Introduction Lintian and Linda Rebuilding packages Piuparts Structuring QA Conclusion
Introduction False positives Future work
Piuparts
Tests installation and removal of packages
Process :cleans up a chroot (removes everything except apt)installs the package to test and its dependenciesRemoves everything, purge all dependenciesPurges the package to test
⇒ test of the package maintainer scripts(preinst, postinst, prerm, postrm)under the most extreme conditions
Holger Levsen and Lucas Nussbaum Automated Testing of Debian Packages 20 / 31
![Page 21: Automated Testing of Debian Packages · Need to make a few packages build faster "make -j" : no common interface (#209008) Some packages fail to build when using several CPUs Solutions](https://reader033.vdocument.in/reader033/viewer/2022042412/5f2c73291e22fc70ec21fe40/html5/thumbnails/21.jpg)
Introduction Lintian and Linda Rebuilding packages Piuparts Structuring QA Conclusion
Introduction False positives Future work
Piuparts (2)
Also tests other things :upgradesrunning processes after removaldangling symlinksfiles left after removal/purge, files from other packagesmodified
Holger Levsen and Lucas Nussbaum Automated Testing of Debian Packages 21 / 31
![Page 22: Automated Testing of Debian Packages · Need to make a few packages build faster "make -j" : no common interface (#209008) Some packages fail to build when using several CPUs Solutions](https://reader033.vdocument.in/reader033/viewer/2022042412/5f2c73291e22fc70ec21fe40/html5/thumbnails/22.jpg)
Introduction Lintian and Linda Rebuilding packages Piuparts Structuring QA Conclusion
Introduction False positives Future work
Piuparts and false positives
Piuparts generates A LOT of false positives
To be tested, a package must be able to install non-interactivelydebconf is nice (Noninteractive frontend)but doesn’t solve everything (e.g packages that needaccess a database)
⇒ Make all packages use debconf
⇒ After that, not much to do about false positives
Holger Levsen and Lucas Nussbaum Automated Testing of Debian Packages 22 / 31
![Page 23: Automated Testing of Debian Packages · Need to make a few packages build faster "make -j" : no common interface (#209008) Some packages fail to build when using several CPUs Solutions](https://reader033.vdocument.in/reader033/viewer/2022042412/5f2c73291e22fc70ec21fe40/html5/thumbnails/23.jpg)
Introduction Lintian and Linda Rebuilding packages Piuparts Structuring QA Conclusion
Introduction False positives Future work
Piuparts and set theory
Problem : how can one easily get a list of real failures, withoutfalse positives ?⇒ Set theory !Example : find packages that fail to install because of a missingdepend on debconf.
Run piuparts over all packages, without debconf installedFetch the list of failuresFor each package that failed during the first run,re-run piuparts with debconf installedPackages that succeeded = our list of failures
Holger Levsen and Lucas Nussbaum Automated Testing of Debian Packages 23 / 31
![Page 24: Automated Testing of Debian Packages · Need to make a few packages build faster "make -j" : no common interface (#209008) Some packages fail to build when using several CPUs Solutions](https://reader033.vdocument.in/reader033/viewer/2022042412/5f2c73291e22fc70ec21fe40/html5/thumbnails/24.jpg)
Introduction Lintian and Linda Rebuilding packages Piuparts Structuring QA Conclusion
Introduction False positives Future work
Future work
Other piuparts tests (not just installation/removal failures)Improve piuparts (now maintained collaboratively !)
Make it more flexiblepiatti.debian.org : dual Xeon in helsinki
Used by liw to run piuparts over the archiveSlower by Grid’5000 ;)Idea : Xen instances for interested DD toreproduce/investigate resultsMore ideas ?
Holger Levsen and Lucas Nussbaum Automated Testing of Debian Packages 24 / 31
![Page 25: Automated Testing of Debian Packages · Need to make a few packages build faster "make -j" : no common interface (#209008) Some packages fail to build when using several CPUs Solutions](https://reader033.vdocument.in/reader033/viewer/2022042412/5f2c73291e22fc70ec21fe40/html5/thumbnails/25.jpg)
Introduction Lintian and Linda Rebuilding packages Piuparts Structuring QA Conclusion
Problem Collaborative QA collab-qa project
Summary
1 Introduction
2 Lintian and Linda
3 Rebuilding packages
4 Piuparts
5 Structuring QAProblemCollaborative QAcollab-qa project
6 ConclusionHolger Levsen and Lucas Nussbaum Automated Testing of Debian Packages 25 / 31
![Page 26: Automated Testing of Debian Packages · Need to make a few packages build faster "make -j" : no common interface (#209008) Some packages fail to build when using several CPUs Solutions](https://reader033.vdocument.in/reader033/viewer/2022042412/5f2c73291e22fc70ec21fe40/html5/thumbnails/26.jpg)
Introduction Lintian and Linda Rebuilding packages Piuparts Structuring QA Conclusion
Problem Collaborative QA collab-qa project
Structuring QAProblems
QA mostly done by individuals⇒ not a good solution on the long term :
nobody knows what people are doingduplicated effortsthings not tested, even in etchsome resources could be shared, but are not
Holger Levsen and Lucas Nussbaum Automated Testing of Debian Packages 26 / 31
![Page 27: Automated Testing of Debian Packages · Need to make a few packages build faster "make -j" : no common interface (#209008) Some packages fail to build when using several CPUs Solutions](https://reader033.vdocument.in/reader033/viewer/2022042412/5f2c73291e22fc70ec21fe40/html5/thumbnails/27.jpg)
Introduction Lintian and Linda Rebuilding packages Piuparts Structuring QA Conclusion
Problem Collaborative QA collab-qa project
Better, collaborative QA
use [email protected] for communicationshare information
documentation on processeslists of false positives, bugs already filed, etcuse usertags
Holger Levsen and Lucas Nussbaum Automated Testing of Debian Packages 27 / 31
![Page 28: Automated Testing of Debian Packages · Need to make a few packages build faster "make -j" : no common interface (#209008) Some packages fail to build when using several CPUs Solutions](https://reader033.vdocument.in/reader033/viewer/2022042412/5f2c73291e22fc70ec21fe40/html5/thumbnails/28.jpg)
Introduction Lintian and Linda Rebuilding packages Piuparts Structuring QA Conclusion
Problem Collaborative QA collab-qa project
Example "good" process
Bob wants to test a new compiler version(rebuild all packages with the new version)Bob tells about his plans on [email protected]
Joe proposes to run the tests on his large computingclusterAfter discussing the details, Joe runs the testsBob analyzes the logs and files bugs
Holger Levsen and Lucas Nussbaum Automated Testing of Debian Packages 28 / 31
![Page 29: Automated Testing of Debian Packages · Need to make a few packages build faster "make -j" : no common interface (#209008) Some packages fail to build when using several CPUs Solutions](https://reader033.vdocument.in/reader033/viewer/2022042412/5f2c73291e22fc70ec21fe40/html5/thumbnails/29.jpg)
Introduction Lintian and Linda Rebuilding packages Piuparts Structuring QA Conclusion
Problem Collaborative QA collab-qa project
"Collaborative QA" project @ alioth
collab-qa alioth project :share as much stuff as possiblecurrently :
scripts to run rebuilds and piuparts on a clusterscripts to analyze logfilesdata :
blacklists for rebuilds and piupartslist of piuparts false positivesestimated build time for each package
⇒ Join us !
Holger Levsen and Lucas Nussbaum Automated Testing of Debian Packages 29 / 31
![Page 30: Automated Testing of Debian Packages · Need to make a few packages build faster "make -j" : no common interface (#209008) Some packages fail to build when using several CPUs Solutions](https://reader033.vdocument.in/reader033/viewer/2022042412/5f2c73291e22fc70ec21fe40/html5/thumbnails/30.jpg)
Introduction Lintian and Linda Rebuilding packages Piuparts Structuring QA Conclusion
Summary
1 Introduction
2 Lintian and Linda
3 Rebuilding packages
4 Piuparts
5 Structuring QA
6 Conclusion
Holger Levsen and Lucas Nussbaum Automated Testing of Debian Packages 30 / 31
![Page 31: Automated Testing of Debian Packages · Need to make a few packages build faster "make -j" : no common interface (#209008) Some packages fail to build when using several CPUs Solutions](https://reader033.vdocument.in/reader033/viewer/2022042412/5f2c73291e22fc70ec21fe40/html5/thumbnails/31.jpg)
Introduction Lintian and Linda Rebuilding packages Piuparts Structuring QA Conclusion
Conclusion
We have a nice set of toolscould clearly be used a lot more
Many tests to run and many bugs to fix with the currenttoolsMain objective :
Be better at finding and fixing bugs using the currenttoolsEven if writing new tools is clearly sexier ;)
Holger Levsen and Lucas Nussbaum Automated Testing of Debian Packages 31 / 31