Tag / Unit Testing

  • The Linux kernel contains a set of developer unit and regression tests (Kselftests) under tools/testing/selftests; these tests exercise individual code paths in the kernel. In this blog post, I’ll explain how to build and run these tests, run Kselftest on a system it’s built on, and how to install and run tests on a target test system. Even though kselftest’s main purpose is for developer regression test, testers and users can also use it to ensure there are no regressions in a new kernel. Kselftest is run everyday on several Linux kernel trees on the 0-Day and kernelci.org Linux kernel integration test rings. How to Build Kselftest The tests are intended to be run after building, installing, and booting a kernel.

    Boot the new kernel, then execute the following

    Please note, some tests require root privileges. You can run a subset of selftests using “TARGETS” make command […]

    Read More
  • June 29, 2015 - Jon A. Cruz

    How to Make Software Testing Work for You

    Testing is a vital aspect of the software development process. Most software developers should already know this, but if you find yourself working with people who disagree, it might be time to step back and take stock of the situation. Being familiar with common terminology is a good first step (if this topic is new to you, I advise you to read that article), but decisions about the details of testing implementation can often get tricky. The first among these decisions is deciding when it’s necessary to test. Is it Time to Test? For developers, this question has a simple answer: Yes. If you are coding, you should be testing. Between unit testing and system/integration testing, most development phases should be covered by some sort of test. Different phases might involve different types of testing, but some form of testing should be going on throughout. With that said, everything that […]

    Read More
  • April 24, 2015 - Jon A. Cruz

    The Tangled Terms of Testing

    Overview When it comes to testing, most developers admit they probably don’t do as much as they should. Developers, testers and even end users get blocked for various reasons, but one of the initial reasons is becoming overwhelmed by the various terms and approaches. Buzzwords abound, including phrases like: black box, white box, unit, incremental integration, integration, functional, system, end-to-end, sanity, regression, acceptance, load, stress, performance, usability, install/uninstall, security, compatibility, comparison, alpha and beta. Using testing related terms can even influence developers to do the opposite of what they need to. Getting a handle on what exactly “unit testing” means can help break through the quagmire and move on to being more productive. The two subjects being covered here are “levels” of testing and automated/build-time testing. Levels of Testing First, it helps to group a few related terms and lay out their basics. If you group testing by levels, it […]

    Read More