Revert "tests: Don't force use of /var/tmp"

This reverts commit 0648452fca5cffaeec47c415f9e040ffad7df9c5.
Unfortunately, it appears we still need xattrs on the system cache.

Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Simon McVittie 2017-08-31 13:55:44 +01:00 committed by Alexander Larsson
parent 2cfeef6bcc
commit 6e46dc8076
3 changed files with 7 additions and 4 deletions

View File

@ -1,12 +1,14 @@
#! /bin/bash
#
# Run a test in tap mode, ensuring we have a temporary directory.
# Run a test in tap mode, ensuring we have a temporary directory. We
# always use /var/tmp because we might want to use user xattrs, which
# aren't available on tmpfs.
#
# The test binary is passed as $1
srcd=$(cd $(dirname $1) && pwd)
bn=$(basename $1)
tempdir=$(mktemp -d /tmp/tap-test.XXXXXX)
tempdir=$(mktemp -d /var/tmp/tap-test.XXXXXX)
touch ${tempdir}/.testtmp
function cleanup () {
if test -n "${TEST_SKIP_CLEANUP:-}"; then

View File

@ -72,7 +72,8 @@ fi
export MALLOC_CHECK_=3
export MALLOC_PERTURB_=$(($RANDOM % 255 + 1))
TEST_DATA_DIR=`mktemp -d /tmp/test-flatpak-XXXXXX`
# We need this to be in /var/tmp because /tmp has no xattr support
TEST_DATA_DIR=`mktemp -d /var/tmp/test-flatpak-XXXXXX`
mkdir -p ${TEST_DATA_DIR}/home
mkdir -p ${TEST_DATA_DIR}/runtime
mkdir -p ${TEST_DATA_DIR}/system

View File

@ -799,7 +799,7 @@ global_setup (void)
g_autofree char *datadir = NULL;
g_autofree char *homedir = NULL;
testdir = g_strdup ("/tmp/flatpak-test-XXXXXX");
testdir = g_strdup ("/var/tmp/flatpak-test-XXXXXX");
g_mkdtemp (testdir);
g_test_message ("testdir: %s", testdir);