Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions content/blog/2025-06-26-gsoc-testing-framework-part-1.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
title: "GSoC'25: Testing Framework for Unikraft Builds | Part I"
description: |
This GSoC project is aimed to develop a testing framework that is able to multiplex the variety of configuration options, VMMs, hypervisors, architectures, boot protocols, to validate the successful building and running of unikernel images.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This GSoC project is aimed to develop a testing framework that is able to multiplex the variety of configuration options, VMMs, hypervisors, architectures, boot protocols, to validate the successful building and running of unikernel images.
This GSoC project is aimed at developing a testing framework that is able to multiplex the variety of configuration options, VMMs, hypervisors, architectures, boot protocols, to validate the successful building and running of unikernel images.

Remove trailing white spaces.

publishedDate: 2025-06-26
tags:
- gsoc
- gsoc25
- testing & validation
- automation
- devops
authors:
- Shashank Srivastava
---

<img width="100px" src="https://summerofcode.withgoogle.com/assets/media/gsoc-generic-badge.svg" align="right" />

## Project Overview

The aim of this project is to develop a robust testing framework that can handle a wide range of configuration options—covering different VMMs, hypervisors, architectures, and boot protocols—to validate the successful build and execution of unikernel images. The framework, written in Python, is designed to configure, build, run, and test various Unikraft builds, and there’s scope for further improvements and refactoring as we go.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The aim of this project is to develop a robust testing framework that can handle a wide range of configuration optionscovering different VMMs, hypervisors, architectures, and boot protocolsto validate the successful build and execution of unikernel images. The framework, written in Python, is designed to configure, build, run, and test various Unikraft builds, and there’s scope for further improvements and refactoring as we go.
The aim of this project is to develop a robust testing framework that can handle a wide range of configuration options - covering different VMMs, hypervisors, architectures, and boot protocols - to validate the successful build and execution of unikernel images.
The framework, written in Python, is designed to configure, build, run, and test various Unikraft builds.
There’s room for further improvements and refactoring as we go.

Use one sentence per line.


The main focus is to enhance the existing testing infrastructure and make it smooth and intuitive for both Unikraft developers and users. To achieve this, I am working towards the following key goals:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The main focus is to enhance the existing testing infrastructure and make it smooth and intuitive for both Unikraft developers and users. To achieve this, I am working towards the following key goals:
The main focus is to enhance the existing testing infrastructure and make it smooth and intuitive for both Unikraft developers and users.
To achieve this, I am working towards the following key goals:


- Extract and consolidate the testing framework into a dedicated, standalone repository.

- Ensure that the framework works seamlessly with the catalog and catalog-core repositories right out of the box.

- Integrate the framework into the CI/CD pipeline used across Unikraft organization repositories, so that it can automatically validate builds whenever a pull request is opened.

## Current Progress

### Repository Extraction & Modularization

