Functional tests
echo "ROOT xrd"
c1=$(md5sum < ./t6)
xrdfs root://${1}:1094 rm dteam:test450.txt
echo "write/read test start"
xrdcp -d1 ./t6 root://${1}:1094/dteam:test450.txt
xrdcp -d1 root://${1}:1094/dteam:test450.txt ./t7
c2=$(md5sum < ./t7)
echo "checksum comparison"
echo $c1
echo $c2
echo "stat, removal and confirm"
xrdfs root://${1}:1094 stat dteam:test450.txt
xrdfs root://${1}:1094 rm dteam:test450.txt
xrdfs root://${1}:1094 stat dteam:test450.txt
rm -rf ./t7
echo "ROOT gfal"
c1=$(md5sum < ./t6)
echo "write/read test start"
gfal-copy ./t6 root://${1}:1094/dteam:test450.txt
gfal-copy root://${1}:1094/dteam:test450.txt ./t7
c2=$(md5sum < ./t7)
echo "checksum comparison"
echo $c1
echo $c2
echo "stat, removal and confirm"
gfal-stat root://${1}:1094/dteam:test450.txt
gfal-rm root://${1}:1094/dteam:test450.txt
gfal-stat root://${1}:1094/dteam:test450.txt
rm -rf ./t7
echo "DAVS gfal"
c1=$(md5sum < ./t6)
echo "write/read test start"
gfal-copy ./t6 davs://${1}:1094/dteam:test450.txt
gfal-copy davs://${1}:1094/dteam:test450.txt ./t7
c2=$(md5sum < ./t7)
echo "checksum comparison"
echo $c1
echo $c2
echo "stat, removal and confirm"
gfal-stat davs://${1}:1094/dteam:test450.txt
gfal-rm davs://${1}:1094/dteam:test450.txt
gfal-stat davs://${1}:1094/dteam:test450.txt
rm -rf ./t7
echo "TPC transfer"
xrdcp -v -f --tpc delegate only root://golias100.farm.particle.cz:1094//dpm/farm.particle.cz/home/dteam/test/test450_jw.txt root://${1}:1094//dteam:test450_jw.txt
xrdcp -v -f --tpc delegate only root://${1}:1094//dteam:test450_jw.txt root://golias100.farm.particle.cz:1094//dpm/farm.particle.cz/home/dteam/test/test450_jw.txt
echo "stat and confirm"
xrdfs root://${1}:1094 stat dteam:test450_jw.txt
xrdfs root://golias100.farm.particle.cz:1094 stat /dpm/farm.particle.cz/home/dteam/test/test450_jw.txt
echo "multistream"
xrdcp -d1 -S 2 ./t6 root://${1}:1094/dteam:test450.txt
xrdcp -d1 -S 2 root://${1}:1094/dteam:test450.txt ./t7
c2=$(md5sum < ./t7)
echo "checksum comparison"
echo $c1
echo $c2
gfal-rm davs://${1}:1094/dteam:test450.txt
rm -rf ./t7