CHROMIUM: add warning test to /proc/breakme
authorLuigi Semenzato <semenzato@chromium.org>
Mon, 29 Apr 2013 17:10:25 +0000 (10:10 -0700)
committerChromeBot <chrome-bot@google.com>
Mon, 29 Apr 2013 19:09:31 +0000 (12:09 -0700)
This is mainly for testing the Chrome OS warning collection
and analysis tools.

BUG=chromium:227080
TEST=manually tested

Change-Id: I0a99d2f87cf1e1354a0feaf3cd5386396d7da381
Signed-off-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/49488
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
fs/proc/breakme.c

index 8194361..2191180 100644 (file)
@@ -33,6 +33,9 @@ static ssize_t write_breakme(struct file *file, const char __user *buf,
                /* BUG() */
                else if (!strcmp(kbuf, "bug"))
                        BUG();
+               /* Warning, normally not a crash */
+               else if (!strcmp(kbuf, "warning"))
+                       WARN_ON(1);
                /* hung_task stuck in unkillable D state */
                else if (!strcmp(kbuf, "hungtask"))
                        schedule_timeout_uninterruptible(MAX_SCHEDULE_TIMEOUT);