[parted-devel] Running parted-2.2 tests

Gilles Espinasse g.esp at free.fr
Tue Mar 2 15:55:12 UTC 2010


----- Original Message ----- 
From: "Jim Meyering" <jim at meyering.net>
To: "Gilles Espinasse" <g.esp at free.fr>
Cc: "Parted Devel" <parted-devel at lists.alioth.debian.org>
Sent: Tuesday, March 02, 2010 12:41 PM
Subject: Re: [parted-devel] Running parted-2.2 tests
> When you run "make check -C tests", that skips the tests (driven by
> the top-level Makefile.am) that simulate nonstandard sector sizes:
>
>     .PHONY: ss-1024 ss-2048 ss-4096
>     ss-1024 ss-2048 ss-4096:
>             PARTED_SECTOR_SIZE=$(subst ss-,,$@) $(MAKE) check-recursive
>
>     # Run the regression test suite with different settings,
>     # to ensure it works with simulated partition sizes > 512.
>     .PHONY: check-other-sector_sizes
>     check-other-sector_sizes:
>             $(MAKE) ss-1024
>             $(MAKE) ss-2048
>             $(MAKE) ss-4096
>
>     check: check-other-sector_sizes
>
thank for the explanations

> > FAIL: t5000-tags.sh
>
> I haven't looked at this one yet.
> ...
> > FAIL: t0280-gpt-corrupt.sh
> ...
....
> > +++ dd if=loop-file bs=1 skip=1080 count=1
> > 1+0 records in
> > 1+0 records out
> > 1 byte (1 B) copied, 3.2736e-05 s, 30.5 kB/s
> > ++ local orig_pte_name_byte=
> > ++ local new_byte
>
> This may be due to a defective /bin/sh on your system.
> What version of which shell is that?
>
> On other systems (I've tried both debian unstable with bash-4.1.0
> and Fedora 12), we get this:
>
>     orig_pte_name_byte=s
>
> That your shell assigns the empty string there is very suspicious.
>
bash was to patch 33, I upgraded to 37 with no changes

[chroot-i486] root:/$ ls -l /bin/sh
lrwxrwxrwx 1 root root 4 Feb 26 22:20 /bin/sh -> bash
[chroot-i486] root:/$ bash --version
GNU bash, version 4.0.37(1)-release (i686-pc-linux-gnu)


> FYI, in case you can investigate, the code in question is in
tests/t-local.sh:
>
> # Change the name of the first partition in the primary GPT table,
> # thus invalidating the PartitionEntryArrayCRC32 checksum.
> gpt_corrupt_primary_table_()
> {
>   case $# in 2) ;; *) echo "$0: expected 2 args, got $#" >&2; return 1;;
esac
>   local dev=$1
>   local ss=$2
>   case $ss in *[^0-9]*) echo "$0: invalid sector size: $ss">&2; return 1;;
esac
>
>   # get the first byte of the name
>   local orig_pte_name_byte=$(peek_ $dev $(gpt1_pte_name_offset_ $ss)) ||
return 1
>
I don't think I have peek_ and poke_ (the other reason for the failure in
5000)
Where should they come from?

Gilles




More information about the parted-devel mailing list