From: Jordan Uggla <jordan.uggla@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: [PATCH] Re: ACPI halt failures in tests
Date: Thu, 23 Dec 2010 01:07:15 -0800 [thread overview]
Message-ID: <AANLkTinLORsN9-uDi-j8JOH5eJB-rFDotGLEQL3NRka4@mail.gmail.com> (raw)
In-Reply-To: <20101123152936.GF21862@riva.ucam.org>
On Tue, Nov 23, 2010 at 7:29 AM, Colin Watson <cjwatson@ubuntu.com> wrote:
> I occasionally get "ACPI shutdown failed" in qemu during tests. Since
> this is printed with grub_printf rather than with grub_dprintf or
> whatever, it shows up in the test output and causes tests to fail. It
> only fails some of the time on my system (less than half). I've tried
> to insert 'set debug=acpi' into the grub-shell test setup, but it
> stubbornly succeeds when I do that, so I'm not really sure what else to
> try.
>
> The system seems to shut down happily anyway, presumably because it goes
> on to try other boot methods. Should we maybe downgrade this to a debug
> message?
I think it's more likely a race condition of sorts; it's assumed that
the code that prints "ACPI shutdown failed" is unreachable when ACPI
shutdown succeeds, since the code comes after shutdown has been
requested. Part of the reason I think this is that the symptom I've
been seeing is just "A" or "AC" being printed, which means that the
shutdown is not synchronous (it's happening in the middle of a
printf). Since in real hardware I can't see this being much of a
problem (except maybe causing false alarms for people who log serial
output), and it would be good to have some type of message on the
screen when ACPI shutdown does fail, I don't think this should be just
a dprintf. Instead I think that the unit test's grub.cfg should
disable serial terminal just before running halt as a work around.
=== modified file 'ChangeLog'
--- ChangeLog 2010-12-10 12:56:45 +0000
+++ ChangeLog 2010-12-23 09:02:56 +0000
@@ -1,3 +1,7 @@
+2010-12-23 Jordan Uggal <jordan.uggla@gmail.com>
+ * tests/util/grub-shell.in: Supress "ACPI shutdown failed" error
+ to keep unit tests from failing when they shouldn't.
+
2010-12-10 Colin Watson <cjwatson@ubuntu.com>
* .bzrignore: Ignore grub-core/rs_decoder.S.
=== modified file 'tests/util/grub-shell.in'
--- tests/util/grub-shell.in 2010-10-18 20:50:01 +0000
+++ tests/util/grub-shell.in 2010-12-23 09:04:34 +0000
@@ -132,6 +132,8 @@
cat <<EOF >>${cfgfile}
source /boot/grub/testcase.cfg
+terminal_output console # Stop serial output to supress
+ # "ACPI shutdown failed" error.
halt
EOF
--
Jordan Uggla (Jordan_U on irc.freenode.net)
next prev parent reply other threads:[~2010-12-23 9:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-23 15:29 ACPI halt failures in tests Colin Watson
2010-12-23 9:07 ` Jordan Uggla [this message]
2010-12-23 11:51 ` [PATCH] " Colin Watson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTinLORsN9-uDi-j8JOH5eJB-rFDotGLEQL3NRka4@mail.gmail.com \
--to=jordan.uggla@gmail.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).