3
# mmap-bmap.sh : Test to see if bmap from upper is a subset of the lower
5
# Author: Colin Ian King <colin.king@canonical.com>
7
# Copyright (C) 2013 Canonical Ltd.
9
# This program is free software; you can redistribute it and/or
10
# modify it under the terms of the GNU General Public License
11
# as published by the Free Software Foundation version 2
14
# This program is distributed in the hope that it will be useful,
15
# but WITHOUT ANY WARRANTY; without even the implied warranty of
16
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
# GNU General Public License for more details.
19
# You should have received a copy of the GNU General Public License
20
# along with this program; if not, write to the Free Software
21
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23
test_script_dir=$(dirname $0)
27
. ${test_script_dir}/../lib/etl_funcs.sh
31
etl_remove_test_dir $test_dir
37
trap test_cleanup 0 1 2 3 15
43
test_dir=$(etl_create_test_dir) || exit
44
test_file="${test_dir}/test_file"
46
dd if=/dev/zero of=$test_file bs=1M count=1 > /dev/null 2>&1 || exit
47
lower_test_file=$(etl_find_lower_path $test_file)
48
if [ $? -ne 0 ] || [ -z "$lower_test_file" ]; then
52
${test_script_dir}/mmap-bmap/test $lower_test_file $test_file || exit