-
Notifications
You must be signed in to change notification settings - Fork 97
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
Add tests for command-line interface #218
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Apr 27, 2020
Allow overriding the location of fscrypt.conf by setting the FSCRYPT_CONF environmental variable. The CLI tests need this to avoid touching the real /etc/fscrypt.conf.
Allow overriding the mountpoint where login protectors are stored by setting the FSCRYPT_ROOT_MNT environmental variable. The CLI tests need this to avoid touching the real "/".
Allow setting FSCRYPT_CONSISTENT_OUTPUT=1 in the environment to cause policies and protectors to sorted by last modification time. The CLI tests need this to make the output of 'fscrypt' ordered in a consistent way with regard to the operations performed.
Add a framework for writing automated tests of the fscrypt command-line tool. See cli-tests/README.md for details.
Enforce that all the cli-test scripts pass 'shellcheck'.
Test changing the passphrase of a custom_passphrase protector.
Add general tests for 'fscrypt encrypt'. For protector-specific tests, see t_encrypt_custom, t_encrypt_login, and t_encrypt_raw_key.
Test encrypting a directory using a custom_passphrase protector.
Test encrypting a directory using a login (pam_passphrase) protector.
Test encrypting a directory using a raw_key protector.
Test locking a directory.
Test that fscrypt fails when the filesystem doesn't have the encrypt feature enabled. Then test enabling it.
Test that fscrypt fails when the filesystem doesn't support encryption.
Test that the passphrase hashing seems to take long enough.
Test 'fscrypt setup'.
Test getting global, filesystem, and unencrypted directory status when the filesystem is or isn't set up for fscrypt.
Test unlocking a directory.
Test using v1 encryption policies (deprecated).
Test using v1 encryption policies (deprecated) with use_fs_keyring_for_v1_policies = true.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add tests that directly test the
fscrypt
command-line tool.See
cli-tests/README.md
for information about the test framework.The following test scripts are included:
Unfortunately, we can't actually make Travis CI run these tests yet because they need kernel v5.4 or later, and Travis CI doesn't support an Ubuntu version that has that yet. But for now, they can be run manually using
make cli-test
.