Eli Zaretskii writes: >> From: Matt Armstrong >> Cc: 46397@debbugs.gnu.org, eggert@cs.ucla.edu, craven@gmx.net >> Date: Sun, 14 Feb 2021 14:16:12 -0800 >> >> When releasing the lock, I have a less clear opinion but I'm thinking >> that warnings are better. A warning is still quite intrusive and >> obvious. Maybe we don't need to decide this part now. > > The problem with warnings is that they can go unnoticed, unless > followed by sit-for. Eli, Paul, Attached is test code for some of the scenarios we are discussing here. My FSF papers are out of date. Mind sending me new ones? I am in the United States. These tests operate by constructing buffers within directories that the test then restricts permissions on, which induces errors from the varous locking calls. Each test is a FIXME that allows us to verify the behavior change as work on bug#46397 progresses. In doing this I discovered that Emacs silently ignores some IO errors when constructing lock files. Paul noticed this a while back and added FIXME. This patch adds a test with a corresponding FIXME. The test isn't complete. It relies on POSIX semantics from the filesystem. It might fail on Windows. As the review progresses I can work on handling that scenario more gracefully. If this kind of a test is a bad idea, feel free to let me know. I like to have test coverage before I do code surgery, but I don't have strong opinions here.