run_capbounds.sh 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #!/bin/sh
  2. ################################################################################
  3. ## ##
  4. ## Copyright (c) International Business Machines Corp., 2008 ##
  5. ## ##
  6. ## This program is free software; you can redistribute it and#or modify ##
  7. ## it under the terms of the GNU General Public License as published by ##
  8. ## the Free Software Foundation; either version 2 of the License, or ##
  9. ## (at your option) any later version. ##
  10. ## ##
  11. ## This program is distributed in the hope that it will be useful, but ##
  12. ## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ##
  13. ## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ##
  14. ## for more details. ##
  15. ## ##
  16. ## You should have received a copy of the GNU General Public License ##
  17. ## along with this program; if not, write to the Free Software ##
  18. ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ##
  19. ## ##
  20. ################################################################################
  21. if tst_kvcmp -lt "2.6.25"; then
  22. tst_resm TCONF "System kernel version is less than 2.6.25"
  23. tst_resm TCONF "Cannot execute test"
  24. exit 32
  25. fi
  26. echo "testing bounding set reading"
  27. exit_code=0
  28. cap_bounds_r
  29. tmp=$?
  30. if [ $tmp -ne 0 ]; then
  31. exit_code=$tmp
  32. fi
  33. echo "testing bounding set dropping"
  34. cap_bounds_rw
  35. tmp=$?
  36. if [ $tmp -ne 0 ]; then
  37. exit_code=$tmp
  38. fi
  39. echo "checking bounding set constraint in pI"
  40. cap_bset_inh_bounds
  41. tmp=$?
  42. if [ $tmp -ne 0 ]; then
  43. exit_code=$tmp
  44. fi
  45. exec_with_inh
  46. tmp=$?
  47. if [ $tmp -ne 0 ]; then
  48. exit_code=$tmp;
  49. fi
  50. exec_without_inh
  51. tmp=$?
  52. if [ $tmp -ne 0 ]; then
  53. exit_code=$tmp;
  54. fi
  55. exit $exit_code