8 dirname=$
(dirname ${cmdline})
9 topdir
=$
(dirname ${dirname})
11 testdir
=`mktemp -t -d libs.XXX`
12 installdir
=`mktemp -t -d libs.XXX`
14 libdir
=${installdir}/usr
/lib
15 bindir
=${installdir}/usr
/bin
20 if [ ${lxcfspid} -ne -1 ]; then
23 while [ -d ${testdir}/proc
-a $count -lt 5 ]; do
28 rm -rf ${testdir} ${installdir}
29 rm -f /tmp
/lxcfs-iwashere
31 if [ ${FAILED} -eq 1 ]; then
32 echo "liblxcfs.so reload test FAILED"
34 echo "liblxcfs.so reload test PASSED"
38 trap cleanup EXIT SIGHUP SIGINT SIGTERM
40 ( cd ${topdir}; DESTDIR
=${installdir} make install )
41 export LD_LIBRARY_PATH
=${libdir}
43 ${bindir}/lxcfs -p ${pidfile} ${testdir} &
47 while [ ! -d ${testdir}/proc
]; do
53 rm -f /tmp
/lxcfs-iwashere
54 cat ${testdir}/proc
/uptime
55 [ ! -f /tmp
/lxcfs-iwashere
]
59 gcc
-shared -fPIC -DPIC .libs
/liblxcfstest_la-bindings.o .libs
/liblxcfstest_la-cpuset.o
-lpthread -pthread -o .libs
/liblxcfstest.so
60 cp .libs
/liblxcfstest.
* "${libdir}"
62 rm -f ${libdir}/liblxcfs.so
* ${libdir}/liblxcfs.la
63 cp ${libdir}/liblxcfstest.so
${libdir}/liblxcfs.so
65 kill -USR1 ${lxcfspid}
67 cat ${testdir}/proc
/uptime
68 [ -f /tmp
/lxcfs-iwashere
]