Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package accel-config for openSUSE:Factory 
checked in at 2022-11-29 10:53:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/accel-config (Old)
 and      /work/SRC/openSUSE:Factory/.accel-config.new.1597 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "accel-config"

Tue Nov 29 10:53:48 2022 rev:13 rq:1038711 version:3.5.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/accel-config/accel-config.changes        
2022-10-11 18:05:48.434109776 +0200
+++ /work/SRC/openSUSE:Factory/.accel-config.new.1597/accel-config.changes      
2022-11-29 10:54:18.397099427 +0100
@@ -1,0 +2,10 @@
+Fri Nov 18 14:34:25 UTC 2022 - Danilo Spinella <danilo.spine...@suse.com>
+
+- Update to version 3.5.0:
+  * Fix static code analysis warnings
+  * Fix lintian errors
+  * Move test program and related configs to /usr/lib
+  * Move contrib/configs/* to /etc
+  * Some code cleanup
+
+-------------------------------------------------------------------

Old:
----
  idxd-config-accel-config-v3.4.8.tar.gz

New:
----
  idxd-config-accel-config-v3.5.0.tar.gz

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

Other differences:
------------------
++++++ accel-config.spec ++++++
--- /var/tmp/diff_new_pack.mmQoAv/_old  2022-11-29 10:54:19.773106655 +0100
+++ /var/tmp/diff_new_pack.mmQoAv/_new  2022-11-29 10:54:19.777106676 +0100
@@ -19,7 +19,7 @@
 %define pkg_libname libaccel-config1
 %define src_name idxd-config-accel-config-v%{version}
 Name:           accel-config
-Version:        3.4.8
+Version:        3.5.0
 Release:        0
 Summary:        Configure accelerator subsystem devices
 License:        GPL-2.0-only
@@ -81,15 +81,13 @@
 %{_bindir}/accel-config
 %{_mandir}/man1/accel-config*
 %dir %{_sysconfdir}/accel-config
-%config %{_sysconfdir}/accel-config/accel-config.conf.sample
-%dir %{_datadir}/accel-config
-%dir %{_datadir}/accel-config/contrib
-%dir %{_datadir}/accel-config/contrib/configs
-%{_datadir}/accel-config/contrib/configs/app_profile.conf
-%{_datadir}/accel-config/contrib/configs/net_profile.conf
-%{_datadir}/accel-config/contrib/configs/os_profile.conf
-%{_datadir}/accel-config/contrib/configs/profilenote.txt
-%{_datadir}/accel-config/contrib/configs/storage_profile.conf
+%dir %{_sysconfdir}/accel-config/contrib
+%dir %{_sysconfdir}/accel-config/contrib/configs
+%config %{_sysconfdir}/accel-config/contrib/configs/app_profile.conf
+%config %{_sysconfdir}/accel-config/contrib/configs/net_profile.conf
+%config %{_sysconfdir}/accel-config/contrib/configs/os_profile.conf
+%config %{_sysconfdir}/accel-config/contrib/configs/profilenote.txt
+%config %{_sysconfdir}/accel-config/contrib/configs/storage_profile.conf
 
 %files -n %{pkg_libname}
 %doc README.md

++++++ idxd-config-accel-config-v3.4.8.tar.gz -> 
idxd-config-accel-config-v3.5.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/idxd-config-accel-config-v3.4.8/Documentation/accfg/accel-config-config-group.txt
 
new/idxd-config-accel-config-v3.5.0/Documentation/accfg/accel-config-config-group.txt
--- 
old/idxd-config-accel-config-v3.4.8/Documentation/accfg/accel-config-config-group.txt
       2022-09-21 23:16:06.000000000 +0200
+++ 
new/idxd-config-accel-config-v3.5.0/Documentation/accfg/accel-config-config-group.txt
       2022-10-15 02:29:50.000000000 +0200
@@ -28,7 +28,7 @@
 
 -t::
 --read-buffers-allowed=::
-       specify the maxinum number of read buffers that may be in use at
+       specify the maximum number of read buffers that may be in use at
        one time by all engines in the group. This value can be used to
        limit the maximum bandwidth used by engines in the group. The limit
        of this value must be:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/idxd-config-accel-config-v3.4.8/Makefile.am 
new/idxd-config-accel-config-v3.5.0/Makefile.am
--- old/idxd-config-accel-config-v3.4.8/Makefile.am     2022-09-21 
23:16:06.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.0/Makefile.am     2022-10-15 
02:29:50.000000000 +0200
@@ -33,16 +33,12 @@
 bashcompletiondir = $(BASH_COMPLETION_DIR)
 endif
 
-accfgconf_file = contrib/accel-config.conf.sample
-accfgconfdir = $(sysconfdir)/accel-config/
-accfgconf_DATA = $(accfgconf_file)
-
-EXTRA_DIST += $(accfgconf_file) accfg.spec.in accfg-test.spec.in
-
 contrib_configs = contrib/configs/*
-contribdir = $(prefix)/share/accel-config/contrib/configs
+contribdir = $(sysconfdir)/accel-config/contrib/configs
 contrib_DATA = $(contrib_configs)
 
+EXTRA_DIST += $(contrib_configs) accfg.spec.in accfg-test.spec.in
+
 noinst_LIBRARIES = libccan.a
 libccan_a_SOURCES = \
         ccan/str/str.h \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/idxd-config-accel-config-v3.4.8/accfg/accel-config.c 
new/idxd-config-accel-config-v3.5.0/accfg/accel-config.c
--- old/idxd-config-accel-config-v3.4.8/accfg/accel-config.c    2022-09-21 
23:16:06.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.0/accfg/accel-config.c    2022-10-15 
02:29:50.000000000 +0200
@@ -40,7 +40,7 @@
                NULL
        };
 
-       argc = parse_options_subcommand(argc, argv, builtin_help_options,
+       parse_options_subcommand(argc, argv, builtin_help_options,
                                        builtin_help_subcommands,
                                        builtin_help_usage, 0);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/idxd-config-accel-config-v3.4.8/accfg/enable.c 
new/idxd-config-accel-config-v3.5.0/accfg/enable.c
--- old/idxd-config-accel-config-v3.4.8/accfg/enable.c  2022-09-21 
23:16:06.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.0/accfg/enable.c  2022-10-15 
02:29:50.000000000 +0200
@@ -90,22 +90,18 @@
                NULL
        };
        int i, rc = -EINVAL, success = 0;
-       const char *all = "all";
        enum accfg_device_state state;
 
        argc = parse_options(argc, argv, options, u, 0);
 
-       if (argc == 0) {
-               argc = 1;
-               argv = &all;
-               usage_with_options(u, options);
-       } else {
-               for (i = 0; i < argc; i++) {
-                       if (strcmp(argv[i], "all") == 0) {
-                               argv[0] = "all";
-                               argc = 1;
-                               break;
-                       }
+       if (argc == 0)
+               usage_with_options(u, options); /* exits app */
+
+       for (i = 0; i < argc; i++) {
+               if (strcmp(argv[i], "all") == 0) {
+                       argv[0] = "all";
+                       argc = 1;
+                       break;
                }
        }
 
