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

[lvm-devel] [PATCH] LVM2: fix t-000-basic.sh


The testcase t-000-basic.sh doesn't work for me.
  - It executes 'lvm' and sees the return code.
    However, when readline support is enabled, it waits for user input.
    So 'make check' stalls.
  - It expects return code '3'.
    However, with the current CVS head, any of the followings return '0':
      o 'lvm' without readline support
      o 'lvm version'
      o 'lvm < /dev/null'

The purpose of the test is to check if lvm is built.
I think the test can be achieved with 'lvm version'.

Jun'ichi Nomura, NEC Corporation of America
If built with readline support, 'lvm' will wait for stdin and
the test will not work.
'lvm version' would work regradless of readline support.
Also, the expected return code is 0.

Index: LVM2.work/test/t-000-basic.sh
--- LVM2.work.orig/test/t-000-basic.sh
+++ LVM2.work/test/t-000-basic.sh
@@ -13,8 +13,8 @@ test_description='Basics: see if tools a
 . ./test-lib.sh
-lvm >/dev/null 2>&1
-if test $? != 3; then
+lvm version >/dev/null 2>&1
+if test $? != 0; then
     echo >&2 'You do not seem to have built lvm yet.'
     exit 1

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