URI:
       t10_operations.sh - tomb - the crypto undertaker
  HTML git clone git://parazyd.org/tomb.git
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
       t10_operations.sh (955B)
       ---
            1 #!/usr/bin/env zsh
            2 
            3 export test_description="Testing common operations on tomb"
            4 
            5 source ./setup
            6 
            7 test_export "test" # Using already generated tomb
            8 test_expect_success 'Testing open with wrong password ' '
            9     test_must_fail tt_open --tomb-pwd wrongpassword
           10     '
           11 
           12 test_expect_success 'Testing open with good password ' '
           13     tt_open --tomb-pwd $DUMMYPASS &&
           14     tt_close
           15     '
           16 
           17 test_expect_success 'Testing open in read only mode' '
           18     chmod -w $tomb &&
           19     tt_open --tomb-pwd $DUMMYPASS -o ro,noatime,nodev &&
           20     tt_close &&
           21     chmod +w $tomb
           22     '
           23 
           24 if test_have_prereq LSOF; then
           25     gcc -Wall -o $TMP/close_block $TEST_HOME/close_block.c
           26     test_expect_success 'Testing functionality of the slam operation (use of lsof)' '
           27         mkdir $TMP/testmount &&
           28         tt_open $TMP/testmount --tomb-pwd $DUMMYPASS &&
           29         tt_set_ownership $TMP/testmount &&
           30         $TMP/close_block $TMP/testmount/occupied 20 &
           31         tt slam
           32         '
           33 fi
           34 
           35 test_done