3
# lp-872905: Test for https://launchpad.net/bugs/872905
4
# Author: Colin Ian King <colin.king@canonical.com>
6
# Copyright (C) 2012 Canonical, Ltd.
8
# This program is free software; you can redistribute it and/or
9
# modify it under the terms of the GNU General Public License
10
# as published by the Free Software Foundation; either version 2
11
# of the License, or (at your option) any later version.
13
# This program is distributed in the hope that it will be useful,
14
# but WITHOUT ANY WARRANTY; without even the implied warranty of
15
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
# GNU General Public License for more details.
18
# You should have received a copy of the GNU General Public License
19
# along with this program; if not, write to the Free Software
20
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22
test_script_dir=$(dirname $0)
26
. ${test_script_dir}/../lib/etl_funcs.sh
30
etl_remove_test_dir $test_dir
36
trap test_cleanup 0 1 2 3 15
41
test_dir=$(etl_create_test_dir `basename $0`) || exit
42
test_file="${test_dir}/test_file"
44
lower_test_dir=$(etl_find_lower_path $test_dir)
52
dd if=/dev/zero of=${lower_test_dir}/filler bs=4K > /dev/null 2>&1
55
# Now attempt to create an upper and see how big it is
57
touch $test_file >& /dev/null
63
lower_test_file=$(etl_find_lower_path $test_file)
69
# We shouldn't have a lower file created of zero bytes size if
72
sz=$(stat -c%s $lower_test_file)
73
if [ $sz -ne 0 ]; then