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