Commit Graph

409 Commits

Author SHA1 Message Date
Jakob Unterwurzacher 96750a7d3c tests: exit with correct error code from TestMain
extpass_test and example_filesystems_test did it wrong,
always returning 0.
2016-06-16 21:56:23 +02:00
Jakob Unterwurzacher 82d87ff8ed Add "-ro" (read-only) flag
From the man page:

  **-ro**
  :      Mount the filesystem read-only

Also add a test.
2016-06-16 21:29:22 +02:00
Jakob Unterwurzacher 305e9c1045 tests: add InitFS helper 2016-06-16 21:27:01 +02:00
Jakob Unterwurzacher c89455063c readpassword: create internal package for password reading
* Supports stdin
* Add tests for extpass and stdin

As per user request at https://github.com/rfjakob/gocryptfs/issues/30
2016-06-15 22:44:24 +02:00
Jakob Unterwurzacher 218bf83ce3 tests: spin off TestPasswd from TestInit
Also, capture all stderr and stdout but pass "-q".
This way we get to see error messages if there are any, or
spurious output when there should be none due to "-q".
2016-06-14 23:11:54 +02:00
Jakob Unterwurzacher 37d824c9a8 test: add pingpong.bash and pingping-rsync.bash
Mounts two gocryptfs filesystems, "ping" and "pong" and moves the
linux-3.0 kernel tree back and forth between them.

When called as "pingpong-rsync.bash" it uses "rsync --remove-source-files"
for moving the files, otherwise plain "mv".
2016-06-09 22:20:55 +02:00
Jakob Unterwurzacher 5da292828c fusefrontend: fix chown on dangling symlinks
We (actually, go-fuse) used to call Chown() instead of Lchown()
which meant that the operation would fail on dangling symlinks.

Fix this by calling os.Lchown() ourself. Also add a test case
for this.
2016-06-08 00:32:44 +02:00
Jakob Unterwurzacher f58a8d8740 tests: rename extractloop.md5sums to linux-3.0.md5sums
This file will also be used by other tests, so it should
have a generic name.
2016-06-08 00:32:44 +02:00
Jakob Unterwurzacher c2a5303eeb tests: split example_filesystems into its own package
Running these tests from integration_tests' TestMain() was awkward
because they were run twice with unchanged settings.
integration_tests tests everything with OpenSSL and with native
Go crypto, but this does not take affect for the example filesystems.

To make this work, test_helpers is also split into its own package.
2016-06-07 00:08:56 +02:00