@@ -130,7 +130,7 @@ Low-level I/O routines (pread, object reading, CRC verification)
130130bfcfs-freebsd/
131131├── .github/
132132│ └── workflows/
133- │ └── freebsd-build.yml # GitHub Actions CI
133+ │ └── freebsd-build.yml # GitHub Actions CI with tests
134134├── .gitignore # Git ignore rules
135135├── LICENSE # BSD 3-Clause License
136136├── Makefile # Build configuration
@@ -139,7 +139,16 @@ bfcfs-freebsd/
139139├── bfcfs_vfs.c # VFS operations
140140├── bfcfs_vnops.c # Vnode operations
141141├── bfc_format.c # BFC format parsing
142- └── bfc_io.c # I/O routines
142+ ├── bfc_io.c # I/O routines
143+ └── tests/ # ATF test suite
144+ ├── Kyuafile # Test configuration
145+ ├── h_funcs.subr # Test helper functions
146+ ├── mount_test # Mount/unmount tests
147+ ├── read_test # Read operation tests
148+ ├── readdir_test # Directory listing tests
149+ ├── symlink_test # Symlink tests
150+ └── fixtures/ # Test BFC containers
151+ └── README.md # Fixture documentation
143152```
144153
145154## Debugging
@@ -218,14 +227,36 @@ doas kldload ./bfcfs.ko
218227
219228### Testing:
220229
230+ The module includes an ATF-based test suite using Kyua:
231+
232+ ``` sh
233+ # Install test dependencies
234+ doas pkg install kyua
235+
236+ # Load the module
237+ doas kldload ./bfcfs.ko
238+
239+ # Run the test suite
240+ cd tests
241+ doas kyua test
242+
243+ # View test results
244+ kyua report
245+
246+ # Detailed report
247+ kyua report --verbose
248+ ```
249+
250+ #### Manual Testing:
251+
221252``` sh
222253# Create a test mount point
223254doas mkdir -p /mnt/bfc
224255
225256# Mount test container
226257doas mount -t bfcfs -o ro /path/to/test.bfc /mnt/bfc
227258
228- # Run tests
259+ # Run manual tests
229260ls -la /mnt/bfc
230261cat /mnt/bfc/somefile.txt
231262find /mnt/bfc -type f
@@ -234,6 +265,21 @@ find /mnt/bfc -type f
234265doas umount /mnt/bfc
235266```
236267
268+ ### Test Suite Structure:
269+
270+ ```
271+ tests/
272+ ├── Kyuafile # Test configuration
273+ ├── h_funcs.subr # Helper functions
274+ ├── mount_test # Mount/unmount tests
275+ ├── read_test # Read operations tests
276+ ├── readdir_test # Directory listing tests
277+ ├── symlink_test # Symlink support tests
278+ └── fixtures/
279+ ├── README.md # Fixture documentation
280+ └── test.bfc # Test BFC container
281+ ```
282+
237283## License
238284
239285BSD 3-Clause License - See [ LICENSE] ( LICENSE ) file for details
@@ -315,12 +361,12 @@ doas mount -t bfcfs -o ro /var/containers/website.bfc /var/www/html
315361
316362| Feature | BFCFS | SquashFS | ISO9660 | FUSE |
317363| -------------- | ----- | -------- | ------- | ------ |
318- | Read-only | ✅ | ✅ | ✅ | ❌ |
319- | Kernel module | ✅ | ✅ | ✅ | ❌ |
320- | Compression | 🚧 | ✅ | ❌ | Varies |
321- | Encryption | 🚧 | ❌ | ❌ | Varies |
322- | CRC integrity | ✅ | ✅ | ❌ | Varies |
323- | Cross-platform | ✅ | ✅ | ✅ | ✅ |
364+ | Read-only | [ x ] | [ x ] | [ x ] | [ - ] |
365+ | Kernel module | [ x ] | [ x ] | [ x ] | [ - ] |
366+ | Compression | [ ] | [ x ] | [ - ] | Varies |
367+ | Encryption | [ ] | [ - ] | [ - ] | Varies |
368+ | CRC integrity | [ x ] | [ x ] | [ - ] | Varies |
369+ | Cross-platform | [ x ] | [ x ] | [ x ] | [ x ] |
324370| Performance | High | High | High | Medium |
325371
326372## Project Status
@@ -329,20 +375,20 @@ doas mount -t bfcfs -o ro /var/containers/website.bfc /var/www/html
329375
330376### Implemented Features
331377
332- - ✅ Mount/unmount operations
333- - ✅ Directory listing and navigation
334- - ✅ File reading (uncompressed)
335- - ✅ Symlink support
336- - ✅ CRC32C verification
337- - ✅ Hardware-accelerated checksums
378+ - [x] Mount/unmount operations
379+ - [x] Directory listing and navigation
380+ - [x] File reading (uncompressed)
381+ - [x] Symlink support
382+ - [x] CRC32C verification
383+ - [x] Hardware-accelerated checksums
338384
339385### Planned Features (Roadmap)
340386
341- - 🚧 ZSTD decompression support
342- - 🚧 ChaCha20-Poly1305 decryption support
343- - 🚧 Extended attributes
344- - 🚧 Advanced mount options
345- - 🚧 Performance optimizations
387+ - [ ] ZSTD decompression support
388+ - [ ] ChaCha20-Poly1305 decryption support
389+ - [ ] Extended attributes
390+ - [ ] Advanced mount options
391+ - [ ] Performance optimizations
346392
347393## Contributing
348394
0 commit comments