You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test(conftest): prepare temporary file for HISTFILE
[Problem] We have previously set HISTFILE=/dev/null to leave user's
history file alone in the test, but it turned out to break the system.
When the number of history entries reach HISTFILESIZE, Bash tries to
replace the entity at $HISTFILE with a regular file.
HISTFILE=/dev/null causes the removal of the device /dev/null and
creation of a regular file at /dev/null. This Bash behavior was fixed
in Bash 4.4 after the following bug-bash discussion:
https://lists.gnu.org/archive/html/bug-bash/2015-01/msg00138.html
[Solution] As a workaround, we prepare an empty temporary file for
each test.
[Remark] Another possible solution was to unset HISTFILE in
test/config/bashrc. However test/config/bashrc is sourced after the
first prompt is shown, i.e., after the user's history file is loaded.
This doesn't necessarily cause problems, but we rather use an empty
file for the history to perform tests in a unqiue condition.
0 commit comments