generic: test revalidation of encrypted dentries
authorEric Biggers <ebiggers@google.com>
Thu, 4 May 2017 21:55:48 +0000 (14:55 -0700)
committerEryu Guan <eguan@redhat.com>
Fri, 5 May 2017 09:41:33 +0000 (17:41 +0800)
commit52f9ebbda94d27df8f6e89e150d8f58c66631a86
treed4ca8db2cc97ffb340052122c63de2d4dc2e2770
parent54ac0dd3086d2ab4f153c08811da229a23916c68
generic: test revalidation of encrypted dentries

Add a test which verifies that dentries in an encrypted directory
are invalidated when an encryption key is added --- which should
cause the plaintext filenames to be visible and accessible,
replacing the encoded ciphertext filenames and any negative dentries
for the plaintext names.  This primarily tests for a bug which was
fixed in the v4.5 kernel, plus a v4.6 fix for incorrect RCU usage in
the earlier fix.

Cc: linux-fscrypt@vger.kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
.gitignore
common/encrypt
src/Makefile
src/t_encrypted_d_revalidate.c [new file with mode: 0644]
tests/generic/429 [new file with mode: 0755]
tests/generic/429.out [new file with mode: 0644]
tests/generic/group