2 # FS QA Test No. btrfs/051
4 # Regression test for btrfs send where long paths (exceeding 230 characters)
5 # made send produce paths with random characters from a memory buffer returned
6 # by kmalloc, as send forgot to populate the new buffer with the path string.
8 # This issue is fixed by the following linux kernel btrfs patch:
10 # Btrfs: send, fix corrupted path strings for long paths
12 #-----------------------------------------------------------------------
13 # Copyright (c) 2014 Filipe Manana. All Rights Reserved.
15 # This program is free software; you can redistribute it and/or
16 # modify it under the terms of the GNU General Public License as
17 # published by the Free Software Foundation.
19 # This program is distributed in the hope that it would be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU General Public License for more details.
24 # You should have received a copy of the GNU General Public License
25 # along with this program; if not, write the Free Software Foundation,
26 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
27 #-----------------------------------------------------------------------
31 seqres=$RESULT_DIR/$seq
32 echo "QA output created by $seq"
35 status=1 # failure is the default!
36 trap "_cleanup; exit \$status" 0 1 2 3 15
40 rm -fr $send_files_dir
44 # get standard environment, filters and checks
48 # real QA test starts here
56 send_files_dir=$TEST_DIR/btrfs-test-$seq
59 rm -fr $send_files_dir
62 _scratch_mkfs >/dev/null 2>&1
65 TEST_PATH="$SCRATCH_MNT/fdmanana/.config/google-chrome-mysetup/Default/Pepper_Data/Shockwave_Flash/WritableRoot/#SharedObjects/JSHJ4ZKN/s.wsj.net/[[IMPORT]]/players.edgesuite.net/flash/plugins/osmf/advanced-streaming-plugin/v2.7/osmf1.6/Ak#"
68 echo "hello world" > $TEST_PATH/amaiAdvancedStreamingPlugin.txt
70 _run_btrfs_util_prog subvolume snapshot -r $SCRATCH_MNT $SCRATCH_MNT/mysnap1
71 run_check $FSSUM_PROG -A -f -w $send_files_dir/1.fssum $SCRATCH_MNT/mysnap1
72 _run_btrfs_util_prog send $SCRATCH_MNT/mysnap1 -f $send_files_dir/1.snap
77 _scratch_mkfs >/dev/null 2>&1
80 _run_btrfs_util_prog receive $SCRATCH_MNT -f $send_files_dir/1.snap
81 run_check $FSSUM_PROG -r $send_files_dir/1.fssum $SCRATCH_MNT/mysnap1