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 seqres=$RESULT_DIR/$seq
12 echo "QA output created by $seq"
16 status=1 # failure is the default!
17 trap "_cleanup; exit \$status" 0 1 2 3 15
25 # get standard environment, filters and checks
29 # real QA test starts here
31 # Modify as appropriate.
34 # _require_exportfs already requires open_by_handle, but let's not count on it
35 _require_test_program "open_by_handle"
39 testdir=$TEST_DIR/$seq-dir
42 # Create empty test files in test dir
49 $here/src/open_by_handle -c $dir $NUMFILES
52 # Test encode/decode file handles
58 echo test_file_handles $* | _filter_test_dir
59 $here/src/open_by_handle $opt $dir $NUMFILES
62 # Check stale handles to deleted files
63 create_test_files $testdir
64 test_file_handles $testdir -d
66 # Check non-stale handles to linked files
67 create_test_files $testdir
68 test_file_handles $testdir
70 # Check non-stale handles to files that were hardlinked and original deleted
71 create_test_files $testdir
72 test_file_handles $testdir -l
73 test_file_handles $testdir -u