mk-fg / python-pulse-control

Python high-level interface and ctypes-based bindings for PulseAudio (libpulse)
https://pypi.org/project/pulsectl/
MIT License
170 stars 36 forks source link

tests: lookup executables in PATH #40

Closed mweinelt closed 4 years ago

mweinelt commented 4 years ago

I'm in the process of packaging this library for NixOS and some tests were failing because pulseaudio/paplay could not be found. So let's look them up.

mk-fg commented 4 years ago

Thanks.

I think subprocess already uses execvpe though, so it should probably be enough to pass PATH=os.environ['PATH'] in env dict there, so that libc would handle it normally, without any potential shutil quirks. I'll double-check...

mk-fg commented 4 years ago

Tried the following:

So replaced shutil.which with just copying PATH into env from os.environ in c505cb1, let me know if it works, or if maybe shutil.which does something differently from libc in a way that is more useful here.

mk-fg commented 4 years ago

maybe shutil.which does something differently from libc in a way that is more useful here.

Also not entirely sure if python would actually use execvpe from libc, come to think of it, as its os.execvpe might have its own wrapper around syscall instead, for whatever compatibility reasons (e.g. with libc's which don't have execvpe).

mweinelt commented 4 years ago

Yes, that works and is even cleaner. Thanks!

I have one remaining Assertion fail for me, can you maybe give me a hint?

 ======================================================================
