rcutorture: WARN_ON_ONCE(1) when detecting an error
authorIngo Molnar <mingo@elte.hu>
Wed, 18 Jun 2008 08:09:48 +0000 (10:09 +0200)
committerIngo Molnar <mingo@elte.hu>
Wed, 18 Jun 2008 08:09:48 +0000 (10:09 +0200)
this makes it easier for automated tests to pick up such failures.

kernel/rcutorture.c

index 0334b6a..0ca7e9b 100644 (file)
@@ -687,6 +687,7 @@ rcu_torture_printk(char *page)
        if (i > 1) {
                cnt += sprintf(&page[cnt], "!!! ");
                atomic_inc(&n_rcu_torture_error);
+               WARN_ON_ONCE(1);
        }
        cnt += sprintf(&page[cnt], "Reader Pipe: ");
        for (i = 0; i < RCU_TORTURE_PIPE_LEN + 1; i++)