@@ -206,21 +202,17 @@
                NULL
        };
        int i, rc = -EINVAL, success = 0;
-       const char *all = "all";
 
        argc = parse_options(argc, argv, options, u, 0);
 
-       if (argc == 0) {
-               argc = 1;
-               argv = &all;
-               usage_with_options(u, options);
-       } else {
-               for (i = 0; i < argc; i++) {
-                       if (strcmp(argv[i], "all") == 0) {
-                               argv[0] = "all";
-                               argc = 1;
-                               break;
-                       }
+       if (argc == 0)
+               usage_with_options(u, options); /* exits app */
+
+       for (i = 0; i < argc; i++) {
+               if (strcmp(argv[i], "all") == 0) {
+                       argv[0] = "all";
+                       argc = 1;
+                       break;
                }
        }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/idxd-config-accel-config-v3.4.8/accfg/lib/libaccfg.c 
new/idxd-config-accel-config-v3.5.0/accfg/lib/libaccfg.c
--- old/idxd-config-accel-config-v3.4.8/accfg/lib/libaccfg.c    2022-09-21 
23:16:06.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.0/accfg/lib/libaccfg.c    2022-10-15 
02:29:50.000000000 +0200
@@ -87,7 +87,7 @@
        [0x1]   = "Invalid command code",
        [0x2]   = "Invalid WQ index",
        [0x3]   = "Internal or platform hardware error",
-       [0x4]   = "Non-zero reserved field in comand",
+       [0x4]   = "Non-zero reserved field in command",
        [0x10]  = "Device not disabled",
        [0x11]  = "Unspecified error in config for device enable",
        [0x12]  = "Bus master enable is 0",
@@ -114,7 +114,7 @@
        [0x41]  = "Invalid interrupt table index",
        [0x42]  = "No interrupt handle available",
        [0x43]  = "No interrupt handles associated with the index",
-       [0x44]  = "No revoked handles associted with the index",
+       [0x44]  = "No revoked handles associated with the index",
        [ACCFG_CMD_STATUS_MAX]  = "Unknown error",
 };
 
@@ -767,7 +767,6 @@
        struct accfg_device *device = parent;
        struct accfg_group *group;
        struct accfg_ctx *ctx;
-       char *path;
        char *wq_base_string;
        uint64_t device_id, wq_id;
        int dfd;
@@ -782,18 +781,10 @@
        if (dfd < 0)
                return NULL;
 
-       path = calloc(1, strlen(wq_base) + 100);
-       if (!path) {
-               err(ctx, "%s: allocation of path failed\n", __func__);
-               close(dfd);
-               return NULL;
-       }
-
        wq = calloc(1, sizeof(*wq));
        if (!wq) {
                err(ctx, "allocation of wq failed\n");
                close(dfd);
-               free(path);
                return NULL;
        }
 
@@ -806,9 +797,11 @@
 
        if (sscanf(basename(wq_base_string),
                                "wq%" SCNu64 ".%" SCNu64, &device_id, &wq_id) 
!= 2) {
+               free(wq_base_string);
                close(dfd);
                goto err_wq;
        }
+       free(wq_base_string);
 
        wq->id = wq_id;
        wq->group = group;
@@ -842,23 +835,21 @@
        wq->wq_buf = calloc(1, strlen(wq_base) + MAX_BUF_LEN);
        if (!wq->wq_buf) {
                err(ctx, "allocation of wq buffer failed\n");
-               goto err_read;
+               goto err_path;
        }
        wq->buf_len = strlen(wq_base) + MAX_BUF_LEN;
 
        list_add_tail(&device->wqs, &wq->list);
-       free(path);
        return wq;
 
-err_read:
-       free(wq->wq_buf);
+err_path:
        free(wq->wq_path);
+err_read:
        free(wq->mode);
        free(wq->state);
        free(wq->name);
 err_wq:
        free(wq);
-       free(path);
        return NULL;
 }
 
