kcsan-collapse.sh 484 B

12345678910111213141516171819202122
  1. #!/bin/bash
  2. # SPDX-License-Identifier: GPL-2.0+
  3. #
  4. # If this was a KCSAN run, collapse the reports in the various console.log
  5. # files onto pairs of functions.
  6. #
  7. # Usage: kcsan-collapse.sh resultsdir
  8. #
  9. # Copyright (C) 2020 Facebook, Inc.
  10. #
  11. # Authors: Paul E. McKenney <paulmck@kernel.org>
  12. if test -z "$TORTURE_KCONFIG_KCSAN_ARG"
  13. then
  14. exit 0
  15. fi
  16. find $1 -name console.log -exec cat {} \; |
  17. grep "BUG: KCSAN: " |
  18. sed -e 's/^\[[^]]*] //' |
  19. sort |
  20. uniq -c |
  21. sort -k1nr > $1/kcsan.sum