debugfs_duplicate_context_creation.sh 420 B

123456789101112131415161718192021222324252627
  1. #!/bin/bash
  2. # SPDX-License-Identifier: GPL-2.0
  3. source _debugfs_common.sh
  4. # Test duplicated context creation
  5. # ================================
  6. if ! echo foo > "$DBGFS/mk_contexts"
  7. then
  8. echo "context creation failed"
  9. exit 1
  10. fi
  11. if echo foo > "$DBGFS/mk_contexts"
  12. then
  13. echo "duplicate context creation success"
  14. exit 1
  15. fi
  16. if ! echo foo > "$DBGFS/rm_contexts"
  17. then
  18. echo "context deletion failed"
  19. exit 1
  20. fi
  21. exit 0