1 # 2 # This is the test script for the icount abstraction 3 # 4 # Copyright 1997 by Theodore Ts'o. This file may be redistributed 5 # under the terms of the GNU Public License. 6 # 7 # 8 # First let's test the boundary cases for illegal arguments 9 # 10 validate 11 store 0 0 12 fetch 0 13 increment 0 14 decrement 0 15 store 20001 0 16 fetch 20001 17 increment 20001 18 decrement 20001 19 validate 20 # 21 # OK, now let's test fetch and store. We also test the boundary cases 22 # for legal inodes here. 23 # 24 fetch 1 25 store 1 1 26 fetch 1 27 store 1 2 28 fetch 1 29 store 1 3 30 fetch 1 31 store 1 1 32 fetch 1 33 store 1 0 34 fetch 1 35 fetch 20000 36 store 20000 0 37 fetch 20000 38 store 20000 3 39 fetch 20000 40 store 20000 0 41 fetch 20000 42 store 20000 42 43 fetch 20000 44 store 20000 1 45 fetch 20000 46 store 20000 0 47 fetch 20000 48 get_size 49 # 50 # Time to test increment. First increment from 0 (previously unreferenced) 51 # 52 decrement 2 53 increment 2 54 fetch 2 55 increment 2 56 fetch 2 57 increment 2 58 fetch 2 59 increment 2 60 fetch 2 61 decrement 2 62 fetch 2 63 decrement 2 64 fetch 2 65 decrement 2 66 fetch 2 67 decrement 2 68 decrement 2 69 # 70 # Store 1 then test... 71 # 72 store 3 1 73 increment 3 74 fetch 3 75 decrement 3 76 fetch 3 77 decrement 3 78 # 79 # Store 0 then test 80 # 81 store 4 0 82 fetch 4 83 increment 4 84 increment 4 85 fetch 4 86 decrement 4 87 decrement 4 88 # 89 # Store something, then store 0, then test... 90 # 91 store 4 42 92 store 4 0 93 increment 4 94 increment 4 95 increment 4 96 decrement 4 97 decrement 4 98 decrement 4 99 decrement 4 100 decrement 4 101 # 102 # store something, then decrement to zero 103 # 104 store 5 4 105 decrement 5 106 decrement 5 107 decrement 5 108 decrement 5 109 decrement 5 110 # 111 # Test insert 112 # 113 get_size 114 validate 115 store 10 10 116 store 20 20 117 store 30 30 118 store 40 40 119 store 50 50 120 store 60 60 121 store 70 70 122 store 80 80 123 store 90 90 124 store 100 100 125 store 15 15 126 store 25 25 127 store 35 35 128 store 45 45 129 store 55 55 130 store 65 65 131 store 75 75 132 store 85 85 133 store 95 95 134 dump 135 get_size 136 validate 137