kvm-recheck.sh 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #!/bin/bash
  2. #
  3. # Given the results directories for previous KVM-based torture runs,
  4. # check the build and console output for errors. Given a directory
  5. # containing results directories, this recursively checks them all.
  6. #
  7. # Usage: kvm-recheck.sh resdir ...
  8. #
  9. # This program is free software; you can redistribute it and/or modify
  10. # it under the terms of the GNU General Public License as published by
  11. # the Free Software Foundation; either version 2 of the License, or
  12. # (at your option) any later version.
  13. #
  14. # This program is distributed in the hope that it will be useful,
  15. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. # GNU General Public License for more details.
  18. #
  19. # You should have received a copy of the GNU General Public License
  20. # along with this program; if not, you can access it online at
  21. # http://www.gnu.org/licenses/gpl-2.0.html.
  22. #
  23. # Copyright (C) IBM Corporation, 2011
  24. #
  25. # Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
  26. PATH=`pwd`/tools/testing/selftests/rcutorture/bin:$PATH; export PATH
  27. . tools/testing/selftests/rcutorture/bin/functions.sh
  28. for rd in "$@"
  29. do
  30. firsttime=1
  31. dirs=`find $rd -name Make.defconfig.out -print | sort | sed -e 's,/[^/]*$,,' | sort -u`
  32. for i in $dirs
  33. do
  34. if test -n "$firsttime"
  35. then
  36. firsttime=""
  37. resdir=`echo $i | sed -e 's,/$,,' -e 's,/[^/]*$,,'`
  38. head -1 $resdir/log
  39. fi
  40. TORTURE_SUITE="`cat $i/../TORTURE_SUITE`"
  41. kvm-recheck-${TORTURE_SUITE}.sh $i
  42. if test -f "$i/console.log"
  43. then
  44. configcheck.sh $i/.config $i/ConfigFragment
  45. parse-build.sh $i/Make.out $configfile
  46. parse-torture.sh $i/console.log $configfile
  47. parse-console.sh $i/console.log $configfile
  48. if test -r $i/Warnings
  49. then
  50. cat $i/Warnings
  51. fi
  52. else
  53. if test -f "$i/qemu-cmd"
  54. then
  55. print_bug qemu failed
  56. echo " $i"
  57. elif test -f "$i/buildonly"
  58. then
  59. echo Build-only run, no boot/test
  60. configcheck.sh $i/.config $i/ConfigFragment
  61. parse-build.sh $i/Make.out $configfile
  62. else
  63. print_bug Build failed
  64. echo " $i"
  65. fi
  66. fi
  67. done
  68. done