xref: /aosp_15_r20/external/e2fsprogs/tests/progs/test_data/test.irel (revision 6a54128f25917bfc36a8a6e9d722c04a0b4641b6)
1*6a54128fSAndroid Build Coastguard Worker#
2*6a54128fSAndroid Build Coastguard Worker# This is the test script for the inode relocation table.
3*6a54128fSAndroid Build Coastguard Worker#
4*6a54128fSAndroid Build Coastguard Worker# Copyright 1997 by Theodore Ts'o.  This file may be redistributed
5*6a54128fSAndroid Build Coastguard Worker# under the terms of the GNU Public License.
6*6a54128fSAndroid Build Coastguard Worker#
7*6a54128fSAndroid Build Coastguard Worker#
8*6a54128fSAndroid Build Coastguard Workerirel_dump
9*6a54128fSAndroid Build Coastguard Workerirel_put 2 11 3
10*6a54128fSAndroid Build Coastguard Workerirel_put 1 10 2
11*6a54128fSAndroid Build Coastguard Workerirel_put 3 9 1
12*6a54128fSAndroid Build Coastguard Workerirel_add_ref 1 4 128
13*6a54128fSAndroid Build Coastguard Workerirel_add_ref 1 5 64
14*6a54128fSAndroid Build Coastguard Worker#
15*6a54128fSAndroid Build Coastguard Worker# Check to see what happens if we add too many references
16*6a54128fSAndroid Build Coastguard Worker#
17*6a54128fSAndroid Build Coastguard Workerirel_add_ref 1 6 512
18*6a54128fSAndroid Build Coastguard Worker#
19*6a54128fSAndroid Build Coastguard Worker# Try resizing the number of references and retry the add
20*6a54128fSAndroid Build Coastguard Worker#
21*6a54128fSAndroid Build Coastguard Workerirel_put 1 8 3
22*6a54128fSAndroid Build Coastguard Workerirel_add_ref 1 6 512
23*6a54128fSAndroid Build Coastguard Worker#
24*6a54128fSAndroid Build Coastguard Workerirel_add_ref 2 4 64
25*6a54128fSAndroid Build Coastguard Worker#
26*6a54128fSAndroid Build Coastguard Worker# Test boundary cases of irel_put
27*6a54128fSAndroid Build Coastguard Worker#
28*6a54128fSAndroid Build Coastguard Workerirel_put 23 12 1
29*6a54128fSAndroid Build Coastguard Workerirel_put 24 13 1
30*6a54128fSAndroid Build Coastguard Worker#
31*6a54128fSAndroid Build Coastguard Worker# Test other boundary cases....
32*6a54128fSAndroid Build Coastguard Worker#
33*6a54128fSAndroid Build Coastguard Workerirel_get 24
34*6a54128fSAndroid Build Coastguard Workerirel_delete 24
35*6a54128fSAndroid Build Coastguard Worker#
36*6a54128fSAndroid Build Coastguard Worker# Test retrivals
37*6a54128fSAndroid Build Coastguard Worker#
38*6a54128fSAndroid Build Coastguard Workerirel_get 3
39*6a54128fSAndroid Build Coastguard Workerirel_get 1
40*6a54128fSAndroid Build Coastguard Worker#
41*6a54128fSAndroid Build Coastguard Worker# Test the iterator functions
42*6a54128fSAndroid Build Coastguard Worker#
43*6a54128fSAndroid Build Coastguard Workerirel_start_iter
44*6a54128fSAndroid Build Coastguard Workerirel_next
45*6a54128fSAndroid Build Coastguard Workerirel_next
46*6a54128fSAndroid Build Coastguard Workerirel_next
47*6a54128fSAndroid Build Coastguard Workerirel_next
48*6a54128fSAndroid Build Coastguard Worker#
49*6a54128fSAndroid Build Coastguard Worker# Now try the delete function, on existing and non-existent entries
50*6a54128fSAndroid Build Coastguard Worker#
51*6a54128fSAndroid Build Coastguard Workerirel_delete 2
52*6a54128fSAndroid Build Coastguard Workerirel_delete 2
53*6a54128fSAndroid Build Coastguard Workerirel_delete 4
54*6a54128fSAndroid Build Coastguard Worker#
55*6a54128fSAndroid Build Coastguard Worker# Move tests...
56*6a54128fSAndroid Build Coastguard Worker#
57*6a54128fSAndroid Build Coastguard Workerirel_move 1 2
58*6a54128fSAndroid Build Coastguard Workerirel_dump
59*6a54128fSAndroid Build Coastguard Workerirel_delete 4
60*6a54128fSAndroid Build Coastguard Workerirel_move 1 4
61*6a54128fSAndroid Build Coastguard Workerirel_move 2 4
62*6a54128fSAndroid Build Coastguard Worker#
63*6a54128fSAndroid Build Coastguard Worker# Get by orig tests
64*6a54128fSAndroid Build Coastguard Worker#
65*6a54128fSAndroid Build Coastguard Workerirel_dump
66*6a54128fSAndroid Build Coastguard Workerirel_get_by_orig 3
67*6a54128fSAndroid Build Coastguard Workerirel_get_by_orig 1
68*6a54128fSAndroid Build Coastguard Workerirel_get_by_orig 5
69*6a54128fSAndroid Build Coastguard Workerirel_get_by_orig 2
70