Projects
Mega:23.09
umockdev
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 2
View file
_service:tar_scm:umockdev.spec
Changed
@@ -1,5 +1,5 @@ Name: umockdev -Version: 0.17.17 +Version: 0.17.18 Release: 1 Summary: Mock hardware devices License: LGPLv2+ @@ -61,6 +61,9 @@ %{_datadir}/vala/vapi/umockdev-1.0.vapi %changelog +* Wed Aug 23 2023 yaoxin <yao_xin001@hoperun.com> - 0.17.18-1 +- Update to 0.17.18 + * Mon Jul 17 2023 chenchen <chen_aka_jan@163.com> - 0.17.17-1 - update to 0.17.17
View file
_service:tar_scm:umockdev-0.17.17.tar.xz/.version -> _service:tar_scm:umockdev-0.17.18.tar.xz/.version
Changed
@@ -1,1 +1,1 @@ -0.17.17 +0.17.18
View file
_service:tar_scm:umockdev-0.17.17.tar.xz/packaging/umockdev.spec -> _service:tar_scm:umockdev-0.17.18.tar.xz/packaging/umockdev.spec
Changed
@@ -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
View file
_service:tar_scm:umockdev-0.17.17.tar.xz/src/getversion.sh -> _service:tar_scm:umockdev-0.17.18.tar.xz/src/getversion.sh
Changed
@@ -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()
View file
_service:tar_scm:umockdev-0.17.17.tar.xz/src/libumockdev-preload.c -> _service:tar_scm:umockdev-0.17.18.tar.xz/src/libumockdev-preload.c
Changed
@@ -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;
View file
_service:tar_scm:umockdev-0.17.17.tar.xz/tests/test-umockdev-run.vala -> _service:tar_scm:umockdev-0.17.18.tar.xz/tests/test-umockdev-run.vala
Changed
@@ -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);
View file
_service:tar_scm:umockdev-0.17.17.tar.xz/tests/test-umockdev.py -> _service:tar_scm:umockdev-0.17.18.tar.xz/tests/test-umockdev.py
Changed
@@ -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))
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2