blob: c96c2154fdb9e09afd8f4a1ea200acb50a9365e1 (
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
#! /bin/bash
# SPDX-License-Identifier: GPL-2.0
# Copyright (c) 2022 Red Hat Inc. All Rights Reserved.
#
# FS QA Test 694
#
# Verify that i_blocks for files larger than 4 GiB have correct
# values.
#
# This test verifies the problem fixed in kernel with commit
# 0c336d6e33f4 exfat: fix incorrect loading of i_blocks for large files
#
. ./common/preamble
_begin_fstest auto
# Override the default cleanup function.
_cleanup()
{
cd /
rm -r -f $tmp.* $junk_dir
}
_supported_fs generic
_fixed_by_kernel_commit 0c336d6e33f4 \
"exfat: fix incorrect loading of i_blocks for large file"
_require_test
_require_fs_space $TEST_DIR $((4 * 1024 * 1024)) #kB
echo "Silence is golden"
junk_dir=$TEST_DIR/$seq
junk_file=$junk_dir/junk
mkdir -p $junk_dir
_create_file_sized 4G $junk_file
if [ $? -ne 0 ]; then
echo "Could not create 4G test file"
fi
iblocks=`stat -c '%b' $junk_file`
_test_cycle_mount
iblocks_after_remount=`stat -c '%b' $junk_file`
if [ "$iblocks" != "$iblocks_after_remount" ]; then
echo "Number of blocks needs to be same: $iblocks, $iblocks_after_remount"
fi
status=0
exit
|