All About the Linux Application Checker

The Linux Application Checker (also referred to as "AppChecker") is a powerful new tool designed to help software developers target Linux. It draws on the extensive testing framework developed by the Russian Academy of Sciences and the Linux Foundation and leverages the work of the Linux Standard Base (LSB) workgroup.

That's the official version, but what does the tool's functionality really mean to application developers who want to write apps for Linux? In a few words: ease of portability.

In the past, the best strategy for making a Linux application portable was to closely follow the LSB model as much as possible. And while that is still a valid path, there are a number of reasons why application vendors might not want to go for full LSB compliance.

To provide as many choices as possible, the new AppChecker tool is for vendors who are not (yet) planning on pursuing LSB certification as well as those who are, as it analyzes and provides guidance on symbols and libraries that go beyond the LSB.

The "ease" in AppChecker starts from the very first exposure to the tool. After simply downloading the architecture-specific version of AppChecker, you merely unpack the tarball into a destination folder and run AppChecker from there. An embedded web server provides a universal interface for any architecture.

Once you point AppChecker to the binary for the application you want to test, the automated system compares the symbol table of the application's interfaces and libraries to the known values within the 30 LSB-compliant distributions. After the comparison is complete, a detailed report of which distributions your application should run on is provided. This app/distro match gives the developer a strong indication that, after some additional testing and a little tweaking, the tested application should run on the indicated distros.

So, while a positive result from AppChecker does not guarantee that your application will run on all distros out-of-the-box, it can lead you down the path of portability and hopefully reduce your support and porting costs. This allows developers to target the largest market possible and provide choice to their customers without too high of a burden or risk.

The AppChecker really shines when a mismatch is found; it not only tells you there is a potential issue with a particular distribution, it also specifically identifies the missing or incompatible interfaces. Links are provided from these reported interfaces so the developer can dig deeply into exactly how to modify or replace the interface to maximize portability, if they wish.

And, on top of all of this, the AppChecker still performs its original function--reporting on how far along an application is toward LSB compliance, if that is still a goal for the application vendor.

Technical Aspects of AppChecker

Specifically, AppChecker performs these functions:

Checks for cross-distro portability and gives a good indication of how well the app may perform on various distributions of Linux

Gives guidance for application developers on how to enhance the portability of their applications

Gives a good indication of how close the app is to LSB certification

AppChecker works by analyzing the symbols in shared libraries or executables. An attempt is made to resolve the symbols against symbols provided by a distribution, the LSB spec, and other libraries that are part of the application being tested. Since most applications are not shipped with debugging information it is not possible for AppChecker to verify that the type information for used APIs matches the declaration for the interface provided by a distributions libraries or as specified by the LSB.

For example, the layout of a data structure might have changed, or the function parameter that had previously been a 32-bit integer may have been changed to a 64-bit integer. Another problem that cannot be detected by the AppChecker is if the details of a function's behavior changes from one version to another.

Both of these failure modes are prevented by the LSB, which emphasizes detailed specifications that document each library interface's type information and behavior, and provides tests to make sure the behavior of LSB interfaces are correct. These tests are used to assure that an LSB-certified distribution has all of the interfaces guaranteed by the LSB, and that the functions behind those interfaces have the correct type signatures and behaviors.

However, there are many reasons why an interface may not be included in the LSB. The authors/maintainers of the library may not yet be willing to guarantee that the interface is stable and won't change over time; or the interface may not be well documented; or the LSB workgroup may not have yet added the interface or library to the LSB.