2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2014 Filipe Manana. All Rights Reserved.
5 # FS QA Test No. btrfs/051
7 # Regression test for btrfs send where long paths (exceeding 230 characters)
8 # made send produce paths with random characters from a memory buffer returned
9 # by kmalloc, as send forgot to populate the new buffer with the path string.
11 # This issue is fixed by the following linux kernel btrfs patch:
13 # Btrfs: send, fix corrupted path strings for long paths
16 _begin_fstest auto quick send
18 # Override the default cleanup function.
21 rm -fr $send_files_dir
25 # Import common functions.
28 # real QA test starts here
34 send_files_dir=$TEST_DIR/btrfs-test-$seq
36 rm -fr $send_files_dir
39 _scratch_mkfs >/dev/null 2>&1
42 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#"
45 echo "hello world" > $TEST_PATH/amaiAdvancedStreamingPlugin.txt
47 _run_btrfs_util_prog subvolume snapshot -r $SCRATCH_MNT $SCRATCH_MNT/mysnap1
48 run_check $FSSUM_PROG -A -f -w $send_files_dir/1.fssum $SCRATCH_MNT/mysnap1
49 _run_btrfs_util_prog send -f $send_files_dir/1.snap $SCRATCH_MNT/mysnap1
54 _scratch_mkfs >/dev/null 2>&1
57 _run_btrfs_util_prog receive -f $send_files_dir/1.snap $SCRATCH_MNT
58 run_check $FSSUM_PROG -r $send_files_dir/1.fssum $SCRATCH_MNT/mysnap1