ERROR: setUpClass (pulsectl.tests.dummy_instance.DummyTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/source/pulsectl/tests/dummy_instance.py", line 142, in setUpClass
    assert not cls.proc and not cls.tmp_dir, [cls.proc, cls.tmp_dir]
AssertionError: [<subprocess.Popen object at 0x7ffff64ce310>, '/build/pulsectl-tests.tnaf2uwh']
Complete Log
running test
WARNING: Testing via this command is deprecated and will be removed in a future version. Users looking for a generic test entry point independent of test runner are encouraged to use tox.
running egg_info
writing pulsectl.egg-info/PKG-INFO
writing dependency_links to pulsectl.egg-info/dependency_links.txt
writing requirements to pulsectl.egg-info/requires.txt
writing top-level names to pulsectl.egg-info/top_level.txt
reading manifest file 'pulsectl.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'pulsectl.egg-info/SOURCES.txt'
running build_ext
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
test_cli (pulsectl.tests.dummy_instance.DummyTests) ... ok
test_connect (pulsectl.tests.dummy_instance.DummyTests) ... Failed to load cookie file from cookie: No such file or directory
Failed to load cookie file from cookie: No such file or directory
Failed to load cookie file from cookie: No such file or directory
ok
test_default_set (pulsectl.tests.dummy_instance.DummyTests) ... Failed to load cookie file from cookie: No such file or directory
ok
test_enums (pulsectl.tests.dummy_instance.DummyTests) ... ok
test_events (pulsectl.tests.dummy_instance.DummyTests) ... Failed to load cookie file from cookie: No such file or directory
ok
test_ext_stream_restore (pulsectl.tests.dummy_instance.DummyTests) ... Failed to load cookie file from cookie: No such file or directory
ok
test_get_peak_sample (pulsectl.tests.dummy_instance.DummyTests) ... Failed to load cookie file from cookie: No such file or directory
ok
test_get_sink_src (pulsectl.tests.dummy_instance.DummyTests) ... Failed to load cookie file from cookie: No such file or directory
ok
test_module_funcs (pulsectl.tests.dummy_instance.DummyTests) ... Failed to load cookie file from cookie: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
ok
test_server_info (pulsectl.tests.dummy_instance.DummyTests) ... Failed to load cookie file from cookie: No such file or directory
ok
test_sink_src (pulsectl.tests.dummy_instance.DummyTests) ... Failed to load cookie file from cookie: No such file or directory
ok
test_stream (pulsectl.tests.dummy_instance.DummyTests) ... Failed to load cookie file from cookie: No such file or directory
ok
test_stream_move (pulsectl.tests.dummy_instance.DummyTests) ... Failed to load cookie file from cookie: No such file or directory
ok
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
test_crash_after_connect (pulsectl.tests.dummy_instance.PulseCrashTests) ... E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
Failed to load cookie file from cookie: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
ok
test_reconnect (pulsectl.tests.dummy_instance.PulseCrashTests) ... E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
Failed to load cookie file from cookie: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
Failed to load cookie file from cookie: No such file or directory
Failed to load cookie file from cookie: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
ok
ERROR
test_crash_after_connect (pulsectl.tests.dummy_instance.PulseCrashTests) ... E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
Failed to load cookie file from cookie: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
ok
test_reconnect (pulsectl.tests.dummy_instance.PulseCrashTests) ... E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
Failed to load cookie file from cookie: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
Failed to load cookie file from cookie: No such file or directory
Failed to load cookie file from cookie: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
ok

======================================================================
ERROR: setUpClass (pulsectl.tests.dummy_instance.DummyTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/source/pulsectl/tests/dummy_instance.py", line 142, in setUpClass
    assert not cls.proc and not cls.tmp_dir, [cls.proc, cls.tmp_dir]
AssertionError: [, '/build/pulsectl-tests.tnaf2uwh']

----------------------------------------------------------------------
Ran 17 tests in 9.219s

FAILED (errors=1)
Test failed: 
error: Test failed: 
mk-fg commented 4 years ago

I've never tried "python setup.py test" command myself, which is what you seem to be using, looks like it re-uses class, which I used to store pulseaudio process and temp dir between tests.

Can reproduce the error here with that command, there's probably a better place to store such state between tests, will check. Workaround can be to use "python -m unittest ..." as README suggests.

mweinelt commented 4 years ago

Indeed that was it, thank you!

mk-fg commented 4 years ago

Noticed that I just forgot to reset these variables assert checks in tearDownClass, so was my bad, fixed in c3085aa.

This bug kinda highlights why maybe you shouldn't use "python setup.py test" - it sets up and tears down whole class for running each individual test from there, so you get pulseaudio daemon starting/stopping few dozen times, kinda suboptimal :)

Also it says "WARNING: Testing via this command is deprecated and will be removed in a future version. Users looking for a generic test entry point independent of test runner are encouraged to use tox" but not sure if tox might run them in same exact way. Either way, probably best to run these in some over fashion, and approach mentioned in README should probably be fine.

mk-fg commented 4 years ago

I'm also a bit puzzled where these errors from pulseaudio dbus module are coming from, as _dummy_pulse_init in that test setup shouldn't be loading it, and not sure why pulseaudio might do it in some kind of implicit way.

mk-fg commented 4 years ago

not sure why pulseaudio might do it in some kind of implicit way

Maybe you can run some specific test with PA_DEBUG set and paste the log somewhere, e.g. from:

PA_DEBUG=t python -m unittest pulsectl.tests.all.DummyTests.test_stream_move

It should dump a lot of info about what it's doing, and maybe there's a hint as to why it loads that dbus module and produces all these noisy errors from it.

mweinelt commented 4 years ago

PA_DEBUG=t python -m unittest pulsectl.tests.all.DummyTests.test_stream_move

running install tests
I: [pulseaudio] main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
I: [pulseaudio] main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted
D: [pulseaudio] core-rtclock.c: Timer slack is set to 50 us.
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
I: [pulseaudio] core-util.c: Failed to acquire high-priority scheduling: Input/output error
I: [pulseaudio] main.c: This is PulseAudio 13.0-rebootstrapped
D: [pulseaudio] main.c: Compilation host: x86_64-pc-linux-gnu
D: [pulseaudio] main.c: Compilation CFLAGS: -g -O2 -Wall -W -Wextra -pipe -Wno-long-long -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter -fno-common -fdiagnostics-show-option -fdiagnostics-color=auto
D: [pulseaudio] main.c: Running on host: Linux x86_64 5.5.11 #1-NixOS SMP Sat Mar 21 07:15:56 UTC 2020
D: [pulseaudio] main.c: Found 8 CPUs.
I: [pulseaudio] main.c: Page size is 4096 bytes
D: [pulseaudio] main.c: Compiled with Valgrind support: no
D: [pulseaudio] main.c: Running in valgrind mode: no
D: [pulseaudio] main.c: Running in VM: no
D: [pulseaudio] main.c: Running from build tree: no
D: [pulseaudio] main.c: Optimized build: yes
D: [pulseaudio] main.c: FASTPATH defined, only fast path asserts disabled.
I: [pulseaudio] main.c: Machine ID is localhost.
I: [pulseaudio] main.c: Using runtime directory /build/pulsectl-tests.mwd7x98l/pulse.
I: [pulseaudio] main.c: Using state directory /build/pulsectl-tests.mwd7x98l.
I: [pulseaudio] main.c: Using modules directory /nix/store/3fzclsdg7zz4850sdjk930qmn0s25lj4-pulseaudio-13.0/lib/pulse-13.0/modules.
I: [pulseaudio] main.c: Running in system mode: no
I: [pulseaudio] main.c: System supports high resolution timers
D: [pulseaudio] memblock.c: Using shared memfd memory pool with 1024 slots of size 64.0 KiB each, total size is 64.0 MiB, maximum usable slot size is 65472
I: [pulseaudio] cpu-x86.c: CPU flags: CMOV MMX SSE SSE2 SSE3 SSSE3 SSE4_1 SSE4_2
I: [pulseaudio] svolume_mmx.c: Initialising MMX optimized volume functions.
I: [pulseaudio] remap_mmx.c: Initialising MMX optimized remappers.
I: [pulseaudio] svolume_sse.c: Initialising SSE2 optimized volume functions.
I: [pulseaudio] remap_sse.c: Initialising SSE2 optimized remappers.
I: [pulseaudio] sconv_sse.c: Initialising SSE2 optimized conversions.
D: [pulseaudio] cli-command.c: Parsing script '/dev/stdin'
I: [pulseaudio] module.c: Loaded "module-augment-properties" (index: #0; argument: "").
I: [pulseaudio] module.c: Loaded "module-default-device-restore" (index: #1; argument: "").
I: [pulseaudio] module.c: Loaded "module-rescue-streams" (index: #2; argument: "").
D: [pulseaudio] module-always-sink.c: Autoloading null-sink as no other sinks detected.
I: [pulseaudio] sink.c: Created sink 0 "auto_null" with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
I: [pulseaudio] sink.c:     device.description = "Dummy Output"
I: [pulseaudio] sink.c:     device.class = "abstract"
I: [pulseaudio] sink.c:     device.icon_name = "audio-card"
I: [pulseaudio] source.c: Created source 0 "auto_null.monitor" with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
I: [pulseaudio] source.c:     device.description = "Monitor of Dummy Output"
I: [pulseaudio] source.c:     device.class = "monitor"
I: [pulseaudio] source.c:     device.icon_name = "audio-input-microphone"
D: [null-sink] module-null-sink.c: Thread starting up
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
I: [null-sink] util.c: Failed to acquire real-time scheduling: Input/output error
D: [pulseaudio] sink.c: auto_null: state: INIT -> IDLE
D: [pulseaudio] source.c: auto_null.monitor: state: INIT -> IDLE
I: [pulseaudio] core.c: default_source: (unset) -> auto_null.monitor
I: [pulseaudio] core.c: default_sink: (unset) -> auto_null
D: [pulseaudio] core-subscribe.c: Dropped redundant event due to change event.
I: [pulseaudio] module.c: Loaded "module-null-sink" (index: #4; argument: "sink_name=auto_null sink_properties='device.description="Dummy Output"'").
I: [pulseaudio] module.c: Loaded "module-always-sink" (index: #3; argument: "").
I: [pulseaudio] module.c: Loaded "module-intended-roles" (index: #5; argument: "").
D: [pulseaudio] module-suspend-on-idle.c: Sink auto_null becomes idle, timeout in 5 seconds.
I: [pulseaudio] module.c: Loaded "module-suspend-on-idle" (index: #6; argument: "").
I: [pulseaudio] module.c: Loaded "module-position-event-sounds" (index: #7; argument: "").
D: [pulseaudio] stream-interaction.c: Using role 'phone' as trigger role.
D: [pulseaudio] stream-interaction.c: Using roles 'music' and 'video' as cork roles.
I: [pulseaudio] module.c: Loaded "module-role-cork" (index: #8; argument: "").
I: [pulseaudio] module.c: Loaded "module-filter-heuristics" (index: #9; argument: "").
I: [pulseaudio] module.c: Loaded "module-filter-apply" (index: #10; argument: "").
I: [pulseaudio] module.c: Loaded "module-switch-on-port-available" (index: #11; argument: "").
I: [pulseaudio] module-stream-restore.c: Successfully opened database file '/build/pulsectl-tests.mwd7x98l/localhost-stream-volumes'.
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1 added for object /org/pulseaudio/stream_restore1
I: [pulseaudio] module.c: Loaded "module-stream-restore" (index: #12; argument: "").
W: [pulseaudio] authkey.c: Failed to open cookie file '/build/.config/pulse/cookie': No such file or directory
W: [pulseaudio] authkey.c: Failed to load authentication key '/build/.config/pulse/cookie': No such file or directory
W: [pulseaudio] authkey.c: Failed to open cookie file '/build/.pulse-cookie': No such file or directory
W: [pulseaudio] authkey.c: Failed to load authentication key '/build/.pulse-cookie': No such file or directory
D: [pulseaudio] authkey.c: Got 0 bytes from cookie file '/build/.config/pulse/cookie', expected 256
I: [pulseaudio] module.c: Loaded "module-native-protocol-tcp" (index: #13; argument: "auth-anonymous=true listen=127.0.0.1 port=46147").
I: [pulseaudio] module.c: Loaded "module-native-protocol-tcp" (index: #14; argument: "auth-anonymous=true listen=::1 port=44339").
I: [pulseaudio] module.c: Loaded "module-native-protocol-unix" (index: #15; argument: "").
I: [pulseaudio] sink.c: Created sink 1 "null" with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
I: [pulseaudio] sink.c:     device.description = "Null Output"
I: [pulseaudio] sink.c:     device.class = "abstract"
I: [pulseaudio] sink.c:     device.icon_name = "audio-card"
I: [pulseaudio] source.c: Created source 1 "null.monitor" with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
I: [pulseaudio] source.c:     device.description = "Monitor of Null Output"
I: [pulseaudio] source.c:     device.class = "monitor"
I: [pulseaudio] source.c:     device.icon_name = "audio-input-microphone"
D: [null-sink] module-null-sink.c: Thread starting up
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
I: [null-sink] util.c: Failed to acquire real-time scheduling: Input/output error
D: [pulseaudio] sink.c: null: state: INIT -> IDLE
D: [pulseaudio] source.c: null.monitor: state: INIT -> IDLE
D: [pulseaudio] module-suspend-on-idle.c: Sink null becomes idle, timeout in 5 seconds.
I: [pulseaudio] module-always-sink.c: A new sink has been discovered. Unloading null-sink.
I: [pulseaudio] module.c: Loaded "module-null-sink" (index: #16; argument: "").
I: [pulseaudio] sink.c: Created sink 2 "null.2" with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
I: [pulseaudio] sink.c:     device.description = "Null Output"
I: [pulseaudio] sink.c:     device.class = "abstract"
I: [pulseaudio] sink.c:     device.icon_name = "audio-card"
I: [pulseaudio] source.c: Created source 2 "null.2.monitor" with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
I: [pulseaudio] source.c:     device.description = "Monitor of Null Output"
I: [pulseaudio] source.c:     device.class = "monitor"
I: [pulseaudio] source.c:     device.icon_name = "audio-input-microphone"
D: [null-sink] module-null-sink.c: Thread starting up
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
I: [null-sink] util.c: Failed to acquire real-time scheduling: Input/output error
D: [pulseaudio] sink.c: null.2: state: INIT -> IDLE
D: [pulseaudio] source.c: null.2.monitor: state: INIT -> IDLE
D: [pulseaudio] module-suspend-on-idle.c: Sink null.2 becomes idle, timeout in 5 seconds.
I: [pulseaudio] module.c: Loaded "module-null-sink" (index: #17; argument: "").
W: [pulseaudio] server-lookup.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
W: [pulseaudio] main.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
I: [pulseaudio] main.c: Daemon startup complete.
I: [pulseaudio] module.c: Unloading "module-null-sink" (index: #4).
D: [pulseaudio] module-rescue-streams.c: No sink inputs to move away.
I: [pulseaudio] core.c: default_sink: auto_null -> null
I: [pulseaudio] core.c: default_source: auto_null.monitor -> null.monitor
D: [pulseaudio] core-subscribe.c: Dropped redundant event due to change event.
D: [pulseaudio] core-subscribe.c: Dropped redundant event due to change event.
D: [pulseaudio] sink.c: auto_null: state: IDLE -> UNLINKED
D: [pulseaudio] module-rescue-streams.c: No source outputs to move away.
D: [pulseaudio] source.c: auto_null.monitor: state: IDLE -> UNLINKED
D: [pulseaudio] core-subscribe.c: Dropped redundant event due to remove event.
D: [pulseaudio] core-subscribe.c: Dropped redundant event due to remove event.
D: [pulseaudio] core-subscribe.c: Dropped redundant event due to remove event.
D: [pulseaudio] core-subscribe.c: Dropped redundant event due to remove event.
D: [null-sink] module-null-sink.c: Thread shutting down
I: [pulseaudio] sink.c: Freeing sink 0 "auto_null"
I: [pulseaudio] source.c: Freeing source 0 "auto_null.monitor"
I: [pulseaudio] module.c: Unloaded "module-null-sink" (index: #4).
D: [pulseaudio] core-subscribe.c: Dropped redundant event due to remove event.
Failed to load cookie file from cookie: No such file or directory
I: [pulseaudio] client.c: Created 0 "Native client (UNIX socket client)"
D: [pulseaudio] protocol-native.c: Protocol version: remote 33, local 33
I: [pulseaudio] protocol-native.c: Got credentials: uid=1000 gid=100 success=1
D: [pulseaudio] protocol-native.c: SHM possible: yes
D: [pulseaudio] protocol-native.c: Negotiated SHM: yes
D: [pulseaudio] protocol-native.c: Memfd possible: yes
D: [pulseaudio] protocol-native.c: Negotiated SHM type: shared memfd
D: [pulseaudio] memblock.c: Using shared memfd memory pool with 1024 slots of size 64.0 KiB each, total size is 64.0 MiB, maximum usable slot size is 65472
D: [pulseaudio] srbchannel.c: SHM block is 65472 bytes, ringbuffer capacity is 2 * 32712 bytes
D: [pulseaudio] protocol-native.c: Enabling srbchannel...
D: [pulseaudio] module-augment-properties.c: Looking for .desktop file for python3.7
D: [pulseaudio] protocol-native.c: Client enabled srbchannel.
I: [pulseaudio] client.c: Created 1 "Native client (UNIX socket client)"
D: [pulseaudio] protocol-native.c: Protocol version: remote 33, local 33
I: [pulseaudio] protocol-native.c: Got credentials: uid=1000 gid=100 success=1
D: [pulseaudio] protocol-native.c: SHM possible: yes
D: [pulseaudio] protocol-native.c: Negotiated SHM: yes
D: [pulseaudio] protocol-native.c: Memfd possible: yes
D: [pulseaudio] protocol-native.c: Negotiated SHM type: shared memfd
D: [pulseaudio] memblock.c: Using shared memfd memory pool with 1024 slots of size 64.0 KiB each, total size is 64.0 MiB, maximum usable slot size is 65472
D: [pulseaudio] srbchannel.c: SHM block is 65472 bytes, ringbuffer capacity is 2 * 32712 bytes
D: [pulseaudio] protocol-native.c: Enabling srbchannel...
D: [pulseaudio] module-augment-properties.c: Looking for .desktop file for pacat
D: [pulseaudio] protocol-native.c: Client enabled srbchannel.
D: [pulseaudio] module-intended-roles.c: Not setting device for stream /dev/zero, because it lacks role.
D: [pulseaudio] sink-input.c: Negotiated format: pcm, format.sample_format = "\"s16le\""  format.rate = "44100"  format.channels = "2"  format.channel_map = "\"front-left,front-right\""
D: [pulseaudio] module-suspend-on-idle.c: Sink null becomes busy, resuming.
D: [pulseaudio] module-suspend-on-idle.c: Sink null becomes idle, timeout in 5 seconds.
D: [pulseaudio] memblockq.c: memblockq requested: maxlength=33554432, tlength=0, base=4, prebuf=0, minreq=1 maxrewind=0
D: [pulseaudio] memblockq.c: memblockq sanitized: maxlength=33554432, tlength=33554432, base=4, prebuf=0, minreq=4 maxrewind=0
I: [pulseaudio] sink-input.c: Created input 0 "/dev/zero" on null with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
I: [pulseaudio] sink-input.c:     application.name = "paplay"
I: [pulseaudio] sink-input.c:     media.name = "/dev/zero"
I: [pulseaudio] sink-input.c:     native-protocol.peer = "UNIX socket client"
I: [pulseaudio] sink-input.c:     native-protocol.version = "33"
I: [pulseaudio] sink-input.c:     application.process.id = "50"
I: [pulseaudio] sink-input.c:     application.process.user = "nixbld"
I: [pulseaudio] sink-input.c:     application.process.host = "localhost"
I: [pulseaudio] sink-input.c:     application.process.binary = "pacat"
I: [pulseaudio] sink-input.c:     application.language = "C"
I: [pulseaudio] sink-input.c:     application.process.machine_id = "localhost"
I: [pulseaudio] sink-input.c:     module-stream-restore.id = "sink-input-by-application-name:paplay"
I: [pulseaudio] protocol-native.c: Requested tlength=2000.00 ms, minreq=20.00 ms
D: [pulseaudio] protocol-native.c: Traditional mode enabled, modifying sink usec only for compat with minreq.
D: [pulseaudio] protocol-native.c: Requested latency=1960.00 ms, Received latency=1960.00 ms
D: [pulseaudio] memblockq.c: memblockq requested: maxlength=4194304, tlength=352800, base=4, prebuf=349276, minreq=3528 maxrewind=0
D: [pulseaudio] memblockq.c: memblockq sanitized: maxlength=4194304, tlength=352800, base=4, prebuf=349276, minreq=3528 maxrewind=0
I: [pulseaudio] protocol-native.c: Final latency 3960.00 ms = 1960.00 ms + 2*20.00 ms + 1960.00 ms
D: [pulseaudio] sink.c: null: state: IDLE -> RUNNING
I: [pulseaudio] module-stream-restore.c: Storing volume/mute/device for stream sink-input-by-application-name:paplay.
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1.RestoreEntry added for object /org/pulseaudio/stream_restore1/entry0
D: [null-sink] protocol-native.c: Requesting rewind due to end of underrun.
D: [null-sink] module-null-sink.c: Requested to rewind 345744 bytes.
D: [null-sink] sink.c: Processing rewind...
D: [null-sink] sink-input.c: Have to rewind 322412 bytes on render memblockq.
D: [null-sink] source.c: Processing rewind...
D: [null-sink] module-null-sink.c: Rewound 322412 bytes.
D: [pulseaudio] module-suspend-on-idle.c: Sink null becomes idle, timeout in 5 seconds.
D: [pulseaudio] sink-input.c: Starting to move sink input 0 from 'null'
D: [null-sink] sink-input.c: Have to rewind 352628 bytes on render memblockq.
D: [null-sink] sink-input.c: Have to rewind 352628 bytes on implementor.
D: [null-sink] sink.c: Requesting rewind due to started move
D: [null-sink] module-null-sink.c: Requested to rewind 352800 bytes.
D: [null-sink] sink.c: Processing rewind...
D: [null-sink] source.c: Processing rewind...
D: [null-sink] module-null-sink.c: Rewound 352624 bytes.
D: [pulseaudio] sink.c: null: state: RUNNING -> IDLE
D: [pulseaudio] module-suspend-on-idle.c: Sink null becomes idle, timeout in 5 seconds.
I: [pulseaudio] protocol-native.c: Requested tlength=2000.00 ms, minreq=20.00 ms
D: [pulseaudio] protocol-native.c: Traditional mode enabled, modifying sink usec only for compat with minreq.
D: [pulseaudio] protocol-native.c: Requested latency=1960.00 ms, Received latency=1960.00 ms
D: [pulseaudio] sink.c: null.2: state: IDLE -> RUNNING
D: [null-sink] sink.c: Requesting rewind due to finished move
D: [null-sink] module-null-sink.c: Requested to rewind 322292 bytes.
D: [pulseaudio] sink-input.c: Successfully moved sink input 0 to null.2.
D: [null-sink] sink.c: Processing rewind...
D: [pulseaudio] module-suspend-on-idle.c: Sink null.2 becomes busy, resuming.
D: [null-sink] sink-input.c: Have to rewind 322292 bytes on render memblockq.
D: [null-sink] source.c: Processing rewind...
D: [null-sink] module-null-sink.c: Rewound 322292 bytes.
I: [pulseaudio] module-stream-restore.c: Storing volume/mute/device for stream sink-input-by-application-name:paplay.
D: [pulseaudio] module-suspend-on-idle.c: Sink null.2 becomes idle, timeout in 5 seconds.
D: [pulseaudio] sink-input.c: Starting to move sink input 0 from 'null.2'
D: [null-sink] sink-input.c: Have to rewind 352540 bytes on render memblockq.
D: [null-sink] sink-input.c: Have to rewind 352540 bytes on implementor.
D: [null-sink] sink.c: Requesting rewind due to started move
D: [null-sink] module-null-sink.c: Requested to rewind 352800 bytes.
D: [null-sink] sink.c: Processing rewind...
D: [null-sink] source.c: Processing rewind...
D: [null-sink] module-null-sink.c: Rewound 352536 bytes.
D: [pulseaudio] sink.c: null.2: state: RUNNING -> IDLE
D: [pulseaudio] module-suspend-on-idle.c: Sink null.2 becomes idle, timeout in 5 seconds.
I: [pulseaudio] protocol-native.c: Requested tlength=2000.00 ms, minreq=20.00 ms
D: [pulseaudio] protocol-native.c: Traditional mode enabled, modifying sink usec only for compat with minreq.
D: [pulseaudio] protocol-native.c: Requested latency=1960.00 ms, Received latency=1960.00 ms
D: [pulseaudio] sink.c: null: state: IDLE -> RUNNING
D: [null-sink] sink.c: Requesting rewind due to finished move
D: [pulseaudio] sink-input.c: Successfully moved sink input 0 to null.
D: [null-sink] module-null-sink.c: Requested to rewind 352800 bytes.
D: [pulseaudio] module-suspend-on-idle.c: Sink null becomes busy, resuming.
D: [null-sink] sink.c: Processing rewind...
D: [null-sink] sink-input.c: Have to rewind 352800 bytes on render memblockq.
D: [null-sink] source.c: Processing rewind...
D: [null-sink] module-null-sink.c: Rewound 352800 bytes.
I: [pulseaudio] module-stream-restore.c: Storing volume/mute/device for stream sink-input-by-application-name:paplay.
D: [pulseaudio] module-suspend-on-idle.c: Sink null becomes idle, timeout in 5 seconds.
D: [null-sink] module-null-sink.c: Requested to rewind 352800 bytes.
D: [null-sink] sink.c: Processing rewind...
D: [null-sink] source.c: Processing rewind...
D: [null-sink] module-null-sink.c: Rewound 39764 bytes.
D: [pulseaudio] sink.c: null: state: RUNNING -> IDLE
D: [pulseaudio] module-suspend-on-idle.c: Sink null becomes idle, timeout in 5 seconds.
D: [pulseaudio] core.c: Hmm, no streams around, trying to vacuum.
I: [pulseaudio] sink-input.c: Freeing input 0 "/dev/zero"
I: [pulseaudio] client.c: Freed 1 "paplay"
I: [pulseaudio] protocol-native.c: Connection died.
I: [pulseaudio] client.c: Freed 0 "t"
I: [pulseaudio] protocol-native.c: Connection died.
.I: [pulseaudio] main.c: Got signal SIGTERM.
I: [pulseaudio] main.c: Exiting.
I: [pulseaudio] main.c: Daemon shutdown initiated.
I: [pulseaudio] module.c: Unloading "module-null-sink" (index: #17).
D: [pulseaudio] module-rescue-streams.c: No sink inputs to move away.
D: [pulseaudio] sink.c: null.2: state: IDLE -> UNLINKED
D: [pulseaudio] module-rescue-streams.c: No source outputs to move away.
D: [pulseaudio] source.c: null.2.monitor: state: IDLE -> UNLINKED
D: [null-sink] module-null-sink.c: Thread shutting down
I: [pulseaudio] sink.c: Freeing sink 2 "null.2"
I: [pulseaudio] source.c: Freeing source 2 "null.2.monitor"
I: [pulseaudio] module.c: Unloaded "module-null-sink" (index: #17).
I: [pulseaudio] module.c: Unloading "module-null-sink" (index: #16).
D: [pulseaudio] module-always-sink.c: Autoloading null-sink as no other sinks detected.
I: [pulseaudio] sink.c: Created sink 3 "auto_null" with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
I: [pulseaudio] sink.c:     device.description = "Dummy Output"
I: [pulseaudio] sink.c:     device.class = "abstract"
I: [pulseaudio] sink.c:     device.icon_name = "audio-card"
I: [pulseaudio] source.c: Created source 3 "auto_null.monitor" with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
I: [pulseaudio] source.c:     device.description = "Monitor of Dummy Output"
I: [pulseaudio] source.c:     device.class = "monitor"
I: [pulseaudio] source.c:     device.icon_name = "audio-input-microphone"
D: [null-sink] module-null-sink.c: Thread starting up
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [null-sink] util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
I: [null-sink] util.c: Failed to acquire real-time scheduling: Input/output error
D: [pulseaudio] sink.c: auto_null: state: INIT -> IDLE
D: [pulseaudio] source.c: auto_null.monitor: state: INIT -> IDLE
D: [pulseaudio] module-suspend-on-idle.c: Sink auto_null becomes idle, timeout in 5 seconds.
I: [pulseaudio] module.c: Loaded "module-null-sink" (index: #18; argument: "sink_name=auto_null sink_properties='device.description="Dummy Output"'").
D: [pulseaudio] module-rescue-streams.c: No sink inputs to move away.
I: [pulseaudio] core.c: default_sink: null -> auto_null
I: [pulseaudio] core.c: default_source: null.monitor -> auto_null.monitor
D: [pulseaudio] core-subscribe.c: Dropped redundant event due to change event.
D: [pulseaudio] sink.c: null: state: IDLE -> UNLINKED
D: [pulseaudio] module-rescue-streams.c: No source outputs to move away.
D: [pulseaudio] source.c: null.monitor: state: IDLE -> UNLINKED
D: [null-sink] module-null-sink.c: Thread shutting down
I: [pulseaudio] sink.c: Freeing sink 1 "null"
I: [pulseaudio] source.c: Freeing source 1 "null.monitor"
I: [pulseaudio] module.c: Unloaded "module-null-sink" (index: #16).
I: [pulseaudio] module.c: Unloading "module-native-protocol-unix" (index: #15).
I: [pulseaudio] module.c: Unloaded "module-native-protocol-unix" (index: #15).
I: [pulseaudio] module.c: Unloading "module-native-protocol-tcp" (index: #14).
I: [pulseaudio] module.c: Unloaded "module-native-protocol-tcp" (index: #14).
I: [pulseaudio] module.c: Unloading "module-native-protocol-tcp" (index: #13).
I: [pulseaudio] module.c: Unloaded "module-native-protocol-tcp" (index: #13).
I: [pulseaudio] module.c: Unloading "module-stream-restore" (index: #12).
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1 removed from object /org/pulseaudio/stream_restore1
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1.RestoreEntry removed from object /org/pulseaudio/stream_restore1/entry0
I: [pulseaudio] module.c: Unloaded "module-stream-restore" (index: #12).
I: [pulseaudio] module.c: Unloading "module-switch-on-port-available" (index: #11).
I: [pulseaudio] module.c: Unloaded "module-switch-on-port-available" (index: #11).
I: [pulseaudio] module.c: Unloading "module-filter-apply" (index: #10).
I: [pulseaudio] module.c: Unloaded "module-filter-apply" (index: #10).
I: [pulseaudio] module.c: Unloading "module-filter-heuristics" (index: #9).
I: [pulseaudio] module.c: Unloaded "module-filter-heuristics" (index: #9).
I: [pulseaudio] module.c: Unloading "module-role-cork" (index: #8).
I: [pulseaudio] module.c: Unloaded "module-role-cork" (index: #8).
I: [pulseaudio] module.c: Unloading "module-position-event-sounds" (index: #7).
I: [pulseaudio] module.c: Unloaded "module-position-event-sounds" (index: #7).
I: [pulseaudio] module.c: Unloading "module-suspend-on-idle" (index: #6).
I: [pulseaudio] module.c: Unloaded "module-suspend-on-idle" (index: #6).
I: [pulseaudio] module.c: Unloading "module-intended-roles" (index: #5).
I: [pulseaudio] module.c: Unloaded "module-intended-roles" (index: #5).
I: [pulseaudio] module.c: Unloading "module-always-sink" (index: #3).
I: [pulseaudio] module.c: Unloaded "module-always-sink" (index: #3).
I: [pulseaudio] module.c: Unloading "module-rescue-streams" (index: #2).
I: [pulseaudio] module.c: Unloaded "module-rescue-streams" (index: #2).
I: [pulseaudio] module.c: Unloading "module-default-device-restore" (index: #1).
I: [pulseaudio] module.c: Unloaded "module-default-device-restore" (index: #1).
I: [pulseaudio] module.c: Unloading "module-augment-properties" (index: #0).
I: [pulseaudio] module.c: Unloaded "module-augment-properties" (index: #0).
W: [pulseaudio] module.c: After module unload, module 'module-null-sink' was still loaded!
I: [pulseaudio] module.c: Unloading "module-null-sink" (index: #18).
I: [pulseaudio] core.c: default_sink: auto_null -> (unset)
D: [pulseaudio] core-subscribe.c: Dropped redundant event due to change event.
D: [pulseaudio] sink.c: auto_null: state: IDLE -> UNLINKED
I: [pulseaudio] core.c: default_source: auto_null.monitor -> (unset)
D: [pulseaudio] core-subscribe.c: Dropped redundant event due to change event.
D: [pulseaudio] source.c: auto_null.monitor: state: IDLE -> UNLINKED
D: [pulseaudio] core-subscribe.c: Dropped redundant event due to remove event.
D: [pulseaudio] core-subscribe.c: Dropped redundant event due to remove event.
D: [pulseaudio] core-subscribe.c: Dropped redundant event due to remove event.
D: [pulseaudio] core-subscribe.c: Dropped redundant event due to remove event.
D: [null-sink] module-null-sink.c: Thread shutting down
I: [pulseaudio] sink.c: Freeing sink 3 "auto_null"
I: [pulseaudio] source.c: Freeing source 3 "auto_null.monitor"
I: [pulseaudio] module.c: Unloaded "module-null-sink" (index: #18).
D: [pulseaudio] core-subscribe.c: Dropped redundant event due to remove event.
I: [pulseaudio] main.c: Daemon terminated.

----------------------------------------------------------------------
Ran 1 test in 0.815s
mweinelt commented 4 years ago

The build runs in a clean container, so there is no dbus running.

mk-fg commented 4 years ago

Thanks.

Looks like it's not dbus pulse module, but something logged from core-util.c and util.c from way before modules even start loading, weird.

Don't have that happening here, and suspect it might be some optional gtk-ish functionality, will check the source for where that message originates bit later, report back if will find anything.

mk-fg commented 4 years ago

Oh, actually, it randomly occured to me that these are related:

E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
I: [pulseaudio] core-util.c: Failed to acquire high-priority scheduling: Input/output error

I think these dbus errors are from pulse connecting to rtkit via system dbus (to ask for rt priority), which I'm probably not getting here because either there is system bus available (it is), or just RT stuff disabled in daemon.conf.

So these are probably normal in such situation where daemon.conf requests a thing which pulse can't do, and shouldn't be worked around.

mweinelt commented 4 years ago

Okay, so I'll leave it like this. Doesn't seem to do any harm besides messy logs.