@@ -868,7 +859,6 @@
        struct accfg_group *group;
        struct accfg_device *device = parent;
        struct accfg_ctx *ctx;
-       char *path;
        char *group_base_string;
        int dfd;
        uint64_t device_id, group_id;
@@ -881,17 +871,11 @@
        if (dfd < 0)
                return NULL;
 
-       path = calloc(1, strlen(group_base) + 100);
-       if (!path) {
-               err(ctx, "%s: allocation of path failed\n", __func__);
-               close(dfd);
-               return NULL;
-       }
        group = calloc(1, sizeof(*group));
        if (!group) {
                err(ctx, "allocation of group failed\n");
                close(dfd);
-               goto err_group;
+               return NULL;
        }
 
        group_base_string = strdup(group_base);
@@ -902,10 +886,12 @@
        }
        if (sscanf(basename(group_base_string),
                                "group%" SCNu64 ".%" SCNu64, &device_id, 
&group_id) != 2) {
+               free(group_base_string);
                close(dfd);
                goto err_group;
        }
-       group->group_path = (char *)group_base;
+       free(group_base_string);
+
        group->device = device;
        device->group = group;
        group->id = group_id;
@@ -933,20 +919,19 @@
        group->group_path = strdup(group_base);
        if (!group->group_path) {
                err(ctx, "forming of group path failed\n");
-               goto err_read;
+               goto err_buf;
        }
 
        list_add_tail(&device->groups, &group->list);
-       free(path);
        return group;
 
-err_read:
+err_buf:
        free(group->group_buf);
+err_read:
        free(group->group_engines);
        free(group->group_wqs);
 err_group:
        free(group);
-       free(path);
        return NULL;
 }
 
@@ -957,7 +942,6 @@
        struct accfg_device *device = parent;
        struct accfg_ctx *ctx;
        struct accfg_group *group;
-       char *path;
        char *engine_base_string;
        int dfd;
        uint64_t device_id, engine_id;
@@ -971,34 +955,26 @@
        if (dfd < 0)
                return NULL;
 
-       path = calloc(1, strlen(engine_base) + 100);
-       if (!path) {
-               err(ctx, "%s: allocation of path failed\n", __func__);
-               close(dfd);
-               return NULL;
-       }
-
        engine = calloc(1, sizeof(*engine));
        if (!engine) {
                err(ctx, "allocation of engine failed\n");
                close(dfd);
-               goto err_engine;
+               return NULL;
        }
 
        engine_base_string = strdup(engine_base);
        if (!engine_base_string) {
                err(ctx, "conversion of engine_base_string failed\n");
                close(dfd);
-               free(engine);
                goto err_engine;
        }
        if (sscanf(basename(engine_base_string),
                        "engine%" SCNu64 ".%" SCNu64, &device_id, &engine_id) 
!= 2) {
+               free(engine_base_string);
                close(dfd);
-               free(path);
-               free(engine);
-               return NULL;
+               goto err_engine;
        }
+       free(engine_base_string);
 
        engine->id = engine_id;
        engine->group = group;
@@ -1009,26 +985,23 @@
        engine->engine_path = strdup(engine_base);
        if (!engine->engine_path) {
                err(ctx, "forming of engine path failed\n");
-               goto err_read;
+               goto err_engine;
        }
 
        engine->engine_buf = calloc(1, strlen(engine_base) + MAX_BUF_LEN);
        if (!engine->engine_buf) {
                err(ctx, "allocation of engine buffer failed\n");
-               goto err_read;
+               goto err_path;
        }
        engine->buf_len = strlen(engine_base) + MAX_BUF_LEN;
 
        list_add_tail(&device->engines, &engine->list);
-       free(path);
        return engine;
 
-err_read:
-       free(engine->engine_buf);
+err_path:
        free(engine->engine_path);
-       free(engine);
 err_engine:
-       free(path);
+       free(engine);
        return NULL;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/idxd-config-accel-config-v3.4.8/accfg/mdev.c 
