Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package rt-tests for openSUSE:Factory 
checked in at 2024-01-31 23:54:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rt-tests (Old)
 and      /work/SRC/openSUSE:Factory/.rt-tests.new.1815 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rt-tests"

Wed Jan 31 23:54:47 2024 rev:10 rq:1142931 version:2.6

Changes:
--------
--- /work/SRC/openSUSE:Factory/rt-tests/rt-tests.changes        2023-04-18 
15:53:22.593587291 +0200
+++ /work/SRC/openSUSE:Factory/.rt-tests.new.1815/rt-tests.changes      
2024-01-31 23:55:05.131880450 +0100
@@ -1,0 +2,6 @@
+Wed Jan 31 08:20:15 UTC 2024 - Andrea Manzini <andrea.manz...@suse.com>
+
+- Update to version 2.6:
+  
https://lore.kernel.org/linux-rt-users/20231006200345.53658-1-jka...@redhat.com/
+
+-------------------------------------------------------------------

Old:
----
  rt-tests-2.5.tar.gz

New:
----
  rt-tests-2.6.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rt-tests.spec ++++++
--- /var/tmp/diff_new_pack.9rXu2Y/_old  2024-01-31 23:55:05.719901668 +0100
+++ /var/tmp/diff_new_pack.9rXu2Y/_new  2024-01-31 23:55:05.719901668 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package rt-tests
 #
-# Copyright (c) 2023 SUSE LLC
+# Copyright (c) 2024 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           rt-tests
-Version:        2.5
+Version:        2.6
 Release:        0
 Summary:        Realtime Kernel Testsuite
 License:        GPL-2.0-only

++++++ rt-tests-2.5.tar.gz -> rt-tests-2.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-tests-2.5/Makefile new/rt-tests-2.6/Makefile
--- old/rt-tests-2.5/Makefile   2023-01-20 21:36:37.000000000 +0100
+++ new/rt-tests-2.6/Makefile   2023-10-06 21:55:37.000000000 +0200
@@ -1,4 +1,4 @@
-VERSION = 2.5
+VERSION = 2.6
 CC = $(CROSS_COMPILE)gcc
 AR = $(CROSS_COMPILE)ar
 
@@ -34,7 +34,7 @@
 CPPFLAGS += -D_GNU_SOURCE -Isrc/include
 LDFLAGS ?=
 
-PYLIB  ?= $(shell python3 -c 'import distutils.sysconfig;  print 
(distutils.sysconfig.get_python_lib())')
+PYLIB ?= $(shell python3 -m get_pylib)
 
 # Check for errors, such as python3 not available
 ifeq (${PYLIB},)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-tests-2.5/get_pylib.py 
new/rt-tests-2.6/get_pylib.py
--- old/rt-tests-2.5/get_pylib.py       1970-01-01 01:00:00.000000000 +0100
+++ new/rt-tests-2.6/get_pylib.py       2023-10-06 21:55:37.000000000 +0200
@@ -0,0 +1,16 @@
+#!/usr/bin/python3
+
+# This file is used during the make process
+
+import sysconfig
+
+# Older versions of python don't have this scheme
+# but produce the answer we expect with 'posix_prefix'
+# Newer versions of python insert 'local' in the path unless we use rpm_prefix
+SCHEME = 'rpm_prefix'
+
+if not SCHEME in sysconfig.get_scheme_names():
+    SCHEME = 'posix_prefix'
+
+PYLIB = sysconfig.get_path('purelib', SCHEME)
+print(PYLIB)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-tests-2.5/src/cyclictest/cyclictest.c 
new/rt-tests-2.6/src/cyclictest/cyclictest.c
--- old/rt-tests-2.5/src/cyclictest/cyclictest.c        2023-01-20 
21:36:37.000000000 +0100
+++ new/rt-tests-2.6/src/cyclictest/cyclictest.c        2023-10-06 
21:55:37.000000000 +0200
@@ -22,11 +22,8 @@
 #include <time.h>
 #include <errno.h>
 #include <limits.h>
-#include <linux/unistd.h>
 
-#include <sys/prctl.h>
 #include <sys/stat.h>
-#include <sys/sysinfo.h>
 #include <sys/types.h>
 #include <sys/time.h>
 #include <sys/resource.h>
@@ -320,8 +317,10 @@
                return err;
        }
 
