From 0797de9efe3e7873f404a2364a551180dd1bfa77 Mon Sep 17 00:00:00 2001 From: Eugene Syromyatnikov Date: Tue, 6 Sep 2016 05:08:47 +0300 Subject: [PATCH] tests: change type of sched_nice field to signed in sched_xetattr test Kernel headers declare this field as s32, and strace prints it with %d specifier. * tests/sched_xetattr.c (main): Change type of sched_nice field of struct sched_attr to int32_t, update format specifiers accordingly. --- tests/sched_xetattr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/sched_xetattr.c b/tests/sched_xetattr.c index be3c6324..47fd80a0 100644 --- a/tests/sched_xetattr.c +++ b/tests/sched_xetattr.c @@ -41,7 +41,7 @@ main(void) uint32_t size; uint32_t sched_policy; uint64_t sched_flags; - uint32_t sched_nice; + int32_t sched_nice; uint32_t sched_priority; uint64_t sched_runtime; uint64_t sched_deadline; @@ -52,7 +52,7 @@ main(void) perror_msg_and_skip("sched_getattr"); printf("sched_getattr\\(0, \\{size=%u, sched_policy=SCHED_[A-Z]+" - ", sched_flags=%s, sched_nice=%u, sched_priority=%u" + ", sched_flags=%s, sched_nice=%d, sched_priority=%u" ", sched_runtime=%" PRIu64 ", sched_deadline=%" PRIu64 ", sched_period=%" PRIu64 "\\}, %u, 0\\) += 0\n", sched_attr->size, @@ -69,7 +69,7 @@ main(void) perror_msg_and_skip("sched_setattr"); printf("sched_setattr\\(0, \\{size=%u, sched_policy=SCHED_[A-Z]+" - ", sched_flags=%s, sched_nice=%u, sched_priority=%u" + ", sched_flags=%s, sched_nice=%d, sched_priority=%u" ", sched_runtime=%" PRIu64 ", sched_deadline=%" PRIu64 ", sched_period=%" PRIu64 "\\}, 0\\) += 0\n", sched_attr->size, -- 2.50.1