Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package umockdev for openSUSE:Factory checked in at 2023-09-12 21:02:01 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/umockdev (Old) and /work/SRC/openSUSE:Factory/.umockdev.new.1766 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "umockdev" Tue Sep 12 21:02:01 2023 rev:17 rq:1110171 version:0.17.18 Changes: -------- --- /work/SRC/openSUSE:Factory/umockdev/umockdev.changes 2023-04-27 19:59:03.977266579 +0200 +++ /work/SRC/openSUSE:Factory/.umockdev.new.1766/umockdev.changes 2023-09-12 21:02:04.634450330 +0200 @@ -1,0 +2,6 @@ +Thu Sep 7 20:55:27 UTC 2023 - Atri Bhattacharya <badshah...@gmail.com> + +- Update to version 0.17.18: + * Fix some potential crashes spotted by Coverity. + +------------------------------------------------------------------- Old: ---- umockdev-0.17.17.tar.xz New: ---- umockdev-0.17.18.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ umockdev.spec ++++++ --- /var/tmp/diff_new_pack.pAiwsd/_old 2023-09-12 21:02:05.902495560 +0200 +++ /var/tmp/diff_new_pack.pAiwsd/_new 2023-09-12 21:02:05.906495703 +0200 @@ -19,7 +19,7 @@ %define shlib libumockdev0 %define shlibpre libumockdev-preload0 Name: umockdev -Version: 0.17.17 +Version: 0.17.18 Release: 0 Summary: Mock hardware devices for creating unit tests and bug reporting License: LGPL-2.1-or-later ++++++ umockdev-0.17.17.tar.xz -> umockdev-0.17.18.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umockdev-0.17.17/.version new/umockdev-0.17.18/.version --- old/umockdev-0.17.17/.version 2023-04-16 10:10:31.431640000 +0200 +++ new/umockdev-0.17.18/.version 2023-07-26 09:24:28.837155800 +0200 @@ -1 +1 @@ -0.17.17 +0.17.18 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umockdev-0.17.17/packaging/umockdev.spec new/umockdev-0.17.18/packaging/umockdev.spec --- old/umockdev-0.17.17/packaging/umockdev.spec 2023-04-16 10:07:08.000000000 +0200 +++ new/umockdev-0.17.18/packaging/umockdev.spec 2023-07-26 09:20:17.000000000 +0200 @@ -3,7 +3,7 @@ Release: 1%{?dist} Summary: Mock hardware devices -License: LGPLv2+ +License: LGPL-2.1-or-later URL: https://github.com/martinpitt/%{name} Source0: https://github.com/martinpitt/%{name}/releases/download/%{version}/%{name}-%{version}.tar.xz diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umockdev-0.17.17/src/getversion.sh new/umockdev-0.17.18/src/getversion.sh --- old/umockdev-0.17.17/src/getversion.sh 2023-04-16 10:07:08.000000000 +0200 +++ new/umockdev-0.17.18/src/getversion.sh 2023-07-26 09:20:17.000000000 +0200 @@ -1,6 +1,6 @@ #!/bin/sh ROOT=$(dirname $(dirname $(realpath "$0"))) -if [ -n "${MESON_SOURCE_ROOT:-}/.git" ] && VER=$(git -C "$MESON_SOURCE_ROOT" describe); then +if [ -e "${MESON_SOURCE_ROOT:-}/.git" ] && VER=$(git -C "$MESON_SOURCE_ROOT" describe); then # make version number distribution friendly VER=$(echo "$VER" | sed 's/-/./g') # when invoked as dist script, write the stamp; this is false when invoked from project.version() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umockdev-0.17.17/src/libumockdev-preload.c new/umockdev-0.17.18/src/libumockdev-preload.c --- old/umockdev-0.17.17/src/libumockdev-preload.c 2023-04-16 10:07:08.000000000 +0200 +++ new/umockdev-0.17.18/src/libumockdev-preload.c 2023-07-26 09:20:17.000000000 +0200 @@ -185,6 +185,8 @@ if (strncmp(abspath, "/dev/", 5) == 0 || strcmp(abspath, "/dev") == 0 || strncmp(abspath, "/proc/", 6) == 0) check_exist = 1; + else if (strncmp(abspath, "/run/udev/data", 14) == 0) + check_exist = 0; else if (strncmp(abspath, "/sys/", 5) != 0 && strcmp(abspath, "/sys") != 0) return path; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umockdev-0.17.17/tests/test-umockdev-run.vala new/umockdev-0.17.18/tests/test-umockdev-run.vala --- old/umockdev-0.17.17/tests/test-umockdev-run.vala 2023-04-16 10:07:08.000000000 +0200 +++ new/umockdev-0.17.18/tests/test-umockdev-run.vala 2023-07-26 09:20:17.000000000 +0200 @@ -593,7 +593,8 @@ // clean up lockfile after killed X server if (FileUtils.remove ("/tmp/.X5-lock") < 0) debug("failed to clean up /tmp/.X5-lock: %m"); - checked_remove ("/tmp/.X11-unix/X5"); + if (FileUtils.remove ("/tmp/.X11-unix/X5") < 0) + debug("failed to clean up .X11-unix/X5: %m"); assert_cmpstr (xinput_err, CompareOperator.EQ, ""); assert_cmpint (xinput_exit, CompareOperator.EQ, 0); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umockdev-0.17.17/tests/test-umockdev.py new/umockdev-0.17.18/tests/test-umockdev.py --- old/umockdev-0.17.17/tests/test-umockdev.py 2023-04-16 10:07:08.000000000 +0200 +++ new/umockdev-0.17.18/tests/test-umockdev.py 2023-07-26 09:20:17.000000000 +0200 @@ -18,22 +18,29 @@ # You should have received a copy of the GNU Lesser General Public License # along with this program; If not, see <http://www.gnu.org/licenses/>. -import sys -import os.path -import unittest import fcntl +import os.path import struct +import sys +import unittest +import warnings try: import gi gi.require_version('GUdev', '1.0') gi.require_version('UMockdev', '1.0') - from gi.repository import GLib, GUdev + # 'pkgutil.get_loader' is deprecated and slated for removal in Python 3.14 + with warnings.catch_warnings(): + warnings.filterwarnings('ignore', category=DeprecationWarning) + from gi.repository import GLib, GUdev except ImportError as e: print('GI module not available, skipping test: %s' % e) sys.exit(0) -from gi.repository import UMockdev +with warnings.catch_warnings(): + warnings.filterwarnings('ignore', category=DeprecationWarning) + from gi.repository import UMockdev + class Testbed(unittest.TestCase): def setUp(self): @@ -174,7 +181,7 @@ self.assertEqual(counter, [0, 0, 1, syspath, '0815', '1']) def test_add_from_string(self): - self.assertTrue(self.testbed.add_from_string ('''P: /devices/dev1 + self.assertTrue(self.testbed.add_from_string('''P: /devices/dev1 E: SIMPLE_PROP=1 E: SUBSYSTEM=pci H: binary_attr=41FF0005FF00 @@ -187,13 +194,13 @@ devices = enum.execute() self.assertEqual([d.get_sysfs_path() for d in devices], ['/sys/devices/dev1']) - device = client.query_by_sysfs_path ('/sys/devices/dev1') - self.assertEqual (device.get_subsystem(), 'pci') - #self.assertEqual (device.get_parent(), None) - self.assertEqual (device.get_sysfs_attr('simple_attr'), '1') - self.assertEqual (device.get_sysfs_attr('multiline_attr'), - 'a\\b\nc\\d\nlast') - self.assertEqual (device.get_property('SIMPLE_PROP'), '1') + device = client.query_by_sysfs_path('/sys/devices/dev1') + self.assertEqual(device.get_subsystem(), 'pci') + # self.assertEqual(device.get_parent(), None) + self.assertEqual(device.get_sysfs_attr('simple_attr'), '1') + self.assertEqual(device.get_sysfs_attr('multiline_attr'), + 'a\\b\nc\\d\nlast') + self.assertEqual(device.get_property('SIMPLE_PROP'), '1') with open(os.path.join(self.testbed.get_root_dir(), '/sys/devices/dev1/binary_attr'), 'rb') as f: self.assertEqual(f.read(), b'\x41\xFF\x00\x05\xFF\x00') @@ -207,12 +214,12 @@ assertRaisesRegex = self.assertRaisesRegexp # does not start with P: - with assertRaisesRegex(GLib.GError, 'must start with.*P:') as cm: - self.testbed.add_from_string ('E: SIMPLE_PROP=1\n') + with assertRaisesRegex(GLib.GError, 'must start with.*P:'): + self.testbed.add_from_string('E: SIMPLE_PROP=1\n') # no value - with assertRaisesRegex(GLib.GError, 'malformed attribute') as cm: - self.testbed.add_from_string ('P: /devices/dev1\nE: SIMPLE_PROP\n') + with assertRaisesRegex(GLib.GError, 'malformed attribute'): + self.testbed.add_from_string('P: /devices/dev1\nE: SIMPLE_PROP\n') def test_custom_ioctl(self): handler = UMockdev.IoctlBase() @@ -234,7 +241,7 @@ handler.connect("handle-ioctl", handle_ioctl) - self.testbed.add_from_string ('P: /devices/test\nN: test\nE: SUBSYSTEM=test') + self.testbed.add_from_string('P: /devices/test\nN: test\nE: SUBSYSTEM=test') self.testbed.attach_ioctl('/dev/test', handler) fd = os.open('/dev/test', os.O_RDONLY) @@ -247,4 +254,5 @@ self.testbed.detach_ioctl('/dev/test') self.testbed.attach_ioctl('/dev/test', handler) + unittest.main(testRunner=unittest.TextTestRunner(stream=sys.stdout, verbosity=2))