open_by_handle: test directory file handle
authorAmir Goldstein <amir73il@gmail.com>
Thu, 2 Nov 2017 10:15:36 +0000 (12:15 +0200)
committerEryu Guan <eguan@redhat.com>
Fri, 10 Nov 2017 04:33:37 +0000 (12:33 +0800)
commitfcaeb02ed177ef8fd72b73465089c9fc0e2b31f9
treef6d1b209353c1b728087afaf4a69e99403072dfb
parent31ce8beba2edc743c7a346a009d4e21f8cae14be
open_by_handle: test directory file handle

usage: open_by_handle -cp <test_dir> [N]
usage: open_by_handle  -p <test_dir> [N]
usage: open_by_handle -dp <test_dir> [N]

With -p flag, create/delete also the test_dir itself and try to open by
handle also test_dir itself after droping caches and use dir fd to test
faccessat() of a file inside dir.
mount_fd argument to open_by_handle_at() is open fd of test_dir's parent.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
src/open_by_handle.c