2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (C) 2017 CTERA Networks. All Rights Reserved.
7 # Check stale handles pointing to unlinked files
8 # and non-stale handles pointing to linked files
11 _begin_fstest auto quick exportfs
13 # Import common functions.
16 # real QA test starts here
18 # Modify as appropriate.
21 # _require_exportfs already requires open_by_handle, but let's not count on it
22 _require_test_program "open_by_handle"
26 testdir=$TEST_DIR/$seq-dir
29 # Create empty test files in test dir
36 $here/src/open_by_handle -c $dir $NUMFILES
39 # Test encode/decode file handles
45 echo test_file_handles $* | _filter_test_dir
46 $here/src/open_by_handle $opt $dir $NUMFILES
49 # Check stale handles to deleted files
50 create_test_files $testdir
51 test_file_handles $testdir -d
53 # Check non-stale handles to linked files
54 create_test_files $testdir
55 test_file_handles $testdir
57 # Check non-stale handles to files that were hardlinked and original deleted
58 create_test_files $testdir
59 test_file_handles $testdir -l
60 test_file_handles $testdir -u