-       soft_max = (rlim.rlim_cur == RLIM_INFINITY) ? policy_max : 
rlim.rlim_cur;
-       hard_max = (rlim.rlim_max == RLIM_INFINITY) ? policy_max : 
rlim.rlim_max;
+       soft_max = (rlim.rlim_cur == RLIM_INFINITY) ? (unsigned int)policy_max
+                                                   : rlim.rlim_cur;
+       hard_max = (rlim.rlim_max == RLIM_INFINITY) ? (unsigned int)policy_max
+                                                   : rlim.rlim_max;
 
        if (prio > soft_max && prio <= hard_max) {
                rlim.rlim_cur = prio;
@@ -1617,7 +1616,7 @@
  * thread that creates a named fifo and hands out run stats when someone
  * reads from the fifo.
  */
-static void *fifothread(void *param)
+static void *fifothread(void *param __attribute__ ((unused)))
 {
        int ret;
        int fd;
@@ -1798,10 +1797,11 @@
        return;
 }
 
-static void write_stats(FILE *f, void *data)
+static void write_stats(FILE *f, void *data __attribute__ ((unused)))
 {
        struct thread_param **par = parameters;
-       unsigned int i, j, comma;
+       int i, j;
+       unsigned comma;
        struct thread_stat *s;
 
        fprintf(f, "  \"num_threads\": %d,\n", num_threads);
@@ -1953,10 +1953,8 @@
                for (k=0; k < times; k++)
                        clock_gettime(clock, &time[k]);
 
-               if (ct_debug) {
-                       info("For %d consecutive calls to clock_gettime():\n", 
times);
-                       info("time, delta time (nsec)\n");
-               }
+               info(ct_debug, "For %d consecutive calls to 
clock_gettime():\n", times);
+               info(ct_debug, "time, delta time (nsec)\n");
 
                prev = time[0];
                for (k=1; k < times; k++) {
@@ -1967,10 +1965,9 @@
                        if (diff && (diff < min_non_zero_diff))
                                min_non_zero_diff = diff;
 
-                       if (ct_debug)
-                               info("%ld.%06ld  %5llu\n",
-                                    time[k].tv_sec, time[k].tv_nsec,
-                                    (unsigned long long)diff);
+                       info(ct_debug, "%ld.%06ld  %5llu\n",
+                                       time[k].tv_sec, time[k].tv_nsec,
+                                       (unsigned long long)diff);
                }
 
                free(time);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-tests-2.5/src/hwlatdetect/hwlatdetect.py 
new/rt-tests-2.6/src/hwlatdetect/hwlatdetect.py
--- old/rt-tests-2.5/src/hwlatdetect/hwlatdetect.py     2023-01-20 
21:36:37.000000000 +0100
+++ new/rt-tests-2.6/src/hwlatdetect/hwlatdetect.py     2023-10-06 
21:55:37.000000000 +0200
@@ -237,10 +237,11 @@
 
     class Sample:
         'private class for tracer sample data'
-        __slots__ = 'timestamp', 'inner', 'outer'
+        __slots__ = 'cpu', 'timestamp', 'inner', 'outer'
 
         def __init__(self, line):
             fields = line.split()
+            self.cpu = int(fields[1][1:-1])
             i, o = fields[6].split('/')
             ts = fields[7][3:]
             self.timestamp = str(ts)
@@ -248,7 +249,7 @@
             self.outer = int(o)
 
         def __str__(self):
-            return f"ts: {self.timestamp}, inner:{self.inner}, 
outer:{self.outer}"
+            return f"ts: {self.timestamp}, inner:{self.inner}, 
outer:{self.outer}, cpu:{self.cpu}"
 
         def display(self):
             """ convert object to string and print """
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-tests-2.5/src/include/pip_stress.h 
new/rt-tests-2.6/src/include/pip_stress.h
--- old/rt-tests-2.5/src/include/pip_stress.h   2023-01-20 21:36:37.000000000 
+0100
+++ new/rt-tests-2.6/src/include/pip_stress.h   2023-10-06 21:55:37.000000000 
+0200
@@ -32,7 +32,7 @@
 void Pthread_mutex_lock(pthread_mutex_t *mutex);
 void Pthread_mutex_unlock(pthread_mutex_t *mutex);
 
-void init_shared_pthread_mutex(pthread_mutex_t *mutex, int protocol, int 
policy);
+void init_shared_pthread_mutex(pthread_mutex_t *mutex, int protocol);
 int set_rt_prio(pid_t pid, int prio, int policy);
 int get_rt_prio(pid_t pid);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-tests-2.5/src/include/rt-error.h 
new/rt-tests-2.6/src/include/rt-error.h
--- old/rt-tests-2.5/src/include/rt-error.h     2023-01-20 21:36:37.000000000 
+0100
+++ new/rt-tests-2.6/src/include/rt-error.h     2023-10-06 21:55:37.000000000 
+0200
@@ -11,8 +11,8 @@
 void err_msg(char *fmt, ...);
 void err_msg_n(int err, char *fmt, ...);
 void err_quit(char *fmt, ...) __attribute__((noreturn));
-void debug(char *fmt, ...);
-void info(char *fmt, ...);
+void debug(int enable, char *fmt, ...);
+void info(int enable, char *fmt, ...);
 void warn(char *fmt, ...);
 void fatal(char *fmt, ...) __attribute__((noreturn));
 void err_doit(int err, const char *fmt, va_list ap);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-tests-2.5/src/lib/rt-error.c 
new/rt-tests-2.6/src/lib/rt-error.c
--- old/rt-tests-2.5/src/lib/rt-error.c 2023-01-20 21:36:37.000000000 +0100
+++ new/rt-tests-2.6/src/lib/rt-error.c 2023-10-06 21:55:37.000000000 +0200
@@ -47,24 +47,28 @@
        exit(1);
 }
 
-void debug(char *fmt, ...)
+void debug(int enable, char *fmt, ...)
 {
-       va_list ap;
+       if (enable) {
+               va_list ap;
 
-       va_start(ap, fmt);
-       fputs("DEBUG: ", stderr);
-       err_doit(0, fmt, ap);
-       va_end(ap);
+               va_start(ap, fmt);
+               fputs("DEBUG: ", stderr);
+               err_doit(0, fmt, ap);
+               va_end(ap);
+       }
 }
 
-void info(char *fmt, ...)
+void info(int enable, char *fmt, ...)
 {
-       va_list ap;
+       if (enable) {
+               va_list ap;
 
-       va_start(ap, fmt);
-       fputs("INFO: ", stderr);
-       err_doit(0, fmt, ap);
-       va_end(ap);
+               va_start(ap, fmt);
+               fputs("INFO: ", stderr);
+               err_doit(0, fmt, ap);
+               va_end(ap);
+       }
 }
 
 void warn(char *fmt, ...)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-tests-2.5/src/lib/rt-numa.c 
new/rt-tests-2.6/src/lib/rt-numa.c
--- old/rt-tests-2.5/src/lib/rt-numa.c  2023-01-20 21:36:37.000000000 +0100
+++ new/rt-tests-2.6/src/lib/rt-numa.c  2023-10-06 21:55:37.000000000 +0200
@@ -52,7 +52,7 @@
 
 int cpu_for_thread_sp(int thread_num, int max_cpus, struct bitmask *cpumask)
 {
-       unsigned int m, cpu, i, num_cpus;
+       int m, cpu, i, num_cpus;
 
        num_cpus = numa_bitmask_weight(cpumask);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-tests-2.5/src/lib/rt-utils.c 
new/rt-tests-2.6/src/lib/rt-utils.c
--- old/rt-tests-2.5/src/lib/rt-utils.c 2023-01-20 21:36:37.000000000 +0100
+++ new/rt-tests-2.6/src/lib/rt-utils.c 2023-10-06 21:55:37.000000000 +0200
@@ -109,7 +109,7 @@
        /* if it's already mounted just return */
        prefix = get_debugfileprefix();
        if (strlen(prefix) != 0) {
-               info("debugfs mountpoint: %s\n", prefix);
+               info(1, "debugfs mountpoint: %s\n", prefix);
                return 0;
        }
        if (!mountpoint)
@@ -382,12 +382,15 @@
        case 'g':
        case 'G':
                v *= 1024;
+               __attribute__ ((fallthrough));
        case 'm':
        case 'M':
                v *= 1024;
+               __attribute__ ((fallthrough));
        case 'k':
        case 'K':
                v *= 1024;
+               __attribute__ ((fallthrough));
        case 'b':
        case 'B':
                break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-tests-2.5/src/oslat/oslat.c 
new/rt-tests-2.6/src/oslat/oslat.c
--- old/rt-tests-2.5/src/oslat/oslat.c  2023-01-20 21:36:37.000000000 +0100
+++ new/rt-tests-2.6/src/oslat/oslat.c  2023-10-06 21:55:37.000000000 +0200
@@ -220,7 +220,7 @@
 
 static struct global g;
 
-static void workload_nop(char *dst, char *src, size_t size)
+static void workload_nop(char *dst __attribute__ ((unused)), char *src 
__attribute__ ((unused)), size_t size __attribute__ ((unused)))
 {
        /* Nop */
 }
@@ -337,8 +337,7 @@
        lat = (value * g.unit_per_us + t->counter_mhz - 1) / t->counter_mhz;
        us = (double)lat / g.unit_per_us;
        if (!g.preheat && g.trace_threshold && us >= g.trace_threshold) {
-               char *line = "%s: Trace threshold (%d us) triggered on cpu %d 
with %.*f us!\n"
-                   "Stopping the test.\n";
+               char *line = "%s: Trace threshold (%d us) triggered on cpu %d 
with %.*f us!\n";
                tracemark(line, g.app_name, g.trace_threshold, t->core_i,
                          g.precision, us);
                err_quit(line, g.app_name, g.trace_threshold, t->core_i,
@@ -475,7 +474,8 @@
 
 void calculate(struct thread *t)
 {
-       int i, j;
+       int j;
+       unsigned int i;
        double sum;
        uint64_t count;
 
@@ -494,7 +494,8 @@
 
 static void write_summary(struct thread *t)
 {
-       int i, j, k, print_dotdotdot = 0;
+       int j, print_dotdotdot = 0;
+       unsigned long int i, k;
        char bucket_name[64];
 
        calculate(t);
@@ -537,12 +538,13 @@
 static void write_summary_json(FILE *f, void *data)
 {
        struct thread *t = data;
-       int i, j, comma;
+       int j, comma;
+       unsigned long int i;
 
        fprintf(f, "  \"num_threads\": %d,\n", g.n_threads);
        fprintf(f, "  \"thread\": {\n");
        for (i = 0; i < g.n_threads; ++i) {
-               fprintf(f, "    \"%u\": {\n", i);
+               fprintf(f, "    \"%lu\": {\n", i);
                fprintf(f, "      \"cpu\": %d,\n", t[i].core_i);
                fprintf(f, "      \"freq\": %d,\n", t[i].counter_mhz);
                fprintf(f, "      \"min\": %" PRIu64 ",\n", t[i].minlat);
@@ -569,7 +571,7 @@
 
 static void run_expt(struct thread *threads, int runtime_secs, bool preheat)
 {
-       int i;
+       unsigned long int i;
 
        g.runtime_secs = runtime_secs;
        g.preheat = preheat;
@@ -594,7 +596,7 @@
                pthread_join(threads[i].thread_id, NULL);
 }
 
-static void handle_alarm(int code)
+static void handle_alarm(int code __attribute__ ((unused)))
 {
        g.cmd = STOP;
 }
@@ -840,7 +842,7 @@
 
 static void record_bias(struct thread *t)
 {
-       int i;
+       unsigned long int i;
        uint64_t bias = (uint64_t)-1;
 
        if (!g.enable_bias)
@@ -859,7 +861,8 @@
 int main(int argc, char *argv[])
 {
        struct thread *threads;
-       int i, n_cores;
+       int n_cores;
+       unsigned long int i;
        struct bitmask *cpu_set = NULL;
 
 #ifdef FRC_MISSING
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-tests-2.5/src/pi_tests/pi_stress.c 
new/rt-tests-2.6/src/pi_tests/pi_stress.c
--- old/rt-tests-2.5/src/pi_tests/pi_stress.c   2023-01-20 21:36:37.000000000 
+0100
+++ new/rt-tests-2.6/src/pi_tests/pi_stress.c   2023-10-06 21:55:37.000000000 
+0200
@@ -71,9 +71,9 @@
 #define DOWN_ONE "\033[1B"
 
 #define pi_info(fmt, arg...) \
-       do { if (verbose) info(fmt, ## arg); } while (0)
+       do { info(verbose, fmt, ## arg); } while (0)
 #define pi_debug(fmt, arg...) \
-       do { if (debugging) debug(fmt, ## arg); } while (0)
+       do { debug(debugging, fmt, ## arg); } while (0)
 #define pi_error(fmt, arg...) \
        do { err_msg(fmt, ## arg); have_errors = 1; } while (0)
 
@@ -505,7 +505,7 @@
  *   1. report progress
  *   2. check for deadlocks
  */
-void *reporter(void *arg)
+void *reporter(void *arg __attribute__ ((unused)))
 {
        int status;
        int end = 0;
@@ -637,7 +637,7 @@
                   We can't set the 'loop' boolean here, because some flags
                   may have already reached the loop_barr
                 */
-               if (!unbounded && (p->total >= p->inversions)) {
+               if (!unbounded && (p->total >= (unsigned)p->inversions)) {
                        set_shutdown_flag();
                }
 
@@ -766,7 +766,7 @@
 
        pi_debug("med_priority[%d]: starting inversion loop\n", p->id);
        for (;;) {
-               if (!unbounded && (p->total >= p->inversions)) {
+               if (!unbounded && (p->total >= (unsigned)p->inversions)) {
                        set_shutdown_flag();
                }
                /* Either all threads go through the loop_barr, or none do */
@@ -891,7 +891,7 @@
        unbounded = (p->inversions < 0);
        pi_debug("high_priority[%d]: starting inversion loop\n", p->id);
        for (;;) {
-               if (!unbounded && (p->total >= p->inversions)) {
+               if (!unbounded && (p->total >= (unsigned)p->inversions)) {
                        set_shutdown_flag();
                }
 
@@ -1449,7 +1449,7 @@
               t->tm_yday, t->tm_hour, t->tm_min, t->tm_sec);
 }
 
-void write_stats(FILE *f, void *data)
+void write_stats(FILE *f, void *data __attribute__ ((unused)))
 {
        fprintf(f, "  \"inversion\": %lu\n", total_inversions());
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-tests-2.5/src/pi_tests/pip_stress.c 
new/rt-tests-2.6/src/pi_tests/pip_stress.c
--- old/rt-tests-2.5/src/pi_tests/pip_stress.c  2023-01-20 21:36:37.000000000 
+0100
+++ new/rt-tests-2.6/src/pi_tests/pip_stress.c  2023-10-06 21:55:37.000000000 
+0200
@@ -114,7 +114,7 @@
        mptr += sizeof(pthread_mutex_t);        /* advance the memory pointer */
 
        /* Initialize our mutex via the resource pointer */
-       init_shared_pthread_mutex(resource, PTHREAD_PRIO_INHERIT, policy);
+       init_shared_pthread_mutex(resource, PTHREAD_PRIO_INHERIT);
 
        statep = (struct State*)mptr;
        mptr += sizeof(struct State);
@@ -125,7 +125,7 @@
        mptr += sizeof(pthread_mutex_t);        /* advance the memory pointer */
 
        /* Initialize our State mutex */
-       init_shared_pthread_mutex(statep->mutex, PTHREAD_PRIO_NONE, policy);
+       init_shared_pthread_mutex(statep->mutex, PTHREAD_PRIO_NONE);
 
        set_rt_prio(0, prio_min, policy);
 
@@ -323,7 +323,7 @@
        }
 }
 
-void init_shared_pthread_mutex(pthread_mutex_t *mutex, int protocol, int 
policy)
+void init_shared_pthread_mutex(pthread_mutex_t *mutex, int protocol)
 {
        pthread_mutexattr_t attr;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-tests-2.5/src/pmqtest/pmqtest.c 
new/rt-tests-2.6/src/pmqtest/pmqtest.c
--- old/rt-tests-2.5/src/pmqtest/pmqtest.c      2023-01-20 21:36:37.000000000 
+0100
+++ new/rt-tests-2.6/src/pmqtest/pmqtest.c      2023-10-06 21:55:37.000000000 
+0200
@@ -418,13 +418,14 @@
 
 static int volatile shutdown;
 
-static void sighand(int sig)
+static void sighand(int sig __attribute__ ((unused)))
 {
        shutdown = 1;
 }
 
-static void print_stat(FILE *fp, struct params *receiver, struct params 
*sender,
-                      int verbose, int quiet)
+static void print_stat(FILE *fp __attribute__ ((unused)),
+                      struct params *receiver, struct params *sender,
+                      int verbose __attribute__ ((unused)), int quiet)
 {
        int i;
 
@@ -456,7 +457,7 @@
 {
        struct params_stats *ps = data;
        struct params *s, *r;
-       unsigned int i;
+       int i;
 
        fprintf(f, "  \"num_threads\": %d,\n", num_threads);
        fprintf(f, "  \"thread\": {\n");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-tests-2.5/src/ptsematest/ptsematest.c 
new/rt-tests-2.6/src/ptsematest/ptsematest.c
--- old/rt-tests-2.5/src/ptsematest/ptsematest.c        2023-01-20 
21:36:37.000000000 +0100
+++ new/rt-tests-2.6/src/ptsematest/ptsematest.c        2023-10-06 
21:55:37.000000000 +0200
@@ -321,13 +321,14 @@
 
 static int volatile shutdown;
 
-static void sighand(int sig)
+static void sighand(int sig __attribute__ ((unused)))
 {
        shutdown = 1;
 }
 
-static void print_stat(FILE *fp, struct params *receiver, struct params 
*sender,
-                      int verbose, int quiet)
+static void print_stat(FILE *fp __attribute__ ((unused)),
+                      struct params *receiver, struct params *sender,
+                      int verbose __attribute__ ((unused)), int quiet)
 {
        int i;
 
@@ -359,7 +360,7 @@
 {
        struct params_stats *ps = data;
        struct params *s, *r;
-       unsigned int i;
+       int i;
 
        fprintf(f, "  \"num_threads\": %d,\n", num_threads);
        fprintf(f, "  \"thread\": {\n");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-tests-2.5/src/queuelat/queuelat.c 
new/rt-tests-2.6/src/queuelat/queuelat.c
--- old/rt-tests-2.5/src/queuelat/queuelat.c    2023-01-20 21:36:37.000000000 
+0100
+++ new/rt-tests-2.6/src/queuelat/queuelat.c    2023-10-06 21:55:37.000000000 
+0200
@@ -519,7 +519,7 @@
        free(src);
 }
 
-void sig_handler(int sig)
+void sig_handler(int sig __attribute__ ((unused)))
 {
        print_exit_info();
        exit(0);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-tests-2.5/src/rt-migrate-test/rt-migrate-test.c 
new/rt-tests-2.6/src/rt-migrate-test/rt-migrate-test.c
--- old/rt-tests-2.5/src/rt-migrate-test/rt-migrate-test.c      2023-01-20 
21:36:37.000000000 +0100
+++ new/rt-tests-2.6/src/rt-migrate-test/rt-migrate-test.c      2023-10-06 
21:55:37.000000000 +0200
@@ -44,7 +44,7 @@
                "/debugfs/tracing/trace_marker",
        };
        int ret;
-       int i;
+       unsigned int i;
 
        for (i = 0; i < (sizeof(files) / sizeof(char *)); i++) {
                ret = stat(files[i], &st);
@@ -354,7 +354,7 @@
        }
 }
 
-static void write_stats(FILE *f, void *data)
+static void write_stats(FILE *f, void *data __attribute__ ((unused)))
 {
        int i;
        int t;
@@ -489,7 +489,7 @@
        return 0;
 }
 
-static void stop_log(int sig)
+static void stop_log(int sig __attribute__ ((unused)))
 {
        stop = 1;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-tests-2.5/src/sched_deadline/cyclicdeadline.c 
new/rt-tests-2.6/src/sched_deadline/cyclicdeadline.c
--- old/rt-tests-2.5/src/sched_deadline/cyclicdeadline.c        2023-01-20 
21:36:37.000000000 +0100
+++ new/rt-tests-2.6/src/sched_deadline/cyclicdeadline.c        2023-10-06 
21:55:37.000000000 +0200
@@ -80,6 +80,8 @@
 };
 
 static int shutdown;
+static int info_enable;
+static int debug_enable;
 static int tracelimit;
 static int trace_marker;
 static pthread_mutex_t break_thread_id_lock = PTHREAD_MUTEX_INITIALIZER;
@@ -685,7 +687,6 @@
               "-a [CPUSET] --affinity     Comma/hyphen separated list of CPUs 
to run deadline\n"
               "                           tasks on. An empty CPUSET runs on 
all CPUs a deadline\n"
               "                           task.\n"
-              "                           on CPU 4, and thread #5 on CPU 5.\n"
               "-D TIME  --duration        Specify a length for the test run.\n"
               "                           Append 'm', 'h', or 'd' to specify 
minutes, hours or\n"
               "                           days\n"
@@ -699,6 +700,8 @@
               "-q       --quiet           print a summary only on exit\n"
               "-b USEC  --breaktrace=USEC send break trace command when 
latency > USEC\n"
               "         --tracemark       write a trace mark when -b latency 
is exceeded\n"
+                  "             --debug                   Print debugging info 
for cyclicdeadline\n"
+                  "             --verbose                 Print useful 
information about the test\n"
               );
        exit(error);
 }
@@ -795,8 +798,8 @@
        u64 period;
        int ret;
 
-       printf("deadline thread %ld\n", tid);
-
+       debug(debug_enable, "deadline thread %ld\n", tid);
+       // set up for each measurment thread
        stat->tid = tid;
 
        ret = sched_getattr(0, &attr, sizeof(attr), 0);
@@ -808,17 +811,13 @@
                return NULL;
        }
 
-       pthread_barrier_wait(&barrier);
-
        attr.sched_policy = SCHED_DEADLINE;
        attr.sched_runtime = sd->runtime_us * 1000;
        attr.sched_deadline = sd->deadline_us * 1000;
 
-       printf("thread[%d] runtime=%lldus deadline=%lldus\n",
+       debug(debug_enable, "thread[%d] runtime=%lldus deadline=%lldus\n",
              gettid(), sd->runtime_us, sd->deadline_us);
 
-       pthread_barrier_wait(&barrier);
-
        ret = sched_setattr(0, &attr, 0);
        if (ret < 0) {
                err_msg_n(errno, "[%ld]", tid);
@@ -1031,7 +1030,7 @@
        return -1;
 }
 
-static void sighand(int sig)
+static void sighand(int sig __attribute__ ((unused)))
 {
        shutdown = 1;
 }
@@ -1068,7 +1067,7 @@
 {
        struct sched_data *sd = data;
        struct thread_stat *s;
-       unsigned int i;
+       int i;
 
        fprintf(f, "  \"num_threads\": %d,\n", nr_threads);
        fprintf(f, "  \"resolution_in_ns\": %u,\n", use_nsecs);
@@ -1088,7 +1087,7 @@
 enum options_values {
        OPT_AFFINITY=1, OPT_DURATION, OPT_HELP, OPT_INTERVAL,
        OPT_JSON, OPT_STEP, OPT_THREADS, OPT_QUIET,
-       OPT_BREAKTRACE, OPT_TRACEMARK,
+       OPT_BREAKTRACE, OPT_TRACEMARK, OPT_INFO, OPT_DEBUG,
 };
 
 int main(int argc, char **argv)
@@ -1129,6 +1128,8 @@
                        { "quiet",      no_argument,            NULL,   
OPT_QUIET },
                        { "breaktrace",       required_argument, NULL, 
OPT_BREAKTRACE },
                        { "tracemark",       no_argument,       NULL, 
OPT_TRACEMARK },
+                       { "verbose",    no_argument,    NULL,   OPT_INFO},
+                       { "debug",      no_argument,    NULL,   OPT_DEBUG},
                        { NULL,         0,                      NULL,   0   },
                };
                c = getopt_long(argc, argv, "a::c:D:hi:s:t:b:q", options, NULL);
@@ -1181,6 +1182,12 @@
                case OPT_TRACEMARK:
                        trace_marker = 1;
                        break;
+               case OPT_INFO:
+                       info_enable = 1;
+                       break;
+               case OPT_DEBUG:
+                       debug_enable = 1;
+                       break;
                default:
                        usage(1);
                }
@@ -1234,7 +1241,7 @@
                percent = nr_cpus * 80 / nr_threads;
        }
 
-       /* Set up the data while sill in SCHED_FIFO */
+       /* Set up the data while still in SCHED_FIFO */
        for (i = 0; i < nr_threads; i++) {
                sd = &sched_data[i];
                /*
@@ -1255,7 +1262,7 @@
                sd->runtime_us = runtime;
                sd->deadline_us = interval;
 
-               printf("interval: %lld:%lld\n", sd->runtime_us, 
sd->deadline_us);
+               info(info_enable, "interval: %lld:%lld\n", sd->runtime_us, 
sd->deadline_us);
 
                /* Make sure that we can make our deadlines */
                start_period = get_time_us();
@@ -1265,7 +1272,7 @@
                        fatal("Failed to perform task within runtime: Missed by 
%lld us\n",
                              end_period - start_period - sd->runtime_us);
 
-               printf("  Tested at %lldus of %lldus\n",
+               info(info_enable, "  Tested at %lldus of %lldus\n",
                       end_period - start_period, sd->runtime_us);
 
                interval += step;
@@ -1281,8 +1288,6 @@
 
        atexit(teardown);
 
-       pthread_barrier_wait(&barrier);
-
        if (shutdown)
                fatal("failed to setup child threads at step 1\n");
 
@@ -1310,9 +1315,7 @@
                system("cat /sys/fs/cgroup/cpuset/my_cpuset/tasks");
        }
 
-       printf("main thread %d\n", gettid());
-
-       pthread_barrier_wait(&barrier);
+       debug(debug_enable, "main thread %d\n", gettid());
 
        if (shutdown)
                fatal("failed to setup child threads at step 2");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-tests-2.5/src/sched_deadline/deadline_test.c 
new/rt-tests-2.6/src/sched_deadline/deadline_test.c
--- old/rt-tests-2.5/src/sched_deadline/deadline_test.c 2023-01-20 
21:36:37.000000000 +0100
+++ new/rt-tests-2.6/src/sched_deadline/deadline_test.c 2023-10-06 
21:55:37.000000000 +0200
@@ -931,7 +931,7 @@
  * bind_cpu - Set the affinity of a thread to a specific CPU.
  * @cpu: The CPU to bind to.
  *
- * Sets the current thread to have an affinity of a sigle CPU.
+ * Sets the current thread to have an affinity of a single CPU.
  * Does not work on SCHED_DEADLINE tasks.
  */
 static void bind_cpu(int cpu)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-tests-2.5/src/signaltest/signaltest.c 
new/rt-tests-2.6/src/signaltest/signaltest.c
--- old/rt-tests-2.5/src/signaltest/signaltest.c        2023-01-20 
21:36:37.000000000 +0100
+++ new/rt-tests-2.6/src/signaltest/signaltest.c        2023-10-06 
21:55:37.000000000 +0200
@@ -357,7 +357,7 @@
        }
 }
 
-static void sighand(int sig)
+static void sighand(int sig __attribute__ ((unused)))
 {
        shutdown = 1;
 }
@@ -388,7 +388,7 @@
 {
        struct thread_param *par = data;
        struct thread_stat *s;
-       unsigned int i;
+       int i;
 
        fprintf(f, "  \"num_threads\": %d,\n", num_threads);
        fprintf(f, "  \"thread\": {\n");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-tests-2.5/src/sigwaittest/sigwaittest.c 
new/rt-tests-2.6/src/sigwaittest/sigwaittest.c
--- old/rt-tests-2.5/src/sigwaittest/sigwaittest.c      2023-01-20 
21:36:37.000000000 +0100
+++ new/rt-tests-2.6/src/sigwaittest/sigwaittest.c      2023-10-06 
21:55:37.000000000 +0200
@@ -384,13 +384,13 @@
 
 static int volatile mustshutdown;
 
-static void sighand(int sig)
+static void sighand(int sig __attribute__ ((unused)))
 {
        mustshutdown = 1;
 }
 
 static void print_stat(FILE *fp, struct params *receiver, struct params 
*sender,
-                      int verbose, int quiet)
+                      int verbose __attribute__ ((unused)), int quiet)
 {
        int i;
 
@@ -435,7 +435,7 @@
 {
        struct params_stats *ps = data;
        struct params *s, *r;
-       unsigned int i;
+       int i;
 
        fprintf(f, "  \"num_threads\": %d,\n", num_threads);
        fprintf(f, "  \"thread\": {\n");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-tests-2.5/src/ssdd/ssdd.c 
new/rt-tests-2.6/src/ssdd/ssdd.c
--- old/rt-tests-2.5/src/ssdd/ssdd.c    2023-01-20 21:36:37.000000000 +0100
+++ new/rt-tests-2.6/src/ssdd/ssdd.c    2023-10-06 21:55:37.000000000 +0200
@@ -64,8 +64,6 @@
        return state_name[state];
 }
 
-#define unused __attribute__((unused))
-
 static int quiet;
 static char jsonfile[MAX_PATH];
 
@@ -154,7 +152,7 @@
 static int nforks = 10;
 static int nsteps = 10000;
 
-static void sigchld(int sig, unused siginfo_t *info, unused void *arg)
+static void sigchld(int sig __attribute__ ((unused)), siginfo_t *info 
__attribute__ ((unused)), void *arg __attribute__ ((unused)))
 {
        got_sigchld = 1;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-tests-2.5/src/svsematest/svsematest.c 
new/rt-tests-2.6/src/svsematest/svsematest.c
--- old/rt-tests-2.5/src/svsematest/svsematest.c        2023-01-20 
21:36:37.000000000 +0100
+++ new/rt-tests-2.6/src/svsematest/svsematest.c        2023-10-06 
21:55:37.000000000 +0200
@@ -416,7 +416,7 @@
 
 static int volatile mustshutdown;
 
-static void sighand(int sig)
+static void sighand(int sig __attribute__ ((unused)))
 {
        mustshutdown = 1;
 }
@@ -430,7 +430,7 @@
 {
        struct params_stats *ps = data;
        struct params *s, *r;
-       unsigned int i;
+       int i;
 
        fprintf(f, "  \"num_threads\": %d,\n", num_threads);
        fprintf(f, "  \"thread\": {\n");
@@ -456,8 +456,7 @@
        fprintf(f, "  }\n");
 }
 
-static void print_stat(FILE *fp, struct params *receiver, struct params 
*sender,
-                      int verbose, int quiet)
+static void print_stat(FILE *fp __attribute__ ((unused)), struct params 
*receiver, struct params *sender, int verbose __attribute__ ((unused)), int 
quiet)
 {
        int i;
 

Reply via email to