* [BUG][PATCH] Bug fix and a test case for the last semicolon behavior in grub-script
@ 2010-03-22 12:18 BVK Chaitanya
2010-03-26 15:19 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 1 reply; 2+ messages in thread
From: BVK Chaitanya @ 2010-03-22 12:18 UTC (permalink / raw)
To: The development of GRUB 2
[-- Attachment #1: Type: text/plain, Size: 260 bytes --]
Hi,
GRUB script has a bug in identifying semicolon character at the end of
a command line; it raises an unnecessary syntax error. Attached patch
has a fix and a test case for that bug.
It is pushed into branches/semicolon-test branch.
--
bvk.chaitanya
[-- Attachment #2: semicolon-test.patch.txt --]
[-- Type: text/plain, Size: 4099 bytes --]
# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: bvk.groups@gmail.com-20100322083320-62qfphq8t6utvlx6
# target_branch: file:///home/bvk/Work/grub2/mainline/
# testament_sha1: b34fa1addf6d937190819406127d3e76b86623a3
# timestamp: 2010-03-22 17:44:27 +0530
# base_revision_id: bvk.groups@gmail.com-20100314170717-\
# q8ppihzgyjyifcke
#
# Begin patch
=== modified file 'conf/tests.rmk'
--- conf/tests.rmk 2010-01-22 13:37:27 +0000
+++ conf/tests.rmk 2010-03-22 08:32:48 +0000
@@ -50,6 +50,9 @@
check_SCRIPTS += grub_script_vars1
grub_script_vars1_SOURCES = tests/grub_script_vars1.in
+check_SCRIPTS += grub_script_final_semicolon
+grub_script_final_semicolon_SOURCES = tests/grub_script_final_semicolon.in
+
# List of tests to execute on "make check"
# SCRIPTED_TESTS = example_scripted_test
# SCRIPTED_TESTS += example_grub_script_test
@@ -59,6 +62,7 @@
SCRIPTED_TESTS = grub_script_echo1
SCRIPTED_TESTS += grub_script_echo_keywords
SCRIPTED_TESTS += grub_script_vars1
+SCRIPTED_TESTS += grub_script_final_semicolon
# dependencies between tests and testing-tools
$(SCRIPTED_TESTS): grub-shell grub-shell-tester
=== modified file 'script/parser.y'
--- script/parser.y 2010-01-25 16:31:14 +0000
+++ script/parser.y 2010-03-22 08:33:20 +0000
@@ -92,7 +92,7 @@
{
$$ = 0;
}
- | script statement delimiter
+ | script statement delimiter newlines0
{
struct grub_script_cmdblock *cmdblock;
cmdblock = (struct grub_script_cmdblock *) $1;
=== added file 'tests/grub_script_final_semicolon.in'
--- tests/grub_script_final_semicolon.in 1970-01-01 00:00:00 +0000
+++ tests/grub_script_final_semicolon.in 2010-03-22 08:32:48 +0000
@@ -0,0 +1,10 @@
+#! /bin/sh -e
+
+@builddir@/grub-script-check <<EOF
+echo one;
+echo one; echo two
+echo one; echo two;
+echo one ; echo two ;
+echo one ; echo two ; echo three
+echo one; echo two ; echo three;
+EOF
# Begin bundle
IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWc90qW0AA3jfgBAQeGv//18o
3wC////0YAafebAo05VgqBRQFAaUm0j0noT1BpvUnqaaAAAAAAAlIkn6mU8maZAJADNQaBiaDRhA
OYTAJgBMJhNMAAAmTTQMJEiEm0Ymk9U2oxNPITTYiGmR5QGTIOYTAJgBMJhNMAAAmTTQMJIgmgjT
CGhTyaGoeqaZHqGhoAaaH+Xp5YZ81SbmP6Z7fwNCEONvAjRkW3Nx3VxwnMRFgOc80RbVjM2Q5LMZ
Di6kkZDGV54UTs1nfoWjuKxpsG7vBL9zOAk4vvzzoigzudLINFEN4LObu8v7C23BKcXtpPwYh45O
GTcAJqYAPyg8lAJyaRXoTlilaWt40GYp5kpftgBGTiXXxqY/f6DVaq9zl58/7RxGQGvYKaquxHO+
YbqHsIr+qyhkkdhrj+wFgApGC5rYEK8R3f47atk4Q44hWJOXifXfFIUQcO7pCincci/qbIiJHlOs
4G+arB38fwirlakFoV92AkhtXGN0yZcfMPvMEiW13gme8dIV9Adcgy+s7BSTFzSJmNJrAawbKO3p
jyN94W75xovyDelisT5ikLIoGMNOHc/AT4WQrOW1BLGA1ATyYIoybEa4w7I6hrhjgLBJLkuWpIGa
2SQT2bUXwNpImMkQUo12mGIQlbIpm4isC8x4pFf0SOAvea0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xcKJGSrPMCbo4B2iK+
YC/cyMUhy7IZMl7vraaKFwrQ9y4UGAV6RiHwDRbxZ+Isgx18ODula4HcrHkC1nM3Ip46kipH1LjH
adAFILVQeCBhTRCQCfqWcc7AKixzsxNrxlmn6HNyttlCwQNcRYHOxvKZWZGGIBo+MT2Zr1B7RRIA
QXcUjWMOMpQtKW3mZg0EuhvB1Wb9xWFwGtJkQdLUeAqIlJBnz6kbAF6xaJFotWiCgCzFyKkjsepI
9iRVokVIyrNwvh3mVAZnXowycMDsuSy1B2WhYbz/v/F3JFOFCQz3SpbQ
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [BUG][PATCH] Bug fix and a test case for the last semicolon behavior in grub-script
2010-03-22 12:18 [BUG][PATCH] Bug fix and a test case for the last semicolon behavior in grub-script BVK Chaitanya
@ 2010-03-26 15:19 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 0 replies; 2+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2010-03-26 15:19 UTC (permalink / raw)
To: The development of GNU GRUB
[-- Attachment #1: Type: text/plain, Size: 608 bytes --]
BVK Chaitanya wrote:
> Hi,
>
>
> GRUB script has a bug in identifying semicolon character at the end of
> a command line; it raises an unnecessary syntax error. Attached patch
> has a fix and a test case for that bug.
>
> It is pushed into branches/semicolon-test branch.
>
>
Please commit
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 293 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-03-26 15:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-22 12:18 [BUG][PATCH] Bug fix and a test case for the last semicolon behavior in grub-script BVK Chaitanya
2010-03-26 15:19 ` Vladimir 'φ-coder/phcoder' Serbinenko
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.