common: kill _supported_os
[xfstests-dev.git] / tests / generic / 246
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2010 Christoph Hellwig.  All Rights Reserved.
4 #
5 # FS QA Test No. 246
6 #
7 # Check that truncation after failed writes does not zero too much data.
8 #
9 # Based on a bug report and testcase from
10 # Marius Tolzmann <tolzmann@molgen.mpg.de>
11 #
12 seq=`basename $0`
13 seqres=$RESULT_DIR/$seq
14 echo "QA output created by $seq"
15
16 here=`pwd`
17 tmp=/tmp/$$
18 status=1        # failure is the default!
19
20 # get standard environment, filters and checks
21 . ./common/rc
22 . ./common/filter
23
24 # real QA test starts here
25 _supported_fs generic
26 _require_test
27
28 file=$TEST_DIR/mmap-writev
29
30 _cleanup()
31 {
32         rm -rf $file
33         rm -rf $file.NEW
34 }
35
36 trap "_cleanup ; exit \$status" 0 1 2 3 15
37
38 echo -n "cccccccccc" > $file
39 $here/src/t_mmap_writev $file $file.NEW
40 od -t x2 $file.NEW
41
42 status=0
43 exit $status