[Wayland-bugs] [Bug 103475] Tests do not fail, if XDG_RUNTIME_DIR is unset

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Oct 27 13:12:35 UTC 2017


https://bugs.freedesktop.org/show_bug.cgi?id=103475

--- Comment #4 from isacviridion at aol.com ---
As I see it there are 3 cases possible:
1) XDG_RUNTIME_DIR is not set
2) XDG_RUNTIME_DIR is set and directory exists
3) XDG_RUNTIME_DIR is set and direcotry does not exist

1) and 2) are currently covered as I see it. I do not believe that 1) should be
removed, since it is a state that one is also called on to consider. For this
see the link you provided, or the part I copied as a quote (QUOTE_1) down
below. I possibly could be enhanced, since XDG_RUNTIME_DIR should be set by the
system by my reading of the specs and should not be left unset.

3) is the problem I ran into. It also is referenced as a possibility in the
specs (QUOTE_2). The solution I see, would be, to simply create the folder with
correct permissions in case it is missing. In my case, doing this manually also
fixed the problem of the tests failing. Regardless, the assumption of the
folder just being present can imo due to the amount of possible configurations
not be made.

Again, thank you for your swiftness and your time in taking this up.

QUOTE_1: "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."

QUOTE_2: "If, when attempting to write a file, the destination directory is
non-existant an attempt should be made to create it with permission 0700. If
the destination directory exists already the permissions should not be changed.
The application should be prepared to handle the case where the file could not
be written, either because the directory was non-existant and could not be
created, or for any other reason. In such case it may chose to present an error
message to the user."

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-bugs/attachments/20171027/8f2a9fcc/attachment.html>


More information about the wayland-bugs mailing list