170 Commits

Author SHA1 Message Date
Tor Arne Vestbø
8a914b97df Include pkg-config in dependencies
Fixes #41
2025-01-17 21:40:45 +01:00
Tor Arne Vestbø
5df6fced25 Harden startup logic to detect invalid sparse bundles
Fixes #7
2021-07-07 18:09:39 +02:00
Tor Arne Vestbø
80e3bc108e Update license badge 2021-07-07 17:19:00 +02:00
Tor Arne Vestbø
f88e62672d Update badges 2021-07-07 17:12:17 +02:00
Tor Arne Vestbø
1b75b6a537 Update badges 2021-07-07 17:06:55 +02:00
Tor Arne Vestbø
d6fb55b81f Fix CodeFactor issue 2021-07-07 16:59:52 +02:00
Tor Arne Vestbø
1c6feeafbe Remove trailing space in CodeQL workflow 2021-07-07 16:56:51 +02:00
Tor Arne Vestbø
9a6d871c2e Update license year 2021-07-07 16:10:08 +02:00
Tor Arne Vestbø
40e65844e9 Remove Travis CI yaml file 2021-07-07 16:09:15 +02:00
Tor Arne Vestbø
bef02269ce Update hfsfuse to version 0.153-0c63f43 2021-07-07 01:02:01 +02:00
Tor Arne Vestbø
05edfd72df Don't hide output when building hfsfuse 2021-07-07 00:47:16 +02:00
Tor Arne Vestbø
959734ae53 Check out submodules in CI 2021-07-07 00:43:14 +02:00
Tor Arne Vestbø
f82d710ec8 Run tests on macOS in CI 2021-07-07 00:38:39 +02:00
Tor Arne Vestbø
49678d33e2 Update CI badge from Travis to GitHub 2021-07-06 23:44:44 +02:00
Tor Arne Vestbø
1e1c31622d Update references to OSXFUSE to refer to macFUSE 2021-07-06 23:25:47 +02:00
Tor Arne Vestbø
57fd1d7996 Use macfuse instead of osxfuse in CI 2021-07-06 23:22:08 +02:00
Tor Arne Vestbø
c72ccf1712 Fix architecture in CI configuration 2021-07-06 23:21:14 +02:00
Tor Arne Vestbø
f7cfe7ce93 Add more CI configurations 2021-07-06 23:18:48 +02:00
Tor Arne Vestbø
6553cfd466 Fix CI workflow 2021-07-06 23:00:27 +02:00
Tor Arne Vestbø
f0cb5945c6 Add CI workflow 2021-07-06 22:59:28 +02:00
Tor Arne Vestbø
4420e92b4d Add CodeQL badge 2021-07-06 22:45:23 +02:00
Tor Arne Vestbø
38c680f3d7 Install dependencies in CodeQL workflow 2021-07-06 22:36:19 +02:00
Tor Arne Vestbø
15d3d3821c Add CodeQL workflow 2021-07-06 22:32:29 +02:00
Tor Arne Vestbø
d3cc4b63ff Add install documentation 2021-07-06 22:27:18 +02:00
Tor Arne Vestbø
0c72dd7e42 Use standard variable names for install rules
As per
https://www.gnu.org/software/make/manual/html_node/Directory-Variables.html

The INSTALL_PREFIX variable name has been deprecated in favour of
DESTDIR, so having both of them in the rule didn't make sense.

We now default to /usr/local as the install prefix, as recommended by
the GNU Make manual.
2021-07-06 22:21:36 +02:00
porst17
55f71e014c Add install and uninstall rules to Makefile 2021-07-01 00:44:57 +02:00
Tor Arne Vestbø
69e4d3ab9f Document how to mount APFS partitions
Fixes #36
2021-07-01 00:07:21 +02:00
Tor Arne Vestbø
e5354e8841 Fix CodeFactor issue 2021-06-30 23:27:38 +02:00
Tor Arne Vestbø
06dd45bfd5 Do special case ENOENT after all
Otherwise seeking into a raw dmg file will fail when hitting
parts of it that are not covered by a band. The expectation
in that case is to pad with zeroes, like we do for partial
bands.
2021-06-30 23:22:09 +02:00
Tor Arne Vestbø
b3f62d8f66 Add option to always close band files after use 2021-06-30 23:03:18 +02:00
Tor Arne Vestbø
5b75eeeebd Forward error code from process_band function 2021-06-30 22:52:49 +02:00
Tor Arne Vestbø
324d41ed89 Don't special case ENOENT (no such file) when opening bands
If a band is missing that's an error, and should be reported
as such.
2021-06-30 22:51:06 +02:00
Tor Arne Vestbø
3392ba1be1 Return -1 from sparsebundle_open_file on failure
As per the expectation of the call sites. Returning errno is not
necessary, as the caller can check errno directly.
2021-06-30 22:50:32 +02:00
Tor Arne Vestbø
c5dfc45e30 Use same variable name for band file descriptor 2021-06-30 22:50:32 +02:00
Tor Arne Vestbø
00a45b9edc Keep files open for non-zero-copy reads as well
Opening and closing files is bad for performance, so now that
we accurately track the situation of hitting too many open files
we can keep the band files open, even for the non-readbuf code
path.

This unifies the logic of opening (and caching file descriptors)
between the readbuf and non-readbuf code paths.
2021-06-30 22:50:32 +02:00
Tor Arne Vestbø
b5398b1958 Catch EMFILE instead of trying to compute when we'll hit max open files
The previous logic was flawed anyways, as reading a range could
potentially span multiple bands, but we only checked if we were
just below the max limit.
2021-06-30 22:28:50 +02:00
Tor Arne Vestbø
a52497c2b6 Log when we're opening and closing files for basic reads 2021-06-30 22:28:13 +02:00
Tor Arne Vestbø
fab4ea622e Add test for hitting max open files 2021-06-30 22:28:13 +02:00
Tor Arne Vestbø
80f5a0dda4 Clean up testsuite children before entire testsuite 2021-06-30 22:08:45 +02:00
Tor Arne Vestbø
a4ad1d74c5 Pass mount dir and DMG file out of mount_sparsebundle 2021-06-30 18:23:20 +02:00
Tor Arne Vestbø
4db576a284 Bail out of testsuite doesn't have testcases 2021-06-30 18:23:20 +02:00
Tor Arne Vestbø
b2d42503d4 Verify that testcase is a defined function 2021-06-30 18:23:20 +02:00
Tor Arne Vestbø
f34eb1dac3 Allow running single test by name 2021-06-27 23:54:24 +02:00
Tor Arne Vestbø
47d66c39bb Add option and test for reading without read_buf 2021-06-27 23:46:16 +02:00
Tor Arne Vestbø
365d3a35cd Use hfsfuse to test correctness of sparsebundlefs 2021-06-27 23:32:55 +02:00
Tor Arne Vestbø
970ad5e38d Move allow_other tests into main test suite 2021-06-27 22:07:56 +02:00
Tor Arne Vestbø
3a95b0cd73 Return dmg path and filename from mount_sparsebundle 2021-06-27 22:07:56 +02:00
Tor Arne Vestbø
64a1462dfb Use process group to kill children instead of parent PIDs
Using the process group (now that we've got one that's exclusive
to the testrunner) allows us to also clean up children that have
been detached from their original parent (and now have PID 1 as
their parent).
2021-06-27 22:07:56 +02:00
Tor Arne Vestbø
a215104a15 Run testrunner in its own process group 2021-06-27 22:07:56 +02:00
Tor Arne Vestbø
26a141b86d Only remove test bundle dir if unmount was successful 2021-06-27 22:07:56 +02:00