generic: test MADV_POPULATE_READ with IO errors
[xfstests-dev.git] / tests / generic / 360
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2016 Red Hat Inc.  All Rights Reserved.
4 #
5 # FS QA Test 360
6 #
7 # Test symlink to very long path, check symlink file contains correct path.
8 #
9 . ./common/preamble
10 _begin_fstest auto quick metadata
11
12 # Import common functions.
13 . ./common/filter
14
15 # real QA test starts here
16 _supported_fs generic
17 _require_test
18 _require_symlinks
19
20 linkfile=$TEST_DIR/$seq.symlink
21 rm -f $linkfile
22
23 FNAME=$(perl -e 'print "a"x254')
24
25 # Create a symlink points to a very long path, so that the path could not be
26 # hold in inode
27 ln -s $FNAME/$FNAME/$FNAME/$FNAME $linkfile
28
29 # Check symlink contains the correct path.
30 # 1023 chars are a bit long for golden image output, compute the md5 checksum
31 readlink $linkfile | md5sum
32
33 # success, all done
34 status=0
35 exit