Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
#if RELOADTEST
void iwashere(void)
{
- char *name, *cwd = get_current_dir_name();
- size_t len;
int fd;
- if (!cwd)
- exit(1);
- len = strlen(cwd) + strlen("/iwashere") + 1;
- name = alloca(len);
- snprintf(name, len, "%s/iwashere", cwd);
- free(cwd);
- fd = creat(name, 0755);
+ fd = creat("/tmp/lxcfs-iwashere", 0644);
if (fd >= 0)
close(fd);
}
umount -l ${testdir}
fi
rm -rf ${testdir} ${installdir}
- rm -f iwashere
+ rm -f /tmp/lxcfs-iwashere
rm -f ${pidfile}
if [ ${FAILED} -eq 1 ]; then
echo "liblxcfs.so reload test FAILED"
count=$((count+1))
done
-rm -f iwashere
+rm -f /tmp/lxcfs-iwashere
cat ${testdir}/proc/uptime
-[ ! -f iwashere ]
+[ ! -f /tmp/lxcfs-iwashere ]
(
cd ${topdir};
make liblxcfstest.la
kill -USR1 ${lxcfspid}
cat ${testdir}/proc/uptime
-[ -f iwashere ]
+[ -f /tmp/lxcfs-iwashere ]
FAILED=0