[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] tests init: new subroutine 'fatal_', for hard errors
From: |
Stefano Lattarini |
Subject: |
Re: [PATCH] tests init: new subroutine 'fatal_', for hard errors |
Date: |
Tue, 7 Jun 2011 14:46:46 +0200 |
User-agent: |
KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; ) |
On Tuesday 07 June 2011, Jim Meyering wrote:
> Hi Stefano,
>
Hello Jim, thanks for the quick review.
> Thanks for the patch. This looks fine, though you might want
> to adjust the commit log and ChangeLog nits:
>
> Stefano Lattarini wrote:
> > Before this patch, the only way offered by tests/init.sh to
> > properly signal an hard error was the `framework_failure_'
>
> s/an hard/a hard/
>
> > subroutine. But the error message issued by that subroutine,
>
> "function" sounds a little better ;-)
> s/subroutine/function/
> (multiple times)
>
Done in the attached patch. If this amended patch is OK, please
go ahead and apply it, because I don't have pushing right for
gnulib.
Thanks,
Stefano
From cd469c9a1b95b023407f58fa433e672044b3d7fd Mon Sep 17 00:00:00 2001
Message-Id: <address@hidden>
From: Stefano Lattarini <address@hidden>
Date: Tue, 7 Jun 2011 13:27:00 +0200
Subject: [PATCH] tests init: new function 'fatal_', for hard errors
Before this patch, the only way offered by tests/init.sh to
properly signal a hard error was the `framework_failure_'
function. But the error message issued by that function,
as its name would suggest, refers to a set-up failure in the
testsuite, while hard errors can obviously also be due to
other reasons. The best way to fix this inconsistency is to
introduce a new function with a more general error message.
* tests/init.sh (fatal_): New function.
---
ChangeLog | 12 ++++++++++++
tests/init.sh | 1 +
2 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 506a079..c706c10 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2011-06-07 Stefano Lattarini <address@hidden>
+
+ tests init: new function 'fatal_', for hard errors
+ Before this patch, the only way offered by tests/init.sh to
+ properly signal a hard error was the `framework_failure_'
+ function. But the error message issued by that function,
+ as its name would suggest, refers to a set-up failure in the
+ testsuite, while hard errors can obviously also be due to
+ other reasons. The best way to fix this inconsistency is to
+ introduce a new function with a more general error message.
+ * tests/init.sh (fatal_): New function.
+
2011-06-06 Eric Blake <address@hidden>
canonicalize-lgpl: use common idiom
diff --git a/tests/init.sh b/tests/init.sh
index 294dcdd..b5379fa 100644
--- a/tests/init.sh
+++ b/tests/init.sh
@@ -77,6 +77,7 @@ Exit () { set +e; (exit $1); exit $1; }
warn_ () { echo "$@" 1>&$stderr_fileno_; }
fail_ () { warn_ "$ME_: failed test: $@"; Exit 1; }
skip_ () { warn_ "$ME_: skipped test: $@"; Exit 77; }
+fatal_ () { warn_ "$ME_: hard error: $@"; Exit 99; }
framework_failure_ () { warn_ "$ME_: set-up failure: $@"; Exit 99; }
# Sanitize this shell to POSIX mode, if possible.
--
1.7.2.3