new/idxd-config-accel-config-v3.5.0/accfg/mdev.c
--- old/idxd-config-accel-config-v3.4.8/accfg/mdev.c    2022-09-21 
23:16:06.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.0/accfg/mdev.c    2022-10-15 
02:29:50.000000000 +0200
@@ -95,7 +95,7 @@
                return 0;
        }
 
-       argc = parse_options(argc, argv, options, u, 0);
+       parse_options(argc, argv, options, u, 0);
        if (opt_called)
                return 0;
 
@@ -112,7 +112,7 @@
                return rc;
 
        uuid_unparse(uuid, uuid_str);
-       printf("Created mdev wth uuid: %s\n", uuid_str);
+       printf("Created mdev with uuid: %s\n", uuid_str);
 
        return 0;
 }
@@ -148,7 +148,7 @@
                return 0;
        }
 
-       argc = parse_options(argc, argv, options, u, 0);
+       parse_options(argc, argv, options, u, 0);
        if (opt_called)
                return 0;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/idxd-config-accel-config-v3.4.8/accfg/test.c 
new/idxd-config-accel-config-v3.5.0/accfg/test.c
--- old/idxd-config-accel-config-v3.4.8/accfg/test.c    2022-09-21 
23:16:06.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.0/accfg/test.c    2022-10-15 
02:29:50.000000000 +0200
@@ -46,6 +46,7 @@
        printf("run test_libaccfg\n");
        rc = test_libaccfg(loglevel, test, ctx);
        fprintf(stderr, "test-libaccfg: %s\n", result(rc));
+       free(test);
        if (rc)
                return rc;
        printf("SUCCESS!\n");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/idxd-config-accel-config-v3.4.8/accfg-test.spec.in 
new/idxd-config-accel-config-v3.5.0/accfg-test.spec.in
--- old/idxd-config-accel-config-v3.4.8/accfg-test.spec.in      2022-09-21 
23:16:06.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.0/accfg-test.spec.in      2022-10-15 
02:29:50.000000000 +0200
@@ -70,8 +70,7 @@
 %license licenses/accel-config-licenses LICENSE_GPL_2_0
 %{_bindir}/accel-config
 %{_mandir}/man1/accel-config*
