Possible bug in addpref.m test

The first test in prefs/addpref.m writes into /tmp/.octave_prefs
If there are two (or more) processes running at the same time they overwrite this file over.
See e.g. failures in
http://buildbot.octave.org:8010/#/builders/30/builds/365/steps/7/logs/stdio
and
http://buildbot.octave.org:8010/#/builders/16/builds/850/steps/7/logs/stdio

That looks like a bug to me.

Moreover – perhaps it is a more serious problem: what if I have two or more octave processes
running in the same working directory, could they overwrite each other prefs? Thould those be saved in some random-named files (or named per PID)?

I recoded the BIST test to use a per-instance temporary directory. See octave: 87de38eb52d9. This was on the stable branch so it won’t actually be seen until the 7.2 bug fix release.

If you are aware of any other BIST tests that compete for the same filename we should fix those too because it is common for the buildbots to be running multiple Octave instances and running multiple test suites at the same time.

I’m not that worried about a single user overwriting their own preferences. The preferences are supposed to be global, and if you change them in one instance of Octave it seems to me they should be picked up by the other instance of Octave.