Project Description

The Linux Test Project has a solid and strong code base which could be used to create a generic testing framework. The new testing framework might be used by users in order to test their own C code, taking advantage of the LTP features, from test macros to test declaration, plus many other features.

The idea is to see what's the complexity needed to get rid of the LTP specific code and to create a simple prototype with all needed features.

https://github.com/acerv/ltp-core

https://github.com/acerv/ltp-testcases

Monday 06-11-2023

Cleaned up the entire LTP folder, removing tests and unused files. Most of the work was focusing on compiling libltp.so library using Makefile. What I seen is that Makefile is a nice build system, but it requires too much effort in terms of scripting, when it comes to switch from autotools. The library was successfully build, but this method requires too much effort.

For this reason, I will try to take a look at other possibilities, such as cmake/meson.

Tuesday 07-11-2023

After a few try and discussions with the Kernel QA team, I decided to move into meson, which seems to be the best choice in terms of scripting difficulties and nice results. Let's start to hack!!

First of all, I ported the Makefile used to compile libltp.so into meson, including a meson.build file in the main root. For now it's kinda complex, but I will eventually split it into sub-projects in the next days.

A generic TODO list is the following:

  • build libltp.so/.a
  • generate config.h
  • generate syscalls.h
  • create installation

Wednesday 08-11-2023

Meson is the perfect choice to build ltp-core library and I already wrote the code to create config.h, which was actually the most difficult task of all, since all the rules defined in configure.ac to check for headers, functions, types and struct members have to be ported one-by-one from autotools to meson. I managed to do it and the result is pretty good, but it was a hard task.

Tuesday 09-11-2023

Habemus papam! I was able to generate syscalls.h file, recreating the regen.sh script using python language and calling it from meson build system. The meson subdir structure is not good to force syscalls.h and config.h creation, so I had to split meson.build definitions and populate them inside the sub-project directories. All works and we have the first result :)

The library installation is ready and it can be used via meson install command.

Also current LTP tests can be compiled easily:

meson configure -Ddefault_library=static
meson install --destdir=ltp

gcc -Iltp/usr/local/include chdir04.c libltp.a -o chdir04

./chdir04

../lib/tst_test.c:1690: TINFO: LTP version: 20230929-157-g15652c5ae
../lib/tst_test.c:1576: TINFO: Timeout per run is 0h 00m 30s
chdir04.c:29: TPASS: chdir() : ENAMETOOLONG (36)
chdir04.c:29: TPASS: chdir() : ENOENT (2)
chdir04.c:29: TPASS: chdir() : EFAULT (14)

Summary:
passed   3
failed   0
broken   0
skipped  0
warnings 0

Friday 10-11-2023

I was able to compile the entire cve testing suite using ltp-core library :-)

https://github.com/acerv/ltp-testcases

Looking for hackers with the skills:

ltp linux testing framework testingframework meson c

This project is part of:

Hack Week 23

Activity

  • 6 months ago: acervesato added keyword "c" to this project.
  • 6 months ago: acervesato started this project.
  • 6 months ago: acervesato added keyword "ltp" to this project.
  • 6 months ago: acervesato added keyword "linux" to this project.
  • 6 months ago: acervesato added keyword "testing" to this project.
  • 6 months ago: acervesato added keyword "framework" to this project.
  • 6 months ago: acervesato added keyword "testingframework" to this project.
  • 6 months ago: acervesato added keyword "meson" to this project.
  • 7 months ago: acervesato originated this project.

  • Comments

    Be the first to comment!

    Similar Projects

    Authenticated hashes for BTRFS by dsterba

    Project Description

    Implement a checksum ...


    Generic text file preprocessor using custom syntax for define include ifdef by mdati

    Project Description

    Scope of this project...


    Linux incarnation of the Party Parrot by rsimai

    Project Description

    Lesser on the coding s...


    Avahi Integration and Network Connection by vojha

    Avahi Integration and Network Connection

    ...


    Testing and adding GNU/Linux distributions on Uyuni by juliogonzalezgil

    Join the Gitter channel! [https://gitter.im/uy...


    Vulkan Widget for GTK by yudaike

    [comment]: # (Please use the project descriptio...


    Port OTPClient to GTK >= 4.12 by pstivanin

    Project Description

    OTPClient is currentl...


    Deep Packet Inspection: compare the performance between libnetfilter_queue, NF_HOOK and eBPF XDP by nguyens

    Deep Packet Inspection: compare the performan...


    80-bit floats support on x86_64 for Valgrind by mfranc

    [comment]: # (Please use the project descriptio...


    Extend GObject based introspectable API to libzypp by zbenjamin

    [comment]: # (Please use the project descriptio...