Commit Graph

17 Commits

Author SHA1 Message Date
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
Tor Arne Vestbø
a5ad123db1 Look for sparsebundle.dmg when setting up tests 2021-06-27 22:07:56 +02:00
Tor Arne Vestbø
fef3aeadfa Share test code between test suites 2021-06-27 22:07:56 +02:00
Tor Arne Vestbø
24400ff67b Use .tst extension for tests suites 2021-06-27 22:07:56 +02:00
Tor Arne Vestbø
d426e4345b Ensure sparsebundlefs process is alive while we're waiting for it 2021-06-27 22:07:55 +02:00
Tor Arne Vestbø
7b7a15e75a Ensure TEST_BUNDLE is set in test suites 2021-06-27 22:07:55 +02:00
Tor Arne Vestbø
c04732613c Run tests with build directory in PATH 2021-06-27 19:55:01 +02:00
Tor Arne Vestbø
ed8c830af8 Remove unused pid variable in tests 2018-09-13 16:37:28 +02:00
Tor Arne Vestbø
cb7bbdffee Convert tests indentation to spaces 2018-09-13 16:36:47 +02:00
Tor Arne Vestbø
7d81b50bb8 Clarify access, ownership, and permissions for mounted sparsebundle
We now reflect the user who mounted the sparsebundle as the owner of
the resulting .dmg file, and try to reflect the state of allow_other
and allow_root through the file permission bits.

These are just informative. The real access control happens in FUSE
based on the allow_other/allow_root options (unless user also passes
the default_permissions option, in which case the permission bits
will also be checked).

Fixes issue #15
2018-09-10 15:22:03 +02:00
Tor Arne Vestbø
84f4844991 Tweak teardown test function style 2018-09-09 02:11:45 +02:00
Tor Arne Vestbø
9405bb2a93 Fix large file support on 32-bit systems
The move from off_t to size_t in 90c81b1776 was misguided. Although
it semantically makes sense to use an unsigned datatype for file sizes,
the size_t data type is only 32-bit wide on 32-bit systems, so the move
broke reading of large sparsebundles on 32-bit systems, since we could
no longer represent the file size.

We now use uint64_t explicitly, which is both unsigned, and wide enough
to represent all the files we want.

The uintmax_t datatype has been demoted to be used only for printing,
to make it clearer what width is actually expected and used in the code.

Fixes #26
2018-09-09 02:06:37 +02:00
Tor Arne Vestbø
d7a1f72062 Add test harness and initial mount test
Tests are run using 'make check', and can be combined with the
existing Makefile targets, e.g. 'make check all' to run checks
on all available platforms.

Pass DEBUG=1 for additional test output.
2018-09-08 22:24:46 +02:00