- Migrated the in-development framework from [razvand/generator/new-design](https://github.com/unikraft-upb/catalog/tree/razvand/generator/new-design/utils/new-design) into its own [Git repository](https://github.com/shank250/testing-framework-uk-build/).
- Split monolithic scripts into purpose-driven modules under `src/`, `scripts/`, `docs/` and `utils/`.
- Introduced a fixture that handles the clean-up of the `.tests` directory before each run to ensure a consistent and isolated testing environment.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Introduced a fixture that handles the clean-up of the `.tests` directory before each run to ensure a consistent and isolated testing environment.
- Introduced a fixture that handles the clean-up of the `.tests/` directory before each run to ensure a consistent and isolated testing environment.

End directory names with a slash (/) to make it clear it's a directory.


### Code Quality & Formatting

- Ran `pylint`, resolved high-severity warnings, and tuned its config to reduce noise.
- Enforced consistent style with `black` and organized imports via `isort`.

### Isolated Test Sandboxing (`.app`)

- Implemented a “copy-to-.app” workflow: before testing, all application files are duplicated into a pristine `.app` folder.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Implemented a copy-to-.app workflow: before testing, all application files are duplicated into a pristine `.app` folder.
- Implemented a "copy-to-.app" workflow: before testing, all application files are duplicated into a pristine `.app/` directory.

Use normal ASCII quotes.
Prefer using "directory" instead of "folder".

- Ensures true isolation, reproducibility, safe parallel runs, and easy cleanup of temporary artifacts.

### Documentation

- Added comprehensive docstrings to core classes/functions and “TODO” markers for known gaps.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Added comprehensive docstrings to core classes/functions and TODO markers for known gaps.
- Added comprehensive docstrings to core classes/functions and '"TODO" markers for known gaps.

Use normal ASCII quotes.


## WIP

Currently, I’m actively working on the following two components:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Currently, Im actively working on the following two components:
Currently, I'm actively working on the following two components:

Use normal ASCII quote.


### Finalizing the `TestRunner` class
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Finalizing the `TestRunner` class
### Finalizing the `TestRunner` Class

No trailing whitespaces.
Use blank line after heading.
Capitalize words in titles (except for articles and conjunctions).

The `TestRunner` is responsible for building, running, and testing the final targets. The core implementation is done, but I’m now focusing on extensive testing across various applications to ensure everything works reliably.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The `TestRunner` is responsible for building, running, and testing the final targets. The core implementation is done, but I’m now focusing on extensive testing across various applications to ensure everything works reliably.
The `TestRunner` class is responsible for building, running, and testing the final targets.
The core implementation is done.
I'm next focusing on extensive testing across various applications to ensure everything works reliably.


### README.md parser for dynamic configuration extraction
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### README.md parser for dynamic configuration extraction
### `README.md` Parser for Dynamic Configuration Extraction

No trailing whitespaces.
Use blank line after heading.
Capitalize words in titles (except for articles and conjunctions).

Implemented a parser that processes each application’s `README.md` to extract:
- Memory usage requirements
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Memory usage requirements
- Memory usage requirements

No trailing whitespaces.
Add empty line before and after list of items.

- Port numbers (exposed/public)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Port numbers (exposed/public)
- Port numbers (exposed/public)

No trailing whitespaces.

- Corresponding `curl` command for functional verification
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Corresponding `curl` command for functional verification
- Corresponding `curl` command for functional verification

No trailing whitespaces.


These values are then used to automatically generate the `config.yaml` for each app, simplifying and scaling the test setup process.

## Next Steps

For the upcoming weeks, my focus is to complete the full testing pipeline of the framework and ensure that it works as expected across all applications in the `catalog/library`.

Once that’s done, I will move forward with testing, modifying, and refactoring the framework further to safely integrate support for other application types like `native`, `examples`, and more—ensuring seamless compatibility and stability across the board.
Comment on lines +69 to +71
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
For the upcoming weeks, my focus is to complete the full testing pipeline of the framework and ensure that it works as expected across all applications in the `catalog/library`.
Once that’s done, I will move forward with testing, modifying, and refactoring the framework further to safely integrate support for other application types like `native`, `examples`, and more—ensuring seamless compatibility and stability across the board.
For the upcoming weeks, I plan to:
1. Complete the full testing pipeline of the framework.
1. Ensure the pipeline works as expected across all applications in the [`catalog/library/` directory](https://github.com/unikraft/catalog).
1. Test, modify and refactor the framework further to safely integrate support for other application types like those in the `native/` and `examples/` directories in the [`catalog` repository](https://github.com/unikraft/catalog/tree/main/library) and more.
1. Ensure seamless compatibility and stability across the board.


## Acknowledgement
I would like to sincerely thank my mentors, [Razvan Deaconescu](https://github.com/razvand) and [Razvan Virtan](https://github.com/razvanvirtan), for their constant support and guidance throughout this project.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
I would like to sincerely thank my mentors, [Razvan Deaconescu](https://github.com/razvand) and [Razvan Virtan](https://github.com/razvanvirtan), for their constant support and guidance throughout this project.
I would like to sincerely thank my mentors, [Razvan Deaconescu](https://github.com/razvand) and [Razvan Virtan](https://github.com/razvanvirtan), for their constant support and guidance throughout this project.

Use blank line after heading.


I'm also grateful to the Unikraft community for their warm support and helpfulness.

## About me

I'm [Shashank Srivastava](https://github.com/shank250/) undergraduate student at GL Bajaj Institute of Technology and Management, B. Tech in Computer Science and Engineering with Specialisation in Artificial Intelligence and Machine Learning, with a strong passion for AI and Cloud.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
I'm [Shashank Srivastava](https://github.com/shank250/) undergraduate student at GL Bajaj Institute of Technology and Management, B. Tech in Computer Science and Engineering with Specialisation in Artificial Intelligence and Machine Learning, with a strong passion for AI and Cloud.
I'm [Shashank Srivastava](https://github.com/shank250/), an undergraduate student at GL Bajaj Institute of Technology and Management, B. Tech in Computer Science and Engineering with Specialisation in Artificial Intelligence and Machine Learning, with a strong passion for AI and Cloud.

Feel free to [connect](https://www.linkedin.com/in/shashank-srivastava-375412250/)!