Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use our fat32 code to create the image of test files #320

Open
SamTebbs33 opened this issue Jun 3, 2022 · 3 comments
Open

Use our fat32 code to create the image of test files #320

SamTebbs33 opened this issue Jun 3, 2022 · 3 comments
Labels
arch: none Affects common code across architectures building Relates to building the kernel enhancement New feature or request proposal A proposal needing further discussion testing Relates to testing the kernel

Comments

@SamTebbs33
Copy link
Collaborator

We currently create an empty fat32 image and then mount it to copy the filesystem test files into it, which requires root permissions. It would be cool to remove the need to mount by using our own fat32 code to build the image. This would have the happy side-effect of allowing us to use docker in CI, speeding up the tests as we won't have to download all of the build dependencies.

@SamTebbs33 SamTebbs33 added enhancement New feature or request arch: none Affects common code across architectures testing Relates to testing the kernel building Relates to building the kernel proposal A proposal needing further discussion labels Jun 3, 2022
@DrDeano
Copy link
Member

DrDeano commented Jun 3, 2022

I did this as I wanted to test the FAT32 driver against a known good image using a external tool. As if creating the images using the driver to test itself might not catch some errors. Unless I am wrong in my assumptions as can create tests or if these tests are already in place to ensure self testing.
Could try mtools as this don't require mounting if this works in docker.
Or as a final option, create the image then commit it to this repo and have steps explaining how the image was made so can be verified.

@SamTebbs33
Copy link
Collaborator Author

Good point, I hadn't thought about the aspect of using a well-trusted external tool. I did try using mtools but I encountered a lot of fat32 test failures (unexpected sector numbers etc.) that I couldn't resolve due to a lack of knowledge of fat32.

I think that using mtools would be the best option though, are you happy to look into that? Otherwise keeping the image in the repo sounds doable to me, we're unlikely to change the fat32 test files often anyway.

@DrDeano
Copy link
Member

DrDeano commented Jun 3, 2022

I shall look into mtools and see what the differences are

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch: none Affects common code across architectures building Relates to building the kernel enhancement New feature or request proposal A proposal needing further discussion testing Relates to testing the kernel
Projects
None yet
Development

No branches or pull requests

2 participants