Commit e10fa04d authored by Aleks Totic's avatar Aleks Totic Committed by Commit Bot

Fix slow tests on Linux, add XDG_RUNTIME_DIR to content_shell environment.

They symptom was really slow pipes between content_shell and test runner.

I did not know what XDG_RUNTIME_DIR was, so I looked it up. Seems relevant to the symptom.
Curious about what the root cause was.

https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

XDG_RUNTIME_DIR defines the base directory relative to which user-specific non-essential runtime files and other file objects (such as sockets, named pipes, ...) should be stored. The directory MUST be owned by the user, and he MUST be the only one having read and write access to it. Its Unix access mode MUST be 0700.

The lifetime of the directory MUST be bound to the user being logged in. It MUST be created when the user first logs in and if the user fully logs out the directory MUST be removed. If the user logs in more than once he should get pointed to the same directory, and it is mandatory that the directory continues to exist from his first login to his last logout on the system, and not removed in between. Files in the directory MUST not survive reboot or a full logout/login cycle.

The directory MUST be on a local file system and not shared with any other system. The directory MUST by fully-featured by the standards of the operating system. More specifically, on Unix-like operating systems AF_UNIX sockets, symbolic links, hard links, proper permissions, file locking, sparse files, memory mapping, file change notifications, a reliable hard link count must be supported, and no restrictions on the file name character set should be imposed. Files in this directory MAY be subjected to periodic clean-up. To ensure that your files are not removed, they should have their access time timestamp modified at least once every 6 hours of monotonic time or the 'sticky' bit should be set on the file.

If $XDG_RUNTIME_DIR is not set applications should fall back to a replacement directory with similar capabilities and print a warning message. Applications should use this directory for communication and synchronization purposes and should not place larger files in it, since it might reside in runtime memory and cannot necessarily be swapped out to disk.

Bug: 725229
Change-Id: Ia34c349c94dd44357c135b98deab1a119fa557a6
Reviewed-on: https://chromium-review.googlesource.com/572640Reviewed-by: default avatarQuinten Yearsley <qyearsley@chromium.org>
Commit-Queue: Aleks Totic <atotic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#486980}
parent 55981d4d
...@@ -1066,6 +1066,7 @@ class Port(object): ...@@ -1066,6 +1066,7 @@ class Port(object):
'LD_LIBRARY_PATH', 'LD_LIBRARY_PATH',
'DBUS_SESSION_BUS_ADDRESS', 'DBUS_SESSION_BUS_ADDRESS',
'XDG_DATA_DIRS', 'XDG_DATA_DIRS',
'XDG_RUNTIME_DIR'
] ]
clean_env['DISPLAY'] = self.host.environ.get('DISPLAY', ':1') clean_env['DISPLAY'] = self.host.environ.get('DISPLAY', ':1')
if self.host.platform.is_mac(): if self.host.platform.is_mac():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment