[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: [PATCH 3/3] hust_test: run-all - show problems with hush - DO NOT
From: Denys Vlasenko <vda.linux () googlemail ! com>
Date: 2009-08-12 17:52:29
Message-ID: 1158166a0908121052x2c0d346av773c56af4eb6c482 () mail ! gmail ! com
[Download RAW message or body]
On Wed, Aug 12, 2009 at 11:29 AM, <monstr@monstr.eu> wrote:
> This patch just show problem which has hush with running this script.
> If you apply it, you can see that tests can be run but there is broken
> reporting when test return 77 for unsupported features because
> I removed there.
Please try attached patch, or try current git.
> Please run origin run-all script to see if is work for you.
With this patch it works, even with CONFIG_NOMMU=y.
I attached the .config. With this config, current git has only two failures:
hush-bugs-and_or_and_backgrounding.tests.fail
hush-bugs-export_exp.tests.fail
They are known bugs.
--
vda
[".config" (application/octet-stream)]
["8.patch" (application/octet-stream)]
diff -d -urpN busybox.7/shell/hush.c busybox.8/shell/hush.c
--- busybox.7/shell/hush.c 2009-08-12 14:53:21.000000000 +0200
+++ busybox.8/shell/hush.c 2009-08-12 19:47:04.000000000 +0200
@@ -6038,6 +6038,8 @@ static struct pipe *parse_stream(char **
dest.o_assignment = NOT_ASSIGNMENT;
}
+ /* Note: nommu_addchr(&ctx.as_string, ch) is already done */
+
switch (ch) {
case '#':
if (dest.length == 0) {
@@ -6061,12 +6063,17 @@ static struct pipe *parse_stream(char **
ch = i_getch(input);
if (ch != '\n') {
o_addchr(&dest, '\\');
- nommu_addchr(&ctx.as_string, '\\');
+ /*nommu_addchr(&ctx.as_string, '\\'); - already done */
o_addchr(&dest, ch);
nommu_addchr(&ctx.as_string, ch);
/* Example: echo Hello \2>file
* we need to know that word 2 is quoted */
dest.o_quoted = 1;
+ } else {
+#if !BB_MMU
+ /* It's "\<newline>". Remove trailing '\' from ctx.as_string */
+ ctx.as_string.data[--ctx.as_string.length] = '\0';
+#endif
}
break;
case '$':
diff -d -urpN busybox.7/shell/hush_test/hush-misc/nommu1.right \
busybox.8/shell/hush_test/hush-misc/nommu1.right
--- busybox.7/shell/hush_test/hush-misc/nommu1.right 1970-01-01 01:00:00.000000000 \
+0100
+++ busybox.8/shell/hush_test/hush-misc/nommu1.right 2009-08-12 19:47:04.000000000 \
+0200 @@ -0,0 +1,7 @@
+Ok
+Ok
+Ok
+Ok
+Ok
+Ok
+Done
diff -d -urpN busybox.7/shell/hush_test/hush-misc/nommu1.tests \
busybox.8/shell/hush_test/hush-misc/nommu1.tests
--- busybox.7/shell/hush_test/hush-misc/nommu1.tests 1970-01-01 01:00:00.000000000 \
+0100
+++ busybox.8/shell/hush_test/hush-misc/nommu1.tests 2009-08-12 19:47:04.000000000 \
+0200 @@ -0,0 +1,12 @@
+(echo \
+Ok)
+( (echo \
+Ok) )
+( ( (echo \
+Ok) ) )
+
+(echo \Ok)
+( (echo \Ok) )
+( ( (echo \Ok) ) )
+
+echo Done
diff -d -urpN busybox.7/shell/hush_test/run-all busybox.8/shell/hush_test/run-all
--- busybox.7/shell/hush_test/run-all 2009-08-12 14:53:21.000000000 +0200
+++ busybox.8/shell/hush_test/run-all 2009-08-12 19:47:04.000000000 +0200
@@ -38,16 +38,16 @@ do_test()
tret=0
cd "$1" || { echo "cannot cd $1!"; exit 1; }
for x in run-*; do
- test -f "$x" || continue
- case "$x" in
- "$0"|run-minimal|run-gprof) ;;
- *.orig|*~) ;;
- #*) echo $x ; sh $x ;;
- *)
- sh "$x" >"../$1-$x.fail" 2>&1 && \
- { echo "$1/$x: ok"; rm "../$1-$x.fail"; } || echo "$1/$x: fail";
- ;;
- esac
+ test -f "$x" || continue
+ case "$x" in
+ "$0"|run-minimal|run-gprof) ;;
+ *.orig|*~) ;;
+ #*) echo $x ; sh $x ;;
+ *)
+ sh "$x" >"../$1-$x.fail" 2>&1 && \
+ { echo "$1/$x: ok"; rm "../$1-$x.fail"; } || echo "$1/$x: fail";
+ ;;
+ esac
done
# Many bash run-XXX scripts just do this,
# no point in duplication it all over the place
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic