From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1NDKpL-000384-46 for mharc-grub-devel@gnu.org; Wed, 25 Nov 2009 11:34:47 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NDKpJ-00037E-DK for grub-devel@gnu.org; Wed, 25 Nov 2009 11:34:45 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NDKpF-00035S-Ud for grub-devel@gnu.org; Wed, 25 Nov 2009 11:34:45 -0500 Received: from [199.232.76.173] (port=40692 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NDKpF-00035N-Nq for grub-devel@gnu.org; Wed, 25 Nov 2009 11:34:41 -0500 Received: from moutng.kundenserver.de ([212.227.17.8]:50361) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NDKpF-0000sT-7L for grub-devel@gnu.org; Wed, 25 Nov 2009 11:34:41 -0500 Received: from [85.180.5.7] (e180005007.adsl.alicedsl.de [85.180.5.7]) by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis) id 0LeS5t-1NwIcX0IUn-00q5Ol; Wed, 25 Nov 2009 17:34:40 +0100 From: Felix Zielcke To: The development of GNU GRUB In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Date: Wed, 25 Nov 2009 17:34:39 +0100 Message-ID: <1259166879.2806.9.camel@fz.local> Mime-Version: 1.0 X-Mailer: Evolution 2.29.2 Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX18VZWdwSd2ypgEgxCPaEFpik7mTFVep/2lVzQq ALr0IQBB+Zg2YksiEzTps+MwhhvZD1iCr5evqEVzt+vq1twfe9 lJOaKtXVsqdd1tF3rBt4l+8OzNdMsEU X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: [RFC][PATCH] Basic unit testing support for GRUB X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2009 16:34:46 -0000 Am Freitag, den 13.11.2009, 23:15 +0530 schrieb BVK: > Hi, > > > Attached is the (experimental branch) patch for unit testing that I > have in mind for GRUB. Please let me know your comments. > > It provides "make check" target which would build and execute test > programs from "tests" directory. We can write small programs to test > specific functions in GRUB. For example, attached patch has sample > program comparing grub_sprintf behavior against standard sprintf > output (from glibc). > > Note that it currently has few gotchas, like using TARGET_CC instead > of BUILD_CC, no support for XPASS, XFAIL tests, etc. Thanks for your work. A really useful test and hopefully not complicated to implement would be if the config generated by grub-mkconfig (with e.g. 1 fake linux kernel) can be parsed by sh.mod and only uses commands listed in commands.lst Reasoning: With current trunk grub-mkconfig this line ends up in grub.cfg: menuentry "Debian, with Linux GNU/Linux" {menuentry "2.6.31-1-amd64, with Linux " { insmod ext2 and of course this totally breaks the parser. -- Felix Zielcke Proud Debian Maintainer and GNU GRUB developer