]> granicus.if.org Git - strace/commitdiff
tests: change type of sched_nice field to signed in sched_xetattr test
authorEugene Syromyatnikov <evgsyr@gmail.com>
Tue, 6 Sep 2016 02:08:47 +0000 (05:08 +0300)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 8 Sep 2016 12:33:44 +0000 (12:33 +0000)
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

index be3c6324abf9a5102aa18ffcb901a8741163bc09..47fd80a0717b043b1176afe204011c4300bded88 100644 (file)
@@ -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,