After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 610860 - test_g_file_open_readwrite fails if $HOME is unwritable
test_g_file_open_readwrite fails if $HOME is unwritable
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
2.23.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2010-02-23 17:27 UTC by Emilio Pozuelo Monfort
Modified: 2010-02-23 17:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use g_get_tmp_dir() rather than _home_dir() since $TMP sounds more reliable (1.00 KB, patch)
2010-02-23 17:29 UTC, Emilio Pozuelo Monfort
none Details | Review

Description Emilio Pozuelo Monfort 2010-02-23 17:27:49 UTC
Hi,

The test_g_file_open_readwrite in gio/tests/readwrite.c fails if $HOME exists, but is not writable. The problem seems to be that the error is set to something else. Since some buildds in Debian have $HOME like this, I'd like to change the test to something else, like $TMP or even CWD.

Attached is a patch to use $TMP by means of g_get_tmp_dir(). It makes the test pass when $HOME is not writable, and doesn't seem to cause other regressions.

($HOME here is not really the env variable but rather the entry in passwd which is what g_get_home_dir() returns).
Comment 1 Emilio Pozuelo Monfort 2010-02-23 17:29:06 UTC
Created attachment 154523 [details] [review]
Use g_get_tmp_dir() rather than _home_dir() since $TMP sounds more reliable
Comment 2 Emilio Pozuelo Monfort 2010-02-23 17:39:55 UTC
Commit a7cc500d3829db1a8757ae940db09869b78bdca8