diff options
author | Andi Kleen <ak@linux.intel.com> | 2009-10-08 09:36:43 +0200 |
---|---|---|
committer | Andi Kleen <ak@linux.intel.com> | 2009-10-08 09:36:43 +0200 |
commit | 39692d8a1ca1157a9465bd1e58f1dbc7a130e898 (patch) | |
tree | 8a0767b67ddc121de859fb90d346afd8e64f29b6 | |
parent | 6cb23d674850528c8337407c03e97bcd347ece93 (diff) | |
download | mce-test-39692d8a1ca1157a9465bd1e58f1dbc7a130e898.tar.gz |
Fix tprctl tester to actually work
Signed-off-by: Andi Kleen <ak@linux.intel.com>
-rw-r--r-- | tsrc/tprctl.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tsrc/tprctl.c b/tsrc/tprctl.c index 51351a7..bcc1e49 100644 --- a/tsrc/tprctl.c +++ b/tsrc/tprctl.c @@ -59,9 +59,9 @@ void test(int early) printf("finished\n"); } else { printf("recovered\n"); - if (seq == 1 && !early) + if (seq == 1 && early) fail("early mode set, but no early kill"); - if (seq == 0 && early) + if (seq == 0 && !early) fail("late mode set, but early kill"); } } @@ -74,10 +74,10 @@ int main(void) err("PR_MCE_KILL_GET"); if (err != PR_MCE_KILL_DEFAULT) fail("starting policy not default"); - if (prctl(PR_MCE_KILL_SET, PR_MCE_KILL_SET, PR_MCE_KILL_LATE) < 0) + if (prctl(PR_MCE_KILL, PR_MCE_KILL_SET, PR_MCE_KILL_LATE, 0, 0, 0) < 0) err("PR_MCE_KILL_SET late"); test(0); - if (prctl(PR_MCE_KILL_SET, PR_MCE_KILL_SET, PR_MCE_KILL_EARLY) < 0) + if (prctl(PR_MCE_KILL, PR_MCE_KILL_SET, PR_MCE_KILL_EARLY, 0, 0, 0) < 0) err("PR_MCE_KILL_SET early"); test(1); err = prctl(PR_MCE_KILL_GET, 0, 0, 0,0,0); @@ -85,7 +85,7 @@ int main(void) err("PR_MCE_KILL_GET"); if (err != PR_MCE_KILL_EARLY) fail("get mode not early after setting"); - if (prctl(PR_MCE_KILL_SET, PR_MCE_KILL_CLEAR, 0, 0,0,0) < 0) + if (prctl(PR_MCE_KILL, PR_MCE_KILL_CLEAR, 0, 0,0,0) < 0) err("PR_MCE_KILL_CLEAR"); err = prctl(PR_MCE_KILL_GET, 0, 0, 0, 0, 0); if (err < 0) |