@@ -38,7 +38,7 @@ if [ -z "$MC_BIN" ]; then
3838 exit 1
3939fi
4040
41- XROOTD_BIN=" $( command -v xrootd) "
41+ XROOTD_BIN=" $XROOTD_BINDIR / xrootd"
4242if [ -z " XROOTD_BIN" ]; then
4343 echo " xrootd binary not found; cannot run unit test"
4444 exit 1
201201echo " Hello, World" > " $RUNDIR /hello_world.txt"
202202" $MC_BIN " --insecure --config-dir " $MINIO_CLIENTDIR " cp " $RUNDIR /hello_world.txt" userminio/test-bucket/hello_world.txt
203203
204+ IDX=0
205+ COUNT=25
206+ while [ $IDX -ne $COUNT ]; do
207+ if ! dd if=/dev/urandom " of=$RUNDIR /test_file" bs=1024 count=1024 2> /dev/null; then
208+ echo " Failed to create random file to upload"
209+ exit 1
210+ fi
211+ if ! " $MC_BIN " --insecure --config-dir " $MINIO_CLIENTDIR " cp " $RUNDIR /test_file" " userminio/test-bucket/test_file_$IDX .random" > /dev/null; then
212+ echo " Failed to upload random file to S3 instance"
213+ exit 1
214+ fi
215+ IDX=$(( IDX+ 1 ))
216+ done
217+
204218# ###
205219# Starting XRootD config with S3 backend
206220# ###
@@ -274,6 +288,10 @@ while [ -z "$XROOTD_URL" ]; do
274288 sleep 1
275289 XROOTD_URL=$( grep " Xrd_ProtLoad: enabling port" " $BINARY_DIR /tests/$TEST_NAME /server.log" | grep ' for protocol XrdHttp' | awk ' {print $7}' )
276290 IDX=$(( $IDX + 1 ))
291+ if ! kill -0 " $XROOTD_PID " 2> /dev/null; then
292+ echo " xrootd process (PID $XROOTD_PID ) failed to start" >&2
293+ exit 1
294+ fi
277295 if [ $IDX -gt 1 ]; then
278296 echo " Waiting for xrootd to start ($IDX seconds so far) ..."
279297 fi
@@ -285,8 +303,16 @@ done
285303XROOTD_URL=" https://$( hostname) :$XROOTD_URL /"
286304echo " xrootd started at $XROOTD_URL "
287305
306+ IDX=0
307+ touch " $RUNDIR /playback.txt"
308+ while [ $IDX -ne $COUNT ]; do
309+ echo " $XROOTD_URL /test/test_file_$IDX .random" >> " $RUNDIR /playback.txt"
310+ IDX=$(( IDX+ 1 ))
311+ done
312+
288313cat >> " $BINARY_DIR /tests/$TEST_NAME /setup.sh" << EOF
289314XROOTD_PID=$XROOTD_PID
290315XROOTD_URL=$XROOTD_URL
291316BUCKET_NAME=$BUCKET_NAME
317+ PLAYBACK_FILE=$RUNDIR /playback.txt
292318EOF
0 commit comments