summaryrefslogtreecommitdiff
path: root/tests/xfs/260
blob: a780365f904803d4770af2d4bb509b5074508232 (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
#! /bin/bash
# SPDX-License-Identifier: GPL-2.0
# Copyright (c) 2020 Red Hat, Inc.. All Rights Reserved.
#
# FS QA Test 260
#
# Verify that an attempt to create a too-small device with stripe geometry,
# is handled gracefully instead of hitting an assert in align_ag_geometry()
#
# This test verifies the problem fixed in xfsprogs with commit
# (mkfs.xfs: fix ASSERT on too-small device with stripe geometry)
#

. ./common/preamble
_begin_fstest auto quick mkfs

# Override the default cleanup function.
_cleanup()
{
	cd /
	rm -f $tmp.*
	rm -f $localfile
}

# Import common functions.

echo 'Silence is golden'

_supported_fs xfs
_require_test

localfile=$TEST_DIR/$seq.$$

$XFS_IO_PROG -f -c "truncate 10444800" $localfile

$MKFS_XFS_PROG -dsu=65536,sw=1 $localfile >> $seqres.full 2>&1

[ $? -ne 1 ] && echo "${MKFS_XFS_PROG} should fail gracefully"

# success, all done
status=0
exit