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/tsttest.c:1690: TINFO: LTP version: 20230929-157-g15652c5ae ../lib/tsttest.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
This project is part of:
Hack Week 23
Activity
Comments
Be the first to comment!
Similar Projects
pudc - A PID 1 process that barks to the internet by mssola
Description
As a fun exercise in order to dig deeper into the Linux kernel, its interfaces, the RISC-V architecture, and all the dragons in between; I'm building a blog site cooked like this:
- The backend is written in a mixture of C and RISC-V assembly.
- The backend is actually PID1 (for real, not within a container).
- We poll and parse incoming HTTP requests ourselves.
- The frontend is a mere HTML page with htmx.
The project is meant to be Linux-specific, so I'm going to use io_uring, pidfs, namespaces, and Linux-specific features in order to drive all of this.
I'm open for suggestions and so on, but this is meant to be a solo project, as this is more of a learning exercise for me than anything else.
Goals
- Have a better understanding of different Linux features from user space down to the kernel internals.
- Most importantly: have fun.
Resources
Creating test suite using LLM on existing codebase of a solar router by fcrozat
Description
Two years ago, I evaluated solar routers as part of hackweek24, I've assembled one and it is running almost smoothly.
However, its code quality is not perfect and the codebase doesn't have any testcase (which is tricky, since it is embedded code and rely on getting external data to react).
Before improving the code itself, a testsuite should be created to ensure code additional don't cause regression.
Goals
Create a testsuite, allowing to test solar router code in a virtual environment. Using LLM to help to create this test suite.
If succesful, try to improve the codebase itself by having it reviewed by LLM.
Resources
Port OTPClient to GTK >= 4.18 by pstivanin
Project Description
OTPClient is currently using GTK3 and cannot easily be ported to GTK4. Since GTK4 came out, there have been quite some big changes. Also, there are now some new deprecation that will take effect with GTK5 (and are active starting from 4.10 as warnings), so I need to think ahead and port OTPClient without using any of those deprecated features.
Goal for this Hackweek
- fix the last 3 opened issues (https://github.com/paolostivanin/OTPClient/issues/402, https://github.com/paolostivanin/OTPClient/issues/404, https://github.com/paolostivanin/OTPClient/issues/406) and release a new version
- continue the rewrite from where we left last year
- if possible, finally close this 6 years old issue: https://github.com/paolostivanin/OTPClient/issues/123
pudc - A PID 1 process that barks to the internet by mssola
Description
As a fun exercise in order to dig deeper into the Linux kernel, its interfaces, the RISC-V architecture, and all the dragons in between; I'm building a blog site cooked like this:
- The backend is written in a mixture of C and RISC-V assembly.
- The backend is actually PID1 (for real, not within a container).
- We poll and parse incoming HTTP requests ourselves.
- The frontend is a mere HTML page with htmx.
The project is meant to be Linux-specific, so I'm going to use io_uring, pidfs, namespaces, and Linux-specific features in order to drive all of this.
I'm open for suggestions and so on, but this is meant to be a solo project, as this is more of a learning exercise for me than anything else.
Goals
- Have a better understanding of different Linux features from user space down to the kernel internals.
- Most importantly: have fun.
Resources