[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-tar] GNU tar 1.22.91(b) on Darwin 9.8.0
From: |
Eric Blake |
Subject: |
Re: [Bug-tar] GNU tar 1.22.91(b) on Darwin 9.8.0 |
Date: |
Wed, 03 Mar 2010 08:24:33 -0700 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 |
According to Sergey Poznyakoff on 3/3/2010 8:12 AM:
> Hi Denis,
>
>> The testsuite is OK except for the item #28 (extracting selected
>> members from pax), where
>> a sparse file is used. Since Darwin HFS is not capable of sparse
>> files, this test, unless
>> it is modified, should deserve skipping, in the same way as the other
>> sparse*.at's.
>
> I see. Definitely, it should be skipped in such case. I'll try to
> figure out a reliable way of detecting whether the FS supports sparse
> files or not.
Coreutils also has tests that skip on FS that lack sparse support. You
also have to make sure a file is large enough to show up as sparse (NTFS
requires 128k). coreutils/tests/cp/sparse uses this:
# Does the current (working-dir) file system support sparse files?
require_sparse_support_()
{
test $# = 0 || framework_failure
# Test whether we can create a sparse file.
# For example, on Darwin6.5 with a file system of type hfs, it's not
possible.
# NTFS requires 128K before a hole appears in a sparse file.
t=sparse.$$
dd bs=1 seek=128K of=$t < /dev/null 2> /dev/null
set x `du -sk $t`
kb_size=$2
rm -f $t
if test $kb_size -ge 128; then
skip_test_ 'this file system does not support sparse files'
fi
}
require_sparse_support_
# Create a sparse file.
# It has to be at least 128K in order to be sparse on some systems.
# Make its size one larger than 128K, in order to tickle the
# bug in coreutils-6.0.
size=`expr 128 \* 1024 + 1`
dd bs=1 seek=$size of=sparse < /dev/null 2> /dev/null || framework_failure
--
Eric Blake address@hidden +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature