run-tests.sh 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. #!/bin/bash
  2. # SPDX-License-Identifier: GPL-2.0
  3. #
  4. # Copyright (C) 2022 Red Hat, Inc.
  5. # Author: Vladis Dronov <vdronoff@gmail.com>
  6. #
  7. # This script runs (via instmod) test-cipher.ko module which invokes
  8. # generic and s390-native ChaCha20 encryprion algorithms with different
  9. # size of data. Check 'dmesg' for results.
  10. #
  11. # The insmod error is expected:
  12. # insmod: ERROR: could not insert module test_cipher.ko: Operation not permitted
  13. lsmod | grep chacha | cut -f1 -d' ' | xargs rmmod
  14. modprobe chacha_generic
  15. modprobe chacha_s390
  16. # run encryption for different data size, including whole block(s) +/- 1
  17. insmod test_cipher.ko size=63
  18. insmod test_cipher.ko size=64
  19. insmod test_cipher.ko size=65
  20. insmod test_cipher.ko size=127
  21. insmod test_cipher.ko size=128
  22. insmod test_cipher.ko size=129
  23. insmod test_cipher.ko size=511
  24. insmod test_cipher.ko size=512
  25. insmod test_cipher.ko size=513
  26. insmod test_cipher.ko size=4096
  27. insmod test_cipher.ko size=65611
  28. insmod test_cipher.ko size=6291456
  29. insmod test_cipher.ko size=62914560
  30. # print test logs
  31. dmesg | tail -170