[PATCH v2 6/9] tests: Change type of sched_nice field to signed in sched_xetattr test
Eugene Syromyatnikov
evgsyr at gmail.com
Thu Sep 8 14:07:10 UTC 2016
Kernel headers declare this field as s32, and strace prints it with %d
specifier.
* tests/sched_xetattr.c: 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 e85f9bc..2e0ce61 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 "\\}, %zu, 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,
--
1.7.10.4
More information about the Strace-devel
mailing list