This is an old revision of the document!
CI Test Harness for Bootloader
- Student: Sudhanshu Kashyap (smk@freebsd.org)
- Mentor: Warner Losh (imp@bsdimp.com)
NOTE : This page may not be in latest state and will be essentially a mirror from my personal site: https://books.minetest.in/freebsd/gsoc
Project description
FreeBSD supports multiple architectures, file systems, and disk-partitioning schemes. Currently, there is a script named full-test.sh located in src/tools/boot/ that creates several of these environments but does not test all of them. The proposed idea is to rewrite the script in a language such as Python or Lua, which would allow for testing of all the architecture combinations supported in the first and second-tier support, and provide a report on any broken combinations and expected functionality. Additionally, providing Linux Boot support using Linux EFI shim(EDK) II for amd64 and arm64. If time permits, further exploration could be done to integrate the script into the existing build infrastructure (either Jenkins or Github Actions) to generate a comprehensive summary of the test results.
Approach to solving the problem
(Details as to how you intend to approach the problem, if applicable. May include ideas as to how to break the problem down into smaller parts, or notes on research you need to do before settling on your final approach to solving the problem)
Deliverables
- There exists one single main.lua script when invoked will test all the possible arch-interface-file_system-encryption combination
- Figuring out sane defaults for all config combination : Lots of Work \0-0/ :P
- You could provide a config.lua to run custom tests rather than sane defaults
- Try to integrate the script in the existing FreeBSD Infra (If time permits)
Milestones
(5-10 milestones, with dates, indicating when you hope or expect to be able to complete features. This section is mandatory. Please negotiate these with your mentor to make sure you're not under- or over-estimating the amount of work to be done. Please also make sure the following four dates are included within your milestones)
- May 29th: Start of coding
- You'll be doing this in the first week
- June 5th: Week 2
- You plan to do this in the second week
- July 10th - July 14th: Mid-term Evaluations #1
- August 21st - August 28th: Final-term Evaluations #2
- September 5th: End of coding (soft)
- You may wish to use this time to complete documentation etc
- Nov 6th: End of coding (hard)
Weekly Check-in
* Week 1 (29 May)
- Successfully deployed a FreeBSD server and established build system on Racknerd VPS.
- Acquired foundation knowledge of Lua programming and explored the design principles of the project, including module systems.
- Deliberated and finalized the syntax for the project, as well as devised a robust approach to process user inputs effectively and efficiently.
* Week 2 (4 Jun)
- Developed
combination.lua, a script that computes and parses regex strings in the specified format:<arch>-<file-system>-<boot-partition>-<encryption> - Implemented
optparsefor themain.luafile, enabling efficient command-line option parsing and handling. - Created
parser.luato significantly improve accuracy of parsing ofinput.conf, ensuring correct and reliable data extraction.
* Week 3 (12 Jun)
- Configured
ntfyon Warner’s Server to enable seamless notifications for build events. - Successfully built the
freebsd-srcon the server, ensuring a smooth and error-free process. - Established a streamlined development workflow, optimizing collaboration and productivity.
* Week 4 (19 Jun)
- Successfully finalized the
build.luascript, incorporating extensive design and significant rewrites of the previous code. - Achieved comprehensive functionality through careful planning and meticulous execution.
* Week 5 (26 Jun)
- Successfully configured luarocks on FreeBSD Server.
- Conducted a smoke test on the “amd64:amd64-gpt-ufs-none” architecture combination to ensure smooth functionality.
* Week 6 (3 July)
- Wrote
test.luascript, ensuring its successful design and completion. - Evaluated and streamlined the concise reporting process for all build runs.
- Substantially progressed with the coding tasks, meeting expected milestones.
* Week 7 (10 July) - MidTerm Evaluations [Week Off Work]
* Week 8 (17 July)
- Enhanced code styling and resolved potential design issues to improve the overall script.
- Conducted in-depth testing to ensure robustness of the script and addressed several small issues.
* Week 9 (24 July)
* Week 10 (31 July)
* Week 11 (7 Aug)
* Week 12 (14 Aug)
* Week 13 (21 Aug) - Final Evaluations
The Code
Notes
(A place to make notes that will be useful to others looking at your code. You probably don't need to put anything here on day one)
Useful links
(Links to any external resources, work, research etc which may be useful to you or to anybody wanting to understand your work)