-%{_sysconfdir}/accel-config/accel-config.conf.sample
-%{_datadir}/accel-config/contrib/configs/*
+%{_sysconfdir}/accel-config/contrib/configs/*
 
 %files -n LNAME
 %defattr(-,root,root)
@@ -90,6 +89,6 @@
 %files -n %{name}-test
 %defattr(-,root,root)
 %license Documentation/COPYING LICENSE_GPL_2_0
-%{_datadir}/accel-config/test/*
+%{_prefix}/lib/accel-config/test/*
 
 %changelog
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/idxd-config-accel-config-v3.4.8/accfg.spec.in 
new/idxd-config-accel-config-v3.5.0/accfg.spec.in
--- old/idxd-config-accel-config-v3.4.8/accfg.spec.in   2022-09-21 
23:16:06.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.0/accfg.spec.in   2022-10-15 
02:29:50.000000000 +0200
@@ -62,8 +62,7 @@
 %license licenses/accel-config-licenses LICENSE_GPL_2_0
 %{_bindir}/accel-config
 %{_mandir}/man1/accel-config*
-%{_sysconfdir}/accel-config/accel-config.conf.sample
-%{_datadir}/accel-config/contrib/configs/*
+%{_sysconfdir}/accel-config/contrib/configs/*
 
 %files -n LNAME
 %defattr(-,root,root)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/idxd-config-accel-config-v3.4.8/ccan/list/list.h 
new/idxd-config-accel-config-v3.5.0/ccan/list/list.h
--- old/idxd-config-accel-config-v3.4.8/ccan/list/list.h        2022-09-21 
23:16:06.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.0/ccan/list/list.h        2022-10-15 
02:29:50.000000000 +0200
@@ -553,20 +553,20 @@
 /**
  * list_for_each_off - iterate through a list of memory regions.
  * @h: the list_head
- * @i: the pointer to a memory region wich contains list node data.
+ * @i: the pointer to a memory region which contains list node data.
  * @off: offset(relative to @i) at which list node data resides.
  *
  * This is a low-level wrapper to iterate @i over the entire list, used to
- * implement all oher, more high-level, for-each constructs. It's a for loop,
+ * implement all other, more high-level, for-each constructs. It's a for loop,
  * so you can break and continue as normal.
  *
  * WARNING! Being the low-level macro that it is, this wrapper doesn't know
- * nor care about the type of @i. The only assumtion made is that @i points
+ * nor care about the type of @i. The only assumption made is that @i points
  * to a chunk of memory that at some @offset, relative to @i, contains a
  * properly filled `struct node_list' which in turn contains pointers to
- * memory chunks and it's turtles all the way down. Whith all that in mind
+ * memory chunks and it's turtles all the way down. With all that in mind
  * remember that given the wrong pointer/offset couple this macro will
- * happilly churn all you memory untill SEGFAULT stops it, in other words
+ * happily churn all you memory until SEGFAULT stops it, in other words
  * caveat emptor.
  *
  * It is worth mentioning that one of legitimate use-cases for that wrapper
@@ -590,7 +590,7 @@
  * list_for_each_safe_off - iterate through a list of memory regions, maybe
  * during deletion
  * @h: the list_head
- * @i: the pointer to a memory region wich contains list node data.
+ * @i: the pointer to a memory region which contains list node data.
  * @nxt: the structure containing the list_node
  * @off: offset(relative to @i) at which list node data resides.
  *
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/idxd-config-accel-config-v3.4.8/debian/accel-config-test.install 
new/idxd-config-accel-config-v3.5.0/debian/accel-config-test.install
--- old/idxd-config-accel-config-v3.4.8/debian/accel-config-test.install        
2022-09-21 23:16:06.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.0/debian/accel-config-test.install        
2022-10-15 02:29:50.000000000 +0200
@@ -1 +1 @@
-usr/share/accel-config/test/*
+usr/lib/accel-config/test/*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/idxd-config-accel-config-v3.4.8/debian/accel-config.install 
new/idxd-config-accel-config-v3.5.0/debian/accel-config.install
--- old/idxd-config-accel-config-v3.4.8/debian/accel-config.install     
2022-09-21 23:16:06.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.0/debian/accel-config.install     
2022-10-15 02:29:50.000000000 +0200
@@ -1,4 +1,3 @@
-etc/accel-config/accel-config.conf.sample
 usr/bin/accel-config
 usr/share/man/man1/accel-config*
-usr/share/accel-config/contrib/configs/*
+etc/accel-config/contrib/configs/*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/idxd-config-accel-config-v3.4.8/debian/changelog 
new/idxd-config-accel-config-v3.5.0/debian/changelog
--- old/idxd-config-accel-config-v3.4.8/debian/changelog        2022-09-21 
23:16:06.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.0/debian/changelog        2022-10-15 
02:29:50.000000000 +0200
@@ -1,3 +1,28 @@
+accel-config (3.5.0-1) unstable; urgency=medium
+
+  * Update debian scripts to install contrib/configs in /etc
+  * Update rpm scripts to install contrib/configs in /etc
+  * Install contrib/configs folder in /etc
+  * Rename IAXTEST to IAATEST in test/common
+  * Make error paths more consistent for add_wq, add_group, add_engine
+  * Clean up unused path variable.
+  * Clean up memory leak, and erroneous assignment
+  * Update debian scripts to install test programs in /usr/lib
+  * Update rpm scripts to install test programs in /usr/lib
+  * Install test programs in /usr/lib
+  * Fix some clang scan-build warnings and bugs
+  * Fix various typos and spelling mistakes in code and comments
+  * debian/control: set architecture to just i386 and amd64
+  * debian: libaccel library should be suffixed with 1
+  * test/common: Make bash script executable
+  * debian/copyright: remove trailing comments, clean up linitan
+    warnings
+  * debian/copyright: clean up lintian copyright warnings
+  * debian/copyright: clean up globbing order lintian warnings
+  * debian/rules: add execute bit to script
+
+ -- Ramesh Thomas <ramesh.tho...@intel.com>  Fri, 14 Oct 2022 17:25:50 -0700
+
 accel-config (3.4.8-1) unstable; urgency=medium
 
   * load/unload idxd_vdev and iaa_crypto modules at cleanup
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/idxd-config-accel-config-v3.4.8/debian/control 
new/idxd-config-accel-config-v3.5.0/debian/control
--- old/idxd-config-accel-config-v3.4.8/debian/control  2022-09-21 
23:16:06.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.0/debian/control  2022-10-15 
02:29:50.000000000 +0200
@@ -16,7 +16,7 @@
 
 Package: accel-config
 Section: misc
-Architecture: linux-any
+Architecture: i386 amd64
 Depends: ${misc:Depends}, ${shlibs:Depends}
 Pre-Depends: ${misc:Pre-Depends}
 Description: Utility for configuring the DSA subsystem
@@ -27,8 +27,8 @@
  This package contains a utility for configuring the DSA (Data Stream
  Accelerator) subsystem in the Linux kernel.
 
-Package: libaccel-config
-Architecture: linux-any
+Package: libaccel-config1
+Architecture: i386 amd64
 Depends: ${misc:Depends}, ${shlibs:Depends}
 Description: Utility library wrapping the Intel DSA sysfs ABI. It provides
  access to work queues by using the mmap portal from the character device and
@@ -40,15 +40,15 @@
 
 Package: libaccel-config-dev
 Section: libdevel
-Architecture: linux-any
-Depends: libaccel-config (= ${binary:Version}), ${misc:Depends}
+Architecture: i386 amd64
+Depends: libaccel-config1 (= ${binary:Version}), ${misc:Depends}
 Description: Development files for libaccel-config
  Header files and development library for compiling C programs to link with the
  libaccel-config library and manage the DSA subsystem in the Linux kernel.
 
 Package: accel-config-test
 Section: misc
-Architecture: linux-any
+Architecture: i386 amd64
 Depends: ${misc:Depends}, ${shlibs:Depends}
 Pre-Depends: ${misc:Pre-Depends}
 Description: Utility to test the DSA subsystem
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/idxd-config-accel-config-v3.4.8/debian/copyright 
new/idxd-config-accel-config-v3.5.0/debian/copyright
--- old/idxd-config-accel-config-v3.4.8/debian/copyright        2022-09-21 
23:16:06.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.0/debian/copyright        2022-10-15 
02:29:50.000000000 +0200
@@ -4,18 +4,24 @@
 
 Files: *
 Copyright: 2021 Intel Corporation
-License: LGPLv2.1
-
-Files: accfg/lib/*
-Copyright: 2021 Intel Corporation
-License: LGPLv2.1
+License: LGPL-2.1
+ On Debian systems, the complete text of the GNU General Public
+ License can be found in `/usr/share/common-licenses/LGPL-2.1'.
 
 Files: accfg/*
        Documentation/*
        util/*
        test/*
 Copyright: 2021 Intel Corporation
-License: GPLv2
+License: GPL-2
+ On Debian systems, the complete text of the GNU General Public
+ License can be found in `/usr/share/common-licenses/GPL-2'.
+
+Files: accfg/lib/*
+Copyright: 2021 Intel Corporation
+License: LGPL-2.1
+ On Debian systems, the complete text of the GNU General Public
+ License can be found in `/usr/share/common-licenses/LGPL-2.1'.
 
 Files: debian/*
 Copyright: 2021 Intel Corporation
@@ -34,13 +40,4 @@
  along with this program. If not, see <https://www.gnu.org/licenses/>
  .
  On Debian systems, the complete text of the GNU General
- Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
-
-# Please also look if there are files or directories which have a
-# different copyright/license attached and list them here.
-# Please avoid picking licenses with terms that are more restrictive than the
-# packaged work, as it may make Debian's contributions unacceptable upstream.
-#
-# If you need, there are some extra license texts available in two places:
-#   /usr/share/debhelper/dh_make/licenses/
-#   /usr/share/common-licenses/
+ Public License version 2 can be found in `/usr/share/common-licenses/GPL-2'.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/idxd-config-accel-config-v3.4.8/debian/libaccel-config.install 
new/idxd-config-accel-config-v3.5.0/debian/libaccel-config.install
--- old/idxd-config-accel-config-v3.4.8/debian/libaccel-config.install  
2022-09-21 23:16:06.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.0/debian/libaccel-config.install  
1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-usr/lib/libaccel-config.so.*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/idxd-config-accel-config-v3.4.8/debian/libaccel-config1.install 
new/idxd-config-accel-config-v3.5.0/debian/libaccel-config1.install
--- old/idxd-config-accel-config-v3.4.8/debian/libaccel-config1.install 
1970-01-01 01:00:00.000000000 +0100
+++ new/idxd-config-accel-config-v3.5.0/debian/libaccel-config1.install 
2022-10-15 02:29:50.000000000 +0200
@@ -0,0 +1 @@
+usr/lib/libaccel-config.so.*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/idxd-config-accel-config-v3.4.8/git-version 
new/idxd-config-accel-config-v3.5.0/git-version
--- old/idxd-config-accel-config-v3.4.8/git-version     2022-09-21 
23:16:06.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.0/git-version     2022-10-15 
02:29:50.000000000 +0200
@@ -19,7 +19,7 @@
        fi
 }
 
-DEF_VER=3.4.8
+DEF_VER=3.5.0
 
 LF='
 '
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/idxd-config-accel-config-v3.4.8/test/Makefile.am 
new/idxd-config-accel-config-v3.5.0/test/Makefile.am
--- old/idxd-config-accel-config-v3.4.8/test/Makefile.am        2022-09-21 
23:16:06.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.0/test/Makefile.am        2022-10-15 
02:29:50.000000000 +0200
@@ -13,7 +13,7 @@
        iaa_test
 
 if ENABLE_TEST
-testprogdir = $(datadir)/accel-config/test/
+testprogdir = $(prefix)/lib/accel-config/test/
 testprog_DATA = common
 testprog_SCRIPTS = dsa_user_test_runner.sh iaa_user_test_runner.sh
 testprog_PROGRAMS = dsa_test iaa_test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/idxd-config-accel-config-v3.4.8/test/accel_test.h 
new/idxd-config-accel-config-v3.5.0/test/accel_test.h
--- old/idxd-config-accel-config-v3.4.8/test/accel_test.h       2022-09-21 
23:16:06.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.0/test/accel_test.h       2022-10-15 
02:29:50.000000000 +0200
@@ -219,7 +219,7 @@
        /* overwritten again by the HW */
        *addr_u8 =  ~(*addr_u8);
 
