kvm-end-run-stats.sh 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/bin/bash
  2. # SPDX-License-Identifier: GPL-2.0+
  3. #
  4. # Check the status of the specified run.
  5. #
  6. # Usage: kvm-end-run-stats.sh /path/to/run starttime
  7. #
  8. # Copyright (C) 2021 Facebook, Inc.
  9. #
  10. # Authors: Paul E. McKenney <paulmck@kernel.org>
  11. # scriptname=$0
  12. # args="$*"
  13. rundir="$1"
  14. if ! test -d "$rundir"
  15. then
  16. echo kvm-end-run-stats.sh: Specified run directory does not exist: $rundir
  17. exit 1
  18. fi
  19. T="`mktemp -d ${TMPDIR-/tmp}/kvm-end-run-stats.sh.XXXXXX`"
  20. trap 'rm -rf $T' 0
  21. RCUTORTURE="`pwd`/tools/testing/selftests/rcutorture"; export RCUTORTURE
  22. PATH=${RCUTORTURE}/bin:$PATH; export PATH
  23. . functions.sh
  24. default_starttime="`get_starttime`"
  25. starttime="${2-default_starttime}"
  26. echo | tee -a "$rundir/log"
  27. echo | tee -a "$rundir/log"
  28. echo " --- `date` Test summary:" | tee -a "$rundir/log"
  29. echo Results directory: $rundir | tee -a "$rundir/log"
  30. kcsan-collapse.sh "$rundir" | tee -a "$rundir/log"
  31. kvm-recheck.sh "$rundir" > $T/kvm-recheck.sh.out 2>&1
  32. ret=$?
  33. cat $T/kvm-recheck.sh.out | tee -a "$rundir/log"
  34. echo " --- Done at `date` (`get_starttime_duration $starttime`) exitcode $ret" | tee -a "$rundir/log"
  35. exit $ret