Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
167 tokens/sec
GPT-4o
7 tokens/sec
Gemini 2.5 Pro Pro
42 tokens/sec
o3 Pro
4 tokens/sec
GPT-4.1 Pro
38 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Maximizing Patch Coverage for Testing of Highly-Configurable Software without Exploding Build Times (2404.17966v1)

Published 27 Apr 2024 in cs.SE

Abstract: The Linux kernel is highly-configurable, with a build system that takes a configuration file as input and automatically tailors the source code accordingly. Configurability, however, complicates testing, because different configuration options lead to the inclusion of different code fragments. With thousands of patches received per month, Linux kernel maintainers employ extensive automated continuous integration testing. To attempt patch coverage, i.e., taking all changed lines into account, current approaches either use configuration files that maximize total statement coverage or use multiple randomly-generated configuration files, both of which incur high build times without guaranteeing patch coverage. To achieve patch coverage without exploding build times, we propose krepair, which automatically repairs configuration files that are fast-building but have poor patch coverage to achieve high patch coverage with little effect on build times. krepair works by discovering a small set of changes to a configuration file that will ensure patch coverage, preserving most of the original configuration file's settings. Our evaluation shows that, when applied to configuration files with poor patch coverage on a statistically-significant sample of recent Linux kernel patches, krepair achieves nearly complete patch coverage, 98.5% on average, while changing less than 1.53% of the original default configuration file in 99% of patches, which keeps build times 10.5x faster than maximal configuration files.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (80)
  1. 2018. Busybox website. https://busybox.net/.
  2. 2020a. syzkaller commit 67fa1f59b87f ”executor: add support for USB fuzzing on NetBSD”. https://github.com/google/syzkaller/commit/67fa1f59b87fed7268b465f7e9540a590a250c65, Last accessed May 4, 2022.
  3. 2020b. syzkaller commit 80a0690249dc ”dashboard/config: regenerate all configs”. https://github.com/google/syzkaller/commit/80a0690249dc4dbbbed95ba197192b99c73694c5, Last accessed May 4, 2022.
  4. 2021. Mainline Linux Git Repository. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git.
  5. 2021. whatthepatch. https://pypi.org/project/whatthepatch/.
  6. 2024. https://github.com/paulgazz/kmax. Accessed: 2024-02-06.
  7. Top 500. 2020. Sublist Generator. https://www.top500.org/statistics/sublist/.
  8. Learning from thousands of build failures of Linux kernel configurations. Technical Report. Inria ; IRISA. 1–12 pages. https://hal.inria.fr/hal-02147012
  9. Learning Very Large Configuration Spaces: What Matters for Linux Kernel Sizes. Research Report. Inria Rennes - Bretagne Atlantique. https://hal.inria.fr/hal-02314830
  10. Design recovery and maintenance of build systems. In 23rd IEEE International Conference on Software Maintenance (ICSM 2007), October 2-5, 2007, Paris, France. 114–123. https://doi.org/10.1109/ICSM.2007.4362624
  11. Feature-Oriented Software Product Lines: Concepts and Implementation. Springer Publishing Company, Incorporated.
  12. The SMT-LIB Standard: Version 2.0. In Proceedings of the 8th International Workshop on Satisfiability Modulo Theories (Edinburgh, UK), A. Gupta and D. Kroening (Eds.).
  13. Feature-to-Code Mapping in Two Large Product Lines.. In SPLC. 498–499.
  14. Block public access: trust safety verification of access control policies. In Proceedings of the 28th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering. 281–291.
  15. Jesper Dangaard Brouer. 2016. Kernel Software Variability: From a kernel developer’s perspective: commonly known as #ifdef challenges. https://people.netfilter.org/hawk/presentations/ifdef2016/ifdef_FOSD2016.pdf Keynote Talk, Feature-Oriented Software Development (FOSD).
  16. Test-Case Prioritization for Configuration Testing. In Proceedings of the 30th ACM SIGSOFT International Symposium on Software Testing and Analysis (Virtual, Denmark) (ISSTA 2021). Association for Computing Machinery, New York, NY, USA, 452–465. https://doi.org/10.1145/3460319.3464810
  17. The combinatorial design approach to automatic test generation. IEEE Software 13, 5 (Sept. 1996), 83–88. https://doi.org/10.1109/52.536462
  18. Constructing Interaction Test Suites for Highly-Configurable Systems in the Presence of Constraints: A Greedy Approach. Software Engineering, IEEE Transactions on 34 (09 2008), 633–650. https://doi.org/10.1109/TSE.2008.50
  19. Jonathan Corbet. 2020. Some 5.5 kernel development statistics. https://lwn.net/Articles/810639/.
  20. Jonathan Corbet. 2021. Some 5.12 development statistics. https://lwn.net/Articles/853039/.
  21. Coreboot. [n. d.]. https://www.coreboot.org.
  22. Intel Corporation. 2021. 0-Day Test Service. https://01.org/lkp/documentation/0-day-test-service.
  23. Leonardo De Moura and Nikolaj Bjørner. 2008. Z3: An efficient SMT solver. In International conference on Tools and Algorithms for the Construction and Analysis of Systems. Springer, 337–340.
  24. Understanding Linux Feature Distribution. In Proceedings of the 2012 Workshop on Modularity in Systems Software (Potsdam, Germany) (MISS ’12). ACM, New York, NY, USA, 15–20. https://doi.org/10.1145/2162024.2162030
  25. Analysing the Linux kernel feature model changes using FMDiff. Software & Systems Modeling 16, 1 (2017), 55–76.
  26. FEVER: An approach to analyze feature-oriented changes and artefact co-evolution in highly configurable systems. Empirical Software Engineering 23, 2 (2018), 905–952.
  27. Eclipse Foundation. 2018. IoT Developer Survey Results. https://iot.eclipse.org/community/resources/iot-surveys/assets/iot-developer-survey-2018.pdf. Accessed: 2020-06-10.
  28. The Linux Foundation. 2022. KernelCI. https://foundation.kernelci.org/, Last accessed 05/04/2022.
  29. ConfigFix: Interactive configuration conflict resolution for the Linux kernel. In 2021 IEEE/ACM 43rd International Conference on Software Engineering: Software Engineering in Practice (ICSE-SEIP). IEEE, 91–100.
  30. Alejandra Garrido and Ralph Johnson. 2005. Analyzing multiple configurations of a C program. In 21st IEEE International Conference on Software Maintenance (ICSM’05). IEEE, 379–388.
  31. Paul Gazzillo. 2017. Kmax: Finding All Configurations of Kbuild Makefiles Statically. In Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering (Paderborn, Germany) (ESEC/FSE 2017). ACM, New York, NY, USA, 279–290. https://doi.org/10.1145/3106237.3106283
  32. Paul Gazzillo. 2020. Inferring and Securing Software Configurations Using Automated Reasoning. In Proceedings of the 28th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering (Virtual Event, USA) (ESEC/FSE 2020). Association for Computing Machinery, New York, NY, USA, 1517–1520. https://doi.org/10.1145/3368089.3417041
  33. Paul Gazzillo and Robert Grimm. 2012. SuperC: Parsing All of C by Taming the Preprocessor. In Proceedings of the 33rd ACM SIGPLAN Conference on Programming Language Design and Implementation (Beijing, China) (PLDI ’12). ACM, New York, NY, USA, 323–334. https://doi.org/10.1145/2254064.2254103
  34. Localizing configurations in highly-configurable systems. In Proceedings of the 22nd International Systems and Software Product Line Conference-Volume 1. 269–273.
  35. Google. 2020. syzkaller. https://github.com/google/syzkaller/.
  36. A genetic algorithm for optimized feature selection with resource constraints in software product lines. Journal of Systems and Software 84 (12 2011), 2208–2221. https://doi.org/10.1016/j.jss.2011.06.026
  37. Asserting reliable convergence for configuration management scripts. In Proceedings of the 2016 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications. 328–343.
  38. Eric Horton and Chris Parnin. 2019. Dockerizeme: Automatic inference of environment dependencies for python code snippets. In 2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE). IEEE, 328–338.
  39. IEEE. 2012. IEEE Standard for Configuration Management in Systems and Software Engineering.
  40. Variability-aware Parsing in the Presence of Lexical Macros and Conditional Compilation. In Proceedings of the 2011 ACM International Conference on Object Oriented Programming Systems Languages and Applications (Portland, Oregon, USA) (OOPSLA ’11). ACM, New York, NY, USA, 805–824. https://doi.org/10.1145/2048066.2048128
  41. PClocator: A Tool Suite to Automatically Identify Configurations for Code Locations. In Proceedings of the 22nd International Systems and Software Product Line Conference - Volume 1 (Gothenburg, Sweden) (SPLC ’18). Association for Computing Machinery, New York, NY, USA, 284–288. https://doi.org/10.1145/3233027.3236399
  42. Set the Configuration for the Heart of the OS: On the Practicality of Operating System Kernel Debloating. Proc. ACM Meas. Anal. Comput. Syst. 4, 1, Article 03 (may 2020), 27 pages. https://doi.org/10.1145/3379469
  43. Attack Surface Metrics and Automated Compile-Time OS Kernel Tailoring.. In NDSS.
  44. Christian Kästner. 2017. Differential Testing for Variational Analyses: Experience from Developing KConfigReader. arXiv:1706.09357 [cs.SE]
  45. Julia Lawall and Gilles Muller. 2017. JMake: Dependable Compilation for Kernel Janitors. In 47th Annual IEEE/IFIP International Conference on Dependable Systems and Networks (DSN). 357–366.
  46. Evolution of the Linux kernel variability model. In International Conference on Software Product Lines. Springer, 136–150.
  47. Inês Lynce and João Marques-silva. 2004. On computing minimum unsatisfiable cores. In In Proceedings of the Seventh International Conference on Theory and Applications of Satisfiability Testing (SAT’04). 305–310.
  48. Alan Maguire. 2021. A Zoological guide to kernel data structures. https://blogs.oracle.com/linux/post/a-zoological-guide-to-kernel-data-structures.
  49. GNU Manual. 2022. GNU Diffutils: Unified Format. https://www.gnu.org/software/diffutils/manual/html_node/Unified-Format.html.
  50. A Comparison of 10 Sampling Algorithms for Configurable Systems. In Proceedings of the 38th International Conference on Software Engineering (Austin, Texas) (ICSE ’16). Association for Computing Machinery, New York, NY, USA, 643–654. https://doi.org/10.1145/2884781.2884793
  51. Sarah Nadi and Ric Holt. 2012. Mining Kbuild to detect variability anomalies in Linux. In Software Maintenance and Reengineering (CSMR), 2012 16th European Conference on. IEEE, 107–116.
  52. T-Wise Coverage by Uniform Sampling. In Proceedings of the 23rd International Systems and Software Product Line Conference - Volume A (Paris, France) (SPLC ’19). Association for Computing Machinery, New York, NY, USA, 84–87. https://doi.org/10.1145/3336294.3342359
  53. Finding broken Linux configuration specifications by statically analyzing the Kconfig language. In Proceedings of the 29th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE 2021). Association for Computing Machinery, 893–905.
  54. Coevolution of variability models and related software artifacts. Empirical Software Engineering 21, 4 (2016), 1744–1793.
  55. Barbara G. Ryder and Frank Tip. 2001. Change impact analysis for object-oriented programs. In Proceedings of the 2001 ACM SIGPLAN-SIGSOFT Workshop on Program Analysis for Software Tools and Engineering (Snowbird, Utah, USA) (PASTE ’01). Association for Computing Machinery, New York, NY, USA, 46–53. https://doi.org/10.1145/379605.379661
  56. Rehearsal: A configuration verification tool for Puppet. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation (Santa Barbara, CA, USA) (PLDI ’16). ACM, New York, NY, USA, 416–430. https://doi.org/10.1145/2908080.2908083
  57. Steven She. 2013. Feature model synthesis. (2013).
  58. Efficient extraction and analysis of preprocessor-based variability. In Proceedings of the ninth international conference on Generative programming and component engineering. 33–42.
  59. Practical fault detection in puppet programs. In Proceedings of the ACM/IEEE 42nd International Conference on Software Engineering. 26–37.
  60. Diomidis Spinellis. 2010. CScout: A refactoring browser for C. Science of Computer Programming 75, 4 (2010), 216–231.
  61. Testing configuration changes in context to prevent production failures. In 14th USENIX Symposium on Operating Systems Design and Implementation (OSDI 20). USENIX Association, 735–751. https://www.usenix.org/conference/osdi20/presentation/sun
  62. W3Techs World Wide Web Technology Surveys. 2019. Usage statistics of Unix for websites. https://w3techs.com/technologies/details/os-unix/all/all. Accessed: 2020-06-10.
  63. syzbotreport 2021. syzbot report ”memory leak in dvb_create_media_graph”. https://syzkaller.appspot.com/bug?extid=7f09440acc069a0d38ac, Last accessed May 4, 2022.
  64. Kuo-Chung Tai and Yu Lei. 2002. A test generation strategy for pairwise testing. IEEE Transactions on Software Engineering 28, 1 (Jan. 2002), 109–111. https://doi.org/10.1109/32.979992
  65. SYMake: A build code analysis and refactoring tool for makefiles. In Proceedings of the 27th IEEE/ACM International Conference on Automated Software Engineering (Essen, Germany) (ASE 2012). ACM, New York, NY, USA, 366–369. https://doi.org/10.1145/2351676.2351749
  66. Static analysis of variability in system software: The 90,000 #ifdefs issue. In USENIX Annual Technical Conference (USENIX ATC). USENIX Association, 421–432.
  67. Configuration coverage in the analysis of large-scale system software. In Workshop on Programming Languages and Operating Systems, PLOS@SOSP. ACM, 2:1–2:5.
  68. Feature Consistency in Compile-Time-Configurable System Software: Facing the Linux 10,000 Feature Problem. In Proceedings of the 6th European Conference on Computer Systems. 47–60. http://dx.doi.org/10.1145/1966445.1966451
  69. SmartFixer: fixing software configurations based on dynamic priorities. In Proceedings of the 17th International Software Product Line Conference (Tokyo, Japan) (SPLC ’13). Association for Computing Machinery, New York, NY, USA, 82–90. https://doi.org/10.1145/2491627.2491640
  70. Tortoise: Interactive system configuration repair. In 2017 32nd IEEE/ACM International Conference on Automated Software Engineering (ASE). IEEE, 625–636.
  71. Automated Diagnosis of Product-Line Configuration Errors in Feature Models. In 2008 12th International Software Product Line Conference. 225–234. https://doi.org/10.1109/SPLC.2008.16
  72. Norman Wilde and Michael C Scully. 1995. Software reconnaissance: Mapping program features to code. Journal of Software Maintenance: Research and Practice 7, 1 (1995), 49–62.
  73. Generating range fixes for software configuration. In 2012 34th International Conference on Software Engineering (ICSE). 58–68. https://doi.org/10.1109/ICSE.2012.6227206
  74. Karim Yaghmour. 2003. Building Embedded Linux Systems. O’Reilly Media, Inc.
  75. Moving forward with combinatorial interaction testing. Computer 47, 2 (Feb. 2014), 37–45. https://doi.org/10.1109/MC.2013.408
  76. GUI interaction testing: Incorporating event context. IEEE Transactions on Software Engineering 37, 4 (July 2011), 559–574.
  77. Artifact from ”Maximizing Patch Coverage for Testing of Highly-Configurable Software without Exploding Build Times”. https://doi.org/10.5281/zenodo.10626343
  78. Experimental data for ”Maximizing Patch Coverage for Testing of Highly-Configurable Software without Exploding Build Times”. https://doi.org/10.5281/zenodo.10626233
  79. Sai Zhang and Michael D. Ernst. 2014. Which configuration option should I change?. In Proceedings of the 36th International Conference on Software Engineering (Hyderabad, India) (ICSE 2014). Association for Computing Machinery, New York, NY, USA, 152–163. https://doi.org/10.1145/2568225.2568251
  80. Analyzing the impact of feature changes in Linux. In Proceedings of the Tenth International Workshop on Variability Modelling of Software-intensive Systems. 25–32.
Citations (1)

Summary

We haven't generated a summary for this paper yet.

X Twitter Logo Streamline Icon: https://streamlinehq.com