[parted-devel] t7000-scripting.sh test fails
Petr Uzel
petr.uzel at suse.cz
Tue Jun 2 10:35:09 UTC 2009
On Mon, Jun 01, 2009 at 07:00:34PM +0200, Petr Uzel wrote:
> On Mon, Jun 01, 2009 at 06:17:31PM +0200, Jim Meyering wrote:
> > Petr Uzel wrote:
> > > t7000-scripting.sh test from current master fails:
> > >
> > > ~> ./t7000-scripting.sh
> > > * ok 1: Create the test file
> > > * ok 2: Test the scripting mode of mkpart
> > > * ok 3: Compare the real error and the expected one
> > > * ok 4: Create the test file
> > > * ok 5: Test the interactive mode of mkpart
> > > * ok 6: normalize the actual output
> > > * FAIL 7: Compare the real error and the expected one
> > > compare out errI
> > > * ok 8: Create the test file
> > > * ok 9: Test the scripting mode of mkpartfs
> > > * ok 10: Compare the real error and the expected one
> > > * ok 11: Create the test file
> > > * ok 12: Test the interactive mode of mkpartfs
> > > * ok 13: normalize the actual output
> > > * FAIL 14: Compare the real error and the expected one
> > > compare out errI
> > > * failed 2 among 14 test(s)
> > >
> > >
> > > Following 'patch' fixes it for me:
> > >
> > > ------------------------
> > > --- a/tests/t7000-scripting.sh
> > > +++ b/tests/t7000-scripting.sh
> > > @@ -28,7 +28,7 @@ EOF
> > >
> > > { emit_superuser_warning
> > > sed s/Error/Warning/ errS
> > > - printf 'Is this still acceptable to you?\nYes/No?'; } >> errI || fail=1
> > > + printf 'Is this still acceptable to you?\nYes/No? n\n'; } >> errI || fail=1
> > >
> > > for mkpart in mkpart mkpartfs; do
> > > ------------------------
> > >
> > > Has anybody else encountered this?
> > >
> > > The same happens with 'next' branch.
> >
> > Thanks for the testing and the report.
>
> I just did fresh git clone of parted repository to recheck and answer
> your questions, but:
>
> ~/upstream/parted> ./bootstrap
> ./bootstrap: Bootstrapping from checked-out parted sources...
> consider installing git-merge-changelog from gnulib
> ./bootstrap: getting gnulib files...
> Initialized empty Git repository in /home/puzel/upstream/parted/gnulib/.git/
> git.sv.gnu.org[0: 199.232.41.69]: errno=Connection refused
> fatal: unable to connect a socket (Connection refused)
> Clone of 'git://git.sv.gnu.org/gnulib.git' into submodule path 'gnulib' failed
>
> I expect this is some temporary error...
It works again...
>
> >
> > I cannot reproduce that.
> > However, I recall similar problems when building without readline
> > support. With what options did you configure?
>
> without any options, just ./configure
1) ./configure --without-readline
* test fails (for the reason described above)
* ~> ldd parted/.libs/parted
linux-vdso.so.1 => (0x00007fff5d3ff000)
libparted-1.8.so.1 => not found
libc.so.6 => /lib64/libc.so.6 (0x00007f73158f2000)
/lib64/ld-linux-x86-64.so.2 (0x00007f7315c48000
2) ./configure --with-readline
* test fails (still the same reason)
* ~> ldd parted/.libs/parted
linux-vdso.so.1 => (0x00007fff4d9fe000)
libparted-1.8.so.1 => not found
libreadline.so.6 => /lib64/libreadline.so.6 (0x00007f90a4e75000)
libncurses.so.5 => /lib64/libncurses.so.5 (0x00007f90a4c2d000)
libc.so.6 => /lib64/libc.so.6 (0x00007f90a48d7000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f90a46d3000)
/lib64/ld-linux-x86-64.so.2 (0x00007f90a50ba000)
~> rpm -qf /lib64/libreadline.so.6
libreadline6-6.0-xxx
~> rpm -qf /lib64/libncurses.so.5
libncurses5-5.6-xxx
So perhaps something is wrong with our (SuSE) readline or curses
library?
Any idea what to look for?
>
> >
> > There is a test at the top of that script to ensure it is
> > skipped if parted is built without readline support.
> > In particular, what curses library are you using?
> > I.e., what shared libraries does ldd report your version of parted
> > is using?
>
> I'll answer this when bootstrap works again :)
>
> >
> > In any case, here's a patch that should help you get past that.
> > Your answer to the above might help me fill in the "???" blank
> > in the patch below:
> >
> > BTW, your patch would make the test fail for me.
>
> Well, I've expected that - it was rather an explanation of what's
> going on, not a real patch intended for inclusion
>
> >
> > diff --git a/tests/t7000-scripting.sh b/tests/t7000-scripting.sh
> > index 71251bc..f104146 100755
> > --- a/tests/t7000-scripting.sh
> > +++ b/tests/t7000-scripting.sh
> > @@ -20,7 +20,6 @@ test_description='Make sure the scripting option works (-s) properly.'
> > : ${srcdir=.}
> > . $srcdir/test-lib.sh
> >
> > -config_h=$abs_top_srcdir
> > grep '^#define HAVE_LIBREADLINE 1' $CONFIG_HEADER > /dev/null ||
> > {
> > say "skipping $0: configured without readline support"
> > @@ -38,7 +37,7 @@ normalize_part_diag_ errS || fail=1
> >
> > { emit_superuser_warning
> > sed s/Error/Warning/ errS
> > - printf 'Is this still acceptable to you?\nYes/No?'; } >> errI || fail=1
> > + printf 'Is this still acceptable to you?\nYes/No?\n'; } >> errI || fail=1
> >
> > for mkpart in mkpart mkpartfs; do
> >
> > @@ -72,10 +71,14 @@ for mkpart in mkpart mkpartfs; do
> > "mklabel gpt '$mkpart' primary ext3 1s -1s" > out
> > '
> > # We have to format the output before comparing.
> > + # The contortions are to handle slightly different output
> > + # when parted is built ???
> > test_expect_success \
> > 'normalize the actual output' \
> > '
> > sed "s,
> > *
> > ,,;s, $,," out > o2 && mv -f o2 out &&
> > + sed "s, n\$,," out > o2 && mv -f o2 out &&
> > + { test $(tail -1c out|wc -l) = 0 && echo >> out || :; } &&
> > normalize_part_diag_ out
> > '
> >
> > _______________________________________________
> > parted-devel mailing list
> > parted-devel at lists.alioth.debian.org
> > http://lists.alioth.debian.org/mailman/listinfo/parted-devel
>
> --
> Best regards / s pozdravem
>
> Petr Uzel, Packages maintainer
> ---------------------------------------------------------------------
> SUSE LINUX, s.r.o. e-mail: puzel at suse.cz
> Lihovarská 1060/12 tel: +420 284 028 964
> 190 00 Prague 9 fax: +420 284 028 951
> Czech Republic http://www.suse.cz
>
> _______________________________________________
> parted-devel mailing list
> parted-devel at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/parted-devel
--
Best regards / s pozdravem
Petr Uzel, Packages maintainer
---------------------------------------------------------------------
SUSE LINUX, s.r.o. e-mail: puzel at suse.cz
Lihovarská 1060/12 tel: +420 284 028 964
190 00 Prague 9 fax: +420 284 028 951
Czech Republic http://www.suse.cz
More information about the parted-devel
mailing list