-       /* For PF at read, we need to restore it to the orginal value */
+       /* For PF at read, we need to restore it to the original value */
        if (!(status & ACCTEST_COMP_STAT_RW_MASK))
                *addr_u8 = ~(*addr_u8);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/idxd-config-accel-config-v3.4.8/test/common 
new/idxd-config-accel-config-v3.5.0/test/common
--- old/idxd-config-accel-config-v3.4.8/test/common     2022-09-21 
23:16:06.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.0/test/common     2022-10-15 
02:29:50.000000000 +0200
@@ -39,12 +39,12 @@
        exit "$EXIT_FAILURE"
 fi
 
-# IAXTEST
+# IAATEST
 #
 if [ -f "./iaa_test" ] && [ -x "./iaa_test" ]; then
-       export IAXTEST=./iaa_test
+       export IAATEST=./iaa_test
 elif [ -f "$TESTDIR/iaa_test" ] && [ -x "$TESTDIR/iaa_test" ]; then
-       export IAXTEST="$TESTDIR"/iaa_test
+       export IAATEST="$TESTDIR"/iaa_test
 else
        echo "Couldn't find an iaa_test binary"
        exit "$EXIT_FAILURE"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/idxd-config-accel-config-v3.4.8/test/dsa.c 
new/idxd-config-accel-config-v3.5.0/test/dsa.c
--- old/idxd-config-accel-config-v3.4.8/test/dsa.c      2022-09-21 
23:16:06.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.0/test/dsa.c      2022-10-15 
02:29:50.000000000 +0200
@@ -458,7 +458,7 @@
 {
        int rc = 0;
 
-       dbg("initilizing task %#lx\n", tsk);
+       dbg("initializing task %#lx\n", tsk);
 
        switch (opcode) {
        /* After memory move, do drain opcode test */
@@ -1468,6 +1468,8 @@
                return rc;
        case DSA_OPCODE_DIF_INS:
                rc = task_result_verify_dif(tsk, tsk->xfer_size, 
mismatch_expected);
+               if (rc != ACCTEST_STATUS_OK)
+                       return rc;
                rc = task_result_verify_dif_tags(tsk, tsk->xfer_size);
                return rc;
        case DSA_OPCODE_DIF_STRP:
@@ -1477,6 +1479,9 @@
        case DSA_OPCODE_DIF_UPDT:
                rc = task_result_verify_dif(tsk, tsk->xfer_size - 8 * tsk->blks,
                                            mismatch_expected);
+               if (rc != ACCTEST_STATUS_OK)
+                       return rc;
+
                rc = task_result_verify_dif_tags(tsk, tsk->xfer_size - 8 * 
tsk->blks);
                return rc;
        }
@@ -1815,7 +1820,7 @@
 
 int task_result_verify_dif(struct task *tsk, unsigned long xfer_size, int 
mismatch_expected)
 {
-       int rc;
+       int rc = 0;
        unsigned long i;
        unsigned long blks = tsk->blks;
        unsigned long buf_size = dif_blk_arr[tsk->blk_idx_flg];
@@ -2069,7 +2074,7 @@
 
        core_stat = stat_val(btsk->core_task->comp->status);
        if (core_stat == DSA_COMP_SUCCESS) {
-               info("core task success, chekcing sub-tasks\n");
+               info("core task success, checking sub-tasks\n");
        } else if (!bof && core_stat == DSA_COMP_BATCH_FAIL) {
                info("partial complete with NBOF, checking sub-tasks\n");
        } else {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/idxd-config-accel-config-v3.4.8/test/dsa_prep.c 
new/idxd-config-accel-config-v3.5.0/test/dsa_prep.c
--- old/idxd-config-accel-config-v3.4.8/test/dsa_prep.c 2022-09-21 
23:16:06.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.0/test/dsa_prep.c 2022-10-15 
02:29:50.000000000 +0200
@@ -610,7 +610,6 @@
                hw->dest_ref_tag_seed = compl->dif_upd_dest_ref_tag;
        }
        if (tsk->opcode == DSA_OPCODE_DIF_CHECK) {
-               blks_completed = compl->bytes_completed / 
(dif_arr[tsk->blk_idx_flg] + 8);
                hw->xfer_size -= compl->bytes_completed;
                hw->chk_app_tag_seed = compl->dif_chk_app_tag;
                hw->chk_ref_tag_seed = compl->dif_chk_ref_tag;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/idxd-config-accel-config-v3.4.8/test/iaa.c 
new/idxd-config-accel-config-v3.5.0/test/iaa.c
--- old/idxd-config-accel-config-v3.4.8/test/iaa.c      2022-09-21 
23:16:06.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.0/test/iaa.c      2022-10-15 
02:29:50.000000000 +0200
@@ -496,7 +496,7 @@
 {
        int rc = 0;
 
-       dbg("initilizing single task %#lx\n", tsk);
+       dbg("initializing single task %#lx\n", tsk);
 
        /* allocate memory: src1*/
        switch (opcode) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/idxd-config-accel-config-v3.4.8/util/abspath.c 
new/idxd-config-accel-config-v3.5.0/util/abspath.c
--- old/idxd-config-accel-config-v3.4.8/util/abspath.c  2022-09-21 
23:16:06.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.0/util/abspath.c  2022-10-15 
02:29:50.000000000 +0200
@@ -7,14 +7,9 @@
 char *prefix_filename(const char *pfx, const char *arg)
 {
        struct strbuf path = STRBUF_INIT;
-       size_t pfx_len = pfx ? strlen(pfx) : 0;
 
-       if (!pfx_len)
-               ;
-       else if (is_absolute_path(arg))
-               pfx_len = 0;
-       else
-               strbuf_add(&path, pfx, pfx_len);
+       if (pfx && !is_absolute_path(arg))
+               strbuf_add(&path, pfx, strlen(pfx));
 
        strbuf_addstr(&path, arg);
        return strbuf_detach(&path, NULL);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/idxd-config-accel-config-v3.4.8/util/json.c 
new/idxd-config-accel-config-v3.5.0/util/json.c
--- old/idxd-config-accel-config-v3.4.8/util/json.c     2022-09-21 
23:16:06.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.0/util/json.c     2022-10-15 
02:29:50.000000000 +0200
@@ -35,7 +35,7 @@
        /*
         * We convert bytes to either centi-M{ega,ibi}bytes or
         * centi-G{igi,ibi}bytes, with appropriate rounding, and then print
-        * 1/100th of those as a decimal.  We allow upto 2048Megabytes before
+        * 1/100th of those as a decimal.  We allow up to 2048Megabytes before
         * converting to gigabytes, as that shows more precision and isn't too
         * large a number.  Terabytes are not yet handled.
         *
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/idxd-config-accel-config-v3.4.8/util/parse-options.h 
new/idxd-config-accel-config-v3.5.0/util/parse-options.h
--- old/idxd-config-accel-config-v3.4.8/util/parse-options.h    2022-09-21 
23:16:06.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.0/util/parse-options.h    2022-10-15 
02:29:50.000000000 +0200
@@ -76,7 +76,7 @@
  *
  * `argh`::
  *   token to explain the kind of argument this option wants. Keep it
- *   homogenous across the repository.
+ *   homogeneous across the repository.
  *
  * `help`::
  *   the short help associated to what the option does.
@@ -85,7 +85,7 @@
  *
  * `flags`::
  *   mask of parse_opt_option_flags.
- *   PARSE_OPT_OPTARG: says that the argument is optionnal (not for BOOLEANs)
+ *   PARSE_OPT_OPTARG: says that the argument is optional (not for BOOLEANs)
  *   PARSE_OPT_NOARG: says that this option takes no argument, for CALLBACKs
  *   PARSE_OPT_NONEG: says that this option cannot be negated
  *   PARSE_OPT_HIDDEN this option is skipped in the default usage, showed in
@@ -151,7 +151,7 @@
        .flags = PARSE_OPT_LASTARG_DEFAULT | PARSE_OPT_NOARG}
 
 /* parse_options() will filter out the processed options and leave the
- * non-option argments in argv[].
+ * non-option arguments in argv[].
  * Returns the number of arguments left in argv[].
  */
 extern int parse_options(int argc, const char **argv,
@@ -170,7 +170,7 @@
 extern NORETURN void usage_with_options(const char * const *usagestr,
                                         const struct option *options);
 
-/*----- incremantal advanced APIs -----*/
+/*----- incremental advanced APIs -----*/
 
 enum {
        PARSE_OPT_HELP = -1,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/idxd-config-accel-config-v3.4.8/util/strbuf.c 
new/idxd-config-accel-config-v3.5.0/util/strbuf.c
--- old/idxd-config-accel-config-v3.4.8/util/strbuf.c   2022-09-21 
23:16:06.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.0/util/strbuf.c   2022-10-15 
02:29:50.000000000 +0200
@@ -85,7 +85,8 @@
        memmove(sb->buf + pos + dlen,
                        sb->buf + pos + len,
                        sb->len - pos - len);
-       memcpy(sb->buf + pos, data, dlen);
+       if (data)
+               memcpy(sb->buf + pos, data, dlen);
        strbuf_setlen(sb, sb->len + dlen - len);
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/idxd-config-accel-config-v3.4.8/util/strbuf.h 
new/idxd-config-accel-config-v3.5.0/util/strbuf.h
--- old/idxd-config-accel-config-v3.4.8/util/strbuf.h   2022-09-21 
23:16:06.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.0/util/strbuf.h   2022-10-15 
02:29:50.000000000 +0200
@@ -29,7 +29,7 @@
  *    build complex strings/buffers whose final size isn't easily known.
  *
  *    It is NOT legal to copy the ->buf pointer away.
- *    `strbuf_detach' is the operation that detachs a buffer from its shell
+ *    `strbuf_detach' is the operation that detaches a buffer from its shell
  *    while keeping the shell valid wrt its invariants.
  *
  * 2. the ->buf member is a byte array that has at least ->len + 1 bytes

Reply via email to