seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
-echo "QA output created by ${seq}"
+echo "QA output created by $seq"
here=$(pwd)
-cp /dev/null "${seq}.full"
+rm -f $seqres.full
tmp=/tmp/$$
-my_projects=${tmp}.projects
-my_projid=${tmp}.projid
+my_projects=$tmp.projects
+my_projid=$tmp.projid
proj_name=test_project
proj_num=1
_cleanup()
{
cd /
- rm -f ${tmp}.*
+ rm -f $tmp.*
}
# get standard environment, filters and checks
# real QA test starts here
-proj_dir="${SCRATCH_MNT}/test"
+proj_dir="$SCRATCH_MNT/test"
# Modify as appropriate.
_supported_fs xfs
}
_quota_cmd() {
- xfs_quota -P "${my_projid}" -D "${my_projects}" -x \
- -c "$@" "${SCRATCH_MNT}"
+ xfs_quota -P "$my_projid" -D "$my_projects" -x \
+ -c "$@" "$SCRATCH_MNT"
}
# Set up--mount scratch and create the project directory
-echo ${proj_name}:${proj_num} > "${my_projid}"
-echo ${proj_num}:${proj_dir} > "${my_projects}"
+echo $proj_name:$proj_num > "$my_projid"
+echo $proj_num:$proj_dir > "$my_projects"
-_scratch_mkfs >> "${seq}.full" 2>&1
+_scratch_mkfs >> "$seqres.full" 2>&1
export MOUNT_OPTIONS="-opquota"
_qmount
mkdir -p "${proj_dir}"
# Setup the project quota directory
-_quota_cmd "project -s ${proj_name}" >> "${seq}.full" 2>&1
+_quota_cmd "project -s ${proj_name}" >> "$seqres.full" 2>&1
# Assign block quota limits
_quota_cmd "limit -p bhard=${qlimit_meg}m bsoft=${qlimit_meg}m ${proj_name}" \
- 2>> "${seq}.full" 1>&2
+ 2>> "$seqres.full" 1>&2
# See what gets reported
-_quota_cmd "report" | _filter_quota_rpt 2>> "${seq}.full"
-_quota_cmd "df" | _filter_quota_rpt 2>> "${seq}.full"
+_quota_cmd "report" | _filter_quota_rpt 2>> "$seqres.full"
+_quota_cmd "df" | _filter_quota_rpt 2>> "$seqres.full"
# This time using "human readable" output
-_quota_cmd "report -h" | _filter_quota_rpt 2>> "${seq}.full"
-_quota_cmd "df -h" | _filter_quota_rpt 2>> "${seq}.full"
+_quota_cmd "report -h" | _filter_quota_rpt 2>> "$seqres.full"
+_quota_cmd "df -h" | _filter_quota_rpt 2>> "$seqres.full"
# Clean up
-rm -rf "${proj_dir}"
+rm -rf "$proj_dir"
_scratch_unmount
status=0 # success, all done