summaryrefslogtreecommitdiffstats
path: root/tests/progs/test_data
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 15:49:25 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 15:49:25 +0000
commit464df1d5e5ab1322e2dd0a7796939fff1aeefa9a (patch)
tree6a403684e0978f0287d7f0ec0e5aab1fd31a59e1 /tests/progs/test_data
parentInitial commit. (diff)
downloade2fsprogs-upstream/1.47.0.tar.xz
e2fsprogs-upstream/1.47.0.zip
Adding upstream version 1.47.0.upstream/1.47.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/progs/test_data')
-rw-r--r--tests/progs/test_data/bma.setup1
-rw-r--r--tests/progs/test_data/expect.brel41
-rw-r--r--tests/progs/test_data/expect.icount193
-rw-r--r--tests/progs/test_data/expect.irel62
-rw-r--r--tests/progs/test_data/ima.setup1
-rw-r--r--tests/progs/test_data/normal.setup1
-rw-r--r--tests/progs/test_data/opt.setup1
-rw-r--r--tests/progs/test_data/test.brel47
-rw-r--r--tests/progs/test_data/test.icount136
-rw-r--r--tests/progs/test_data/test.irel69
10 files changed, 552 insertions, 0 deletions
diff --git a/tests/progs/test_data/bma.setup b/tests/progs/test_data/bma.setup
new file mode 100644
index 0000000..f47e511
--- /dev/null
+++ b/tests/progs/test_data/bma.setup
@@ -0,0 +1 @@
+-bma_create test 23
diff --git a/tests/progs/test_data/expect.brel b/tests/progs/test_data/expect.brel
new file mode 100644
index 0000000..0858659
--- /dev/null
+++ b/tests/progs/test_data/expect.brel
@@ -0,0 +1,41 @@
+test_rel: brel_dump
+test_rel: brel_put 2 11
+test_rel: brel_put 1 10
+test_rel: brel_put 3 9
+test_rel: brel_put 1 10 4 128
+test_rel: brel_put 23 12
+test_rel: brel_put 24 13
+brel_put: Invalid argument while calling ext2fs_brel_put
+test_rel: brel_get 24
+brel_get: Invalid argument while calling ext2fs_brel_get
+test_rel: brel_delete 24
+brel_delete: Invalid argument while calling ext2fs_brel_delete
+test_rel: brel_get 5
+brel_get: No such file or directory while calling ext2fs_brel_get
+test_rel: brel_get 3
+Old= 3, New= 9, Owner= 0:0
+test_rel: brel_get 1
+Old= 1, New= 10, Owner= 4:128
+test_rel: brel_start_iter
+test_rel: brel_next
+Old= 1, New= 10, Owner= 4:128
+test_rel: brel_next
+Old= 2, New= 11, Owner= 0:0
+test_rel: brel_next
+Old= 3, New= 9, Owner= 0:0
+test_rel: brel_next
+No more entries!
+test_rel: brel_delete 2
+test_rel: brel_delete 2
+brel_delete: No such file or directory while calling ext2fs_brel_delete
+test_rel: brel_delete 5
+brel_delete: No such file or directory while calling ext2fs_brel_delete
+test_rel: brel_move 1 2
+test_rel: brel_delete 1
+brel_delete: No such file or directory while calling ext2fs_brel_delete
+test_rel: brel_move 1 4
+brel_move: No such file or directory while calling ext2fs_brel_move
+test_rel: brel_move 2 5
+test_rel: brel_dump
+Old= 3, New= 9, Owner= 0:0
+Old= 5, New= 10, Owner= 4:128
diff --git a/tests/progs/test_data/expect.icount b/tests/progs/test_data/expect.icount
new file mode 100644
index 0000000..b58a373
--- /dev/null
+++ b/tests/progs/test_data/expect.icount
@@ -0,0 +1,193 @@
+test_icount: validate
+Icount structure successfully validated
+test_icount: store 0 0
+store: Invalid argument passed to ext2 library while calling ext2fs_icount_store
+test_icount: fetch 0
+fetch: Invalid argument passed to ext2 library while calling ext2fs_icount_fetch
+test_icount: increment 0
+increment: Invalid argument passed to ext2 library while calling ext2fs_icount_increment
+test_icount: decrement 0
+decrement: Invalid argument passed to ext2 library while calling ext2fs_icount_decrement
+test_icount: store 20001 0
+store: Invalid argument passed to ext2 library while calling ext2fs_icount_store
+test_icount: fetch 20001
+fetch: Invalid argument passed to ext2 library while calling ext2fs_icount_fetch
+test_icount: increment 20001
+increment: Invalid argument passed to ext2 library while calling ext2fs_icount_increment
+test_icount: decrement 20001
+decrement: Invalid argument passed to ext2 library while calling ext2fs_icount_decrement
+test_icount: validate
+Icount structure successfully validated
+test_icount: fetch 1
+Count is 0
+test_icount: store 1 1
+test_icount: fetch 1
+Count is 1
+test_icount: store 1 2
+test_icount: fetch 1
+Count is 2
+test_icount: store 1 3
+test_icount: fetch 1
+Count is 3
+test_icount: store 1 1
+test_icount: fetch 1
+Count is 1
+test_icount: store 1 0
+test_icount: fetch 1
+Count is 0
+test_icount: fetch 20000
+Count is 0
+test_icount: store 20000 0
+test_icount: fetch 20000
+Count is 0
+test_icount: store 20000 3
+test_icount: fetch 20000
+Count is 3
+test_icount: store 20000 0
+test_icount: fetch 20000
+Count is 0
+test_icount: store 20000 42
+test_icount: fetch 20000
+Count is 42
+test_icount: store 20000 1
+test_icount: fetch 20000
+Count is 1
+test_icount: store 20000 0
+test_icount: fetch 20000
+Count is 0
+test_icount: get_size
+Size of icount is: 5
+test_icount: decrement 2
+decrement: Invalid argument passed to ext2 library while calling ext2fs_icount_decrement
+test_icount: increment 2
+Count is now 1
+test_icount: fetch 2
+Count is 1
+test_icount: increment 2
+Count is now 2
+test_icount: fetch 2
+Count is 2
+test_icount: increment 2
+Count is now 3
+test_icount: fetch 2
+Count is 3
+test_icount: increment 2
+Count is now 4
+test_icount: fetch 2
+Count is 4
+test_icount: decrement 2
+Count is now 3
+test_icount: fetch 2
+Count is 3
+test_icount: decrement 2
+Count is now 2
+test_icount: fetch 2
+Count is 2
+test_icount: decrement 2
+Count is now 1
+test_icount: fetch 2
+Count is 1
+test_icount: decrement 2
+Count is now 0
+test_icount: decrement 2
+decrement: Invalid argument passed to ext2 library while calling ext2fs_icount_decrement
+test_icount: store 3 1
+test_icount: increment 3
+Count is now 2
+test_icount: fetch 3
+Count is 2
+test_icount: decrement 3
+Count is now 1
+test_icount: fetch 3
+Count is 1
+test_icount: decrement 3
+Count is now 0
+test_icount: store 4 0
+test_icount: fetch 4
+Count is 0
+test_icount: increment 4
+Count is now 1
+test_icount: increment 4
+Count is now 2
+test_icount: fetch 4
+Count is 2
+test_icount: decrement 4
+Count is now 1
+test_icount: decrement 4
+Count is now 0
+test_icount: store 4 42
+test_icount: store 4 0
+test_icount: increment 4
+Count is now 1
+test_icount: increment 4
+Count is now 2
+test_icount: increment 4
+Count is now 3
+test_icount: decrement 4
+Count is now 2
+test_icount: decrement 4
+Count is now 1
+test_icount: decrement 4
+Count is now 0
+test_icount: decrement 4
+decrement: Invalid argument passed to ext2 library while calling ext2fs_icount_decrement
+test_icount: decrement 4
+decrement: Invalid argument passed to ext2 library while calling ext2fs_icount_decrement
+test_icount: store 5 4
+test_icount: decrement 5
+Count is now 3
+test_icount: decrement 5
+Count is now 2
+test_icount: decrement 5
+Count is now 1
+test_icount: decrement 5
+Count is now 0
+test_icount: decrement 5
+decrement: Invalid argument passed to ext2 library while calling ext2fs_icount_decrement
+test_icount: get_size
+Size of icount is: 105
+test_icount: validate
+Icount structure successfully validated
+test_icount: store 10 10
+test_icount: store 20 20
+test_icount: store 30 30
+test_icount: store 40 40
+test_icount: store 50 50
+test_icount: store 60 60
+test_icount: store 70 70
+test_icount: store 80 80
+test_icount: store 90 90
+test_icount: store 100 100
+test_icount: store 15 15
+test_icount: store 25 25
+test_icount: store 35 35
+test_icount: store 45 45
+test_icount: store 55 55
+test_icount: store 65 65
+test_icount: store 75 75
+test_icount: store 85 85
+test_icount: store 95 95
+test_icount: dump
+10: 10
+15: 15
+20: 20
+25: 25
+30: 30
+35: 35
+40: 40
+45: 45
+50: 50
+55: 55
+60: 60
+65: 65
+70: 70
+75: 75
+80: 80
+85: 85
+90: 90
+95: 95
+100: 100
+test_icount: get_size
+Size of icount is: 105
+test_icount: validate
+Icount structure successfully validated
diff --git a/tests/progs/test_data/expect.irel b/tests/progs/test_data/expect.irel
new file mode 100644
index 0000000..8e47938
--- /dev/null
+++ b/tests/progs/test_data/expect.irel
@@ -0,0 +1,62 @@
+test_rel: irel_dump
+test_rel: irel_put 2 11 3
+test_rel: irel_put 1 10 2
+test_rel: irel_put 3 9 1
+test_rel: irel_add_ref 1 4 128
+test_rel: irel_add_ref 1 5 64
+test_rel: irel_add_ref 1 6 512
+irel_add_ref: No space left on device while calling ext2fs_irel_add_ref
+test_rel: irel_put 1 8 3
+test_rel: irel_add_ref 1 6 512
+test_rel: irel_add_ref 2 4 64
+test_rel: irel_put 23 12 1
+test_rel: irel_put 24 13 1
+irel_put: Invalid argument while calling ext2fs_irel_put
+test_rel: irel_get 24
+irel_get: Invalid argument while calling ext2fs_irel_get
+test_rel: irel_delete 24
+irel_delete: Invalid argument while calling ext2fs_irel_delete
+test_rel: irel_get 3
+Old= 3, New= 9, Original=3, Max_refs=1
+test_rel: irel_get 1
+Old= 1, New= 8, Original=1, Max_refs=3
+ 4:128, 5:64, 6:512
+test_rel: irel_start_iter
+test_rel: irel_next
+Old= 1, New= 8, Original=1, Max_refs=3
+ 4:128, 5:64, 6:512
+test_rel: irel_next
+Old= 2, New= 11, Original=2, Max_refs=3
+ 4:64
+test_rel: irel_next
+Old= 3, New= 9, Original=3, Max_refs=1
+test_rel: irel_next
+No more entries!
+test_rel: irel_delete 2
+test_rel: irel_delete 2
+irel_delete: No such file or directory while calling ext2fs_irel_delete
+test_rel: irel_delete 4
+irel_delete: No such file or directory while calling ext2fs_irel_delete
+test_rel: irel_move 1 2
+test_rel: irel_dump
+Old= 2, New= 8, Original=1, Max_refs=3
+ 4:128, 5:64, 6:512
+Old= 3, New= 9, Original=3, Max_refs=1
+test_rel: irel_delete 4
+irel_delete: No such file or directory while calling ext2fs_irel_delete
+test_rel: irel_move 1 4
+irel_move: No such file or directory while calling ext2fs_irel_move
+test_rel: irel_move 2 4
+test_rel: irel_dump
+Old= 3, New= 9, Original=3, Max_refs=1
+Old= 4, New= 8, Original=1, Max_refs=3
+ 4:128, 5:64, 6:512
+test_rel: irel_get_by_orig 3
+Old= 3, New= 9, Original=3, Max_refs=1
+test_rel: irel_get_by_orig 1
+Old= 4, New= 8, Original=1, Max_refs=3
+ 4:128, 5:64, 6:512
+test_rel: irel_get_by_orig 5
+irel_get_by_orig: No such file or directory while calling ext2fs_irel_get_by_orig
+test_rel: irel_get_by_orig 2
+irel_get_by_orig: No such file or directory while calling ext2fs_irel_get_by_orig
diff --git a/tests/progs/test_data/ima.setup b/tests/progs/test_data/ima.setup
new file mode 100644
index 0000000..f411606
--- /dev/null
+++ b/tests/progs/test_data/ima.setup
@@ -0,0 +1 @@
+-ima_create test 23
diff --git a/tests/progs/test_data/normal.setup b/tests/progs/test_data/normal.setup
new file mode 100644
index 0000000..dfc6c41
--- /dev/null
+++ b/tests/progs/test_data/normal.setup
@@ -0,0 +1 @@
+-create
diff --git a/tests/progs/test_data/opt.setup b/tests/progs/test_data/opt.setup
new file mode 100644
index 0000000..79458b0
--- /dev/null
+++ b/tests/progs/test_data/opt.setup
@@ -0,0 +1 @@
+-create -i
diff --git a/tests/progs/test_data/test.brel b/tests/progs/test_data/test.brel
new file mode 100644
index 0000000..6605452
--- /dev/null
+++ b/tests/progs/test_data/test.brel
@@ -0,0 +1,47 @@
+#
+# This is the test script for the block relocation table.
+#
+# Copyright 1997 by Theodore Ts'o. This file may be redistributed
+# under the terms of the GNU Public License.
+#
+#
+brel_dump
+brel_put 2 11
+brel_put 1 10
+brel_put 3 9
+brel_put 1 10 4 128
+#
+# Test boundary cases for brel_put
+#
+brel_put 23 12
+brel_put 24 13
+#
+# Test other boundary cases
+#
+brel_get 24
+brel_delete 24
+#
+# Test getting existing and non-existent entries
+#
+brel_get 5
+brel_get 3
+brel_get 1
+#
+# Test the iterator functions
+#
+brel_start_iter
+brel_next
+brel_next
+brel_next
+brel_next
+#
+# Test delete and move
+#
+brel_delete 2
+brel_delete 2
+brel_delete 5
+brel_move 1 2
+brel_delete 1
+brel_move 1 4
+brel_move 2 5
+brel_dump
diff --git a/tests/progs/test_data/test.icount b/tests/progs/test_data/test.icount
new file mode 100644
index 0000000..8cb1955
--- /dev/null
+++ b/tests/progs/test_data/test.icount
@@ -0,0 +1,136 @@
+#
+# This is the test script for the icount abstraction
+#
+# Copyright 1997 by Theodore Ts'o. This file may be redistributed
+# under the terms of the GNU Public License.
+#
+#
+# First let's test the boundary cases for illegal arguments
+#
+validate
+store 0 0
+fetch 0
+increment 0
+decrement 0
+store 20001 0
+fetch 20001
+increment 20001
+decrement 20001
+validate
+#
+# OK, now let's test fetch and store. We also test the boundary cases
+# for legal inodes here.
+#
+fetch 1
+store 1 1
+fetch 1
+store 1 2
+fetch 1
+store 1 3
+fetch 1
+store 1 1
+fetch 1
+store 1 0
+fetch 1
+fetch 20000
+store 20000 0
+fetch 20000
+store 20000 3
+fetch 20000
+store 20000 0
+fetch 20000
+store 20000 42
+fetch 20000
+store 20000 1
+fetch 20000
+store 20000 0
+fetch 20000
+get_size
+#
+# Time to test increment. First increment from 0 (previously unreferenced)
+#
+decrement 2
+increment 2
+fetch 2
+increment 2
+fetch 2
+increment 2
+fetch 2
+increment 2
+fetch 2
+decrement 2
+fetch 2
+decrement 2
+fetch 2
+decrement 2
+fetch 2
+decrement 2
+decrement 2
+#
+# Store 1 then test...
+#
+store 3 1
+increment 3
+fetch 3
+decrement 3
+fetch 3
+decrement 3
+#
+# Store 0 then test
+#
+store 4 0
+fetch 4
+increment 4
+increment 4
+fetch 4
+decrement 4
+decrement 4
+#
+# Store something, then store 0, then test...
+#
+store 4 42
+store 4 0
+increment 4
+increment 4
+increment 4
+decrement 4
+decrement 4
+decrement 4
+decrement 4
+decrement 4
+#
+# store something, then decrement to zero
+#
+store 5 4
+decrement 5
+decrement 5
+decrement 5
+decrement 5
+decrement 5
+#
+# Test insert
+#
+get_size
+validate
+store 10 10
+store 20 20
+store 30 30
+store 40 40
+store 50 50
+store 60 60
+store 70 70
+store 80 80
+store 90 90
+store 100 100
+store 15 15
+store 25 25
+store 35 35
+store 45 45
+store 55 55
+store 65 65
+store 75 75
+store 85 85
+store 95 95
+dump
+get_size
+validate
diff --git a/tests/progs/test_data/test.irel b/tests/progs/test_data/test.irel
new file mode 100644
index 0000000..6c338bc
--- /dev/null
+++ b/tests/progs/test_data/test.irel
@@ -0,0 +1,69 @@
+#
+# This is the test script for the inode relocation table.
+#
+# Copyright 1997 by Theodore Ts'o. This file may be redistributed
+# under the terms of the GNU Public License.
+#
+#
+irel_dump
+irel_put 2 11 3
+irel_put 1 10 2
+irel_put 3 9 1
+irel_add_ref 1 4 128
+irel_add_ref 1 5 64
+#
+# Check to see what happens if we add too many references
+#
+irel_add_ref 1 6 512
+#
+# Try resizing the number of references and retry the add
+#
+irel_put 1 8 3
+irel_add_ref 1 6 512
+#
+irel_add_ref 2 4 64
+#
+# Test boundary cases of irel_put
+#
+irel_put 23 12 1
+irel_put 24 13 1
+#
+# Test other boundary cases....
+#
+irel_get 24
+irel_delete 24
+#
+# Test retrivals
+#
+irel_get 3
+irel_get 1
+#
+# Test the iterator functions
+#
+irel_start_iter
+irel_next
+irel_next
+irel_next
+irel_next
+#
+# Now try the delete function, on existing and non-existent entries
+#
+irel_delete 2
+irel_delete 2
+irel_delete 4
+#
+# Move tests...
+#
+irel_move 1 2
+irel_dump
+irel_delete 4
+irel_move 1 4
+irel_move 2 4
+#
+# Get by orig tests
+#
+irel_dump
+irel_get_by_orig 3
+irel_get_by_orig 1
+irel_get_by_orig 5
+irel_get_by_orig 2