bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[BLOCKER] cannot single-step unit tests any more


From: Bruno Haible
Subject: [BLOCKER] cannot single-step unit tests any more
Date: Sun, 16 May 2010 13:36:12 +0200
User-agent: KMail/1.9.9

Hi Jim,

On a glibc system, I cannot single-step unit tests that are built upon
tests/init.sh any more. This is blocking.

I got this skipped test on a glibc system:
  test-verify.sh: skipped test: cannot compile error-free
  SKIP: test-verify.sh
and cannot investigate it!

Here's my attempt at doing so, using the instructions in the init.sh file:

  $ bash
  $ cd gltests/
  $ vi Makefile  # Look at the TESTS_ENVIRONMENT
  $ export srcdir=.
  $ export MAKE=make
  $ . "${srcdir=.}/init.sh"
  /arch/x86-linux/gnu/bin/bash: /arch/x86-linux/gnu/bin/bash: cannot execute 
binary file
  [The current shell is terminated.]

Once again with "set -x":

  $ bash
  $ cd gltests/
  $ set -x
  $ export srcdir=.
  + export srcdir=.
  + srcdir=.
  $ export MAKE=make
  + export MAKE=make
  + MAKE=make
  $ . "${srcdir=.}/init.sh"
  + . ./init.sh
  ++ gl_shell_test_script_='
  test $(echo y) = y || exit 1
  test -z "$EXEEXT" && exit 0
  shopt -s expand_aliases
  alias a-b="echo zoo"
  v=abx
       test ${v%x} = ab \
    && test ${v#a} = bx \
    && test $(a-b) = zoo
  '
  ++ test x = x--no-reexec
  ++ for re_shell_ in '"${CONFIG_SHELL:-no_shell}"' /bin/sh bash dash zsh pdksh 
fail
  ++ test no_shell = no_shell
  ++ continue
  ++ for re_shell_ in '"${CONFIG_SHELL:-no_shell}"' /bin/sh bash dash zsh pdksh 
fail
  ++ test /bin/sh = no_shell
  ++ test /bin/sh = fail
  ++ /bin/sh -c '
  test $(echo y) = y || exit 1
  test -z "$EXEEXT" && exit 0
  shopt -s expand_aliases
  alias a-b="echo zoo"
  v=abx
       test ${v%x} = ab \
    && test ${v#a} = bx \
    && test $(a-b) = zoo
  '
  ++ exec /bin/sh bash --no-reexec
  /arch/x86-linux/gnu/bin/bash: /arch/x86-linux/gnu/bin/bash: cannot execute 
binary file


Two things are wrong here:
1) If I'm already using bash, it MUST NOT do an 'exec', because that kills the
   ability to do single-stepping.
2) The use of "$0". It is meant to denote the test-....sh filename. This CANNOT
   work when single-stepping, because the statements are not contained in a file
   but are executed interactively, one by one.

The ability to do single-stepping is essential. Without this ability, I would
have objected against the introduction of tests/init.sh in gnulib. [1]

Bruno

[1] http://lists.gnu.org/archive/html/bug-gnulib/2009-11/msg00402.html




reply via email to

[Prev in Thread] Current Thread [Next in Thread]