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 seqres=$RESULT_DIR/$seq
17 echo "QA output created by $seq"
20 status=1 # failure is the default!
21 trap "_cleanup; exit \$status" 0 1 2 3 15
25 rm -fr $send_files_dir
29 # get standard environment, filters and checks
33 # real QA test starts here
39 send_files_dir=$TEST_DIR/btrfs-test-$seq
42 rm -fr $send_files_dir
45 _scratch_mkfs >/dev/null 2>&1
48 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#"
51 echo "hello world" > $TEST_PATH/amaiAdvancedStreamingPlugin.txt
53 _run_btrfs_util_prog subvolume snapshot -r $SCRATCH_MNT $SCRATCH_MNT/mysnap1
54 run_check $FSSUM_PROG -A -f -w $send_files_dir/1.fssum $SCRATCH_MNT/mysnap1
55 _run_btrfs_util_prog send -f $send_files_dir/1.snap $SCRATCH_MNT/mysnap1
60 _scratch_mkfs >/dev/null 2>&1
63 _run_btrfs_util_prog receive -f $send_files_dir/1.snap $SCRATCH_MNT
64 run_check $FSSUM_PROG -r $send_files_dir/1.fssum $SCRATCH_MNT/mysnap1