]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
Fix up usage and decrement error messages in the test_icount program
authorTheodore Ts'o <tytso@mit.edu>
Sat, 7 Apr 2007 13:06:46 +0000 (09:06 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 7 Apr 2007 13:06:46 +0000 (09:06 -0400)
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
tests/progs/ChangeLog
tests/progs/test_data/expect.icount
tests/progs/test_data/test.icount
tests/progs/test_icount.c

index bb1480a51402318ebb8ad04184f858ea01ee4de4..b42f1229a313def3c3d90ba34151e85a4325a153 100644 (file)
@@ -1,3 +1,7 @@
+2007-04-06  Theodore Tso  <tytso@mit.edu>
+
+       * test_icount.c: Fix up usage and decrement error messages
+
 2006-06-30  Theodore Ts'o  <tytso@mit.edu>
 
        * Release of E2fsprogs 1.38
index 726d4f9ae4ed64d4f57541ff07b852db96dc6b01..b58a373dd01c390a2301d8b39c1f9717fc8f308d 100644 (file)
@@ -1,19 +1,21 @@
 test_icount: validate
 Icount structure successfully validated
-test_icount: store 0
-usage: store inode counttest_icount: fetch 0
+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_increment
-test_icount: store 20001
-usage: store inode counttest_icount: fetch 20001
+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_increment
+decrement: Invalid argument passed to ext2 library while calling ext2fs_icount_decrement
 test_icount: validate
 Icount structure successfully validated
 test_icount: fetch 1
@@ -56,7 +58,7 @@ 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_increment
+decrement: Invalid argument passed to ext2 library while calling ext2fs_icount_decrement
 test_icount: increment 2
 Count is now 1
 test_icount: fetch 2
@@ -88,7 +90,7 @@ 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_increment
+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
@@ -128,9 +130,9 @@ 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_increment
+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_increment
+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
@@ -141,7 +143,7 @@ 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_increment
+decrement: Invalid argument passed to ext2 library while calling ext2fs_icount_decrement
 test_icount: get_size
 Size of icount is: 105
 test_icount: validate
index ea611db3eeb5f7771fe9bb53b0e5ed952bbbe30a..8cb19551005a088ae50e8979f011baa5685837b2 100644 (file)
@@ -8,11 +8,11 @@
 # First let's test the boundary cases for illegal arguments
 #
 validate
-store 0
+store 0 0
 fetch 0
 increment 0
 decrement 0
-store 20001
+store 20001 0
 fetch 20001
 increment 20001
 decrement 20001
index 9df7cb67324c93d591883f0afbb3ebf0dba361f5..026779fbd17b7b5c281a01dec2f02d78241c295e 100644 (file)
@@ -101,7 +101,7 @@ void do_free_icount(int argc, char **argv)
 
 void do_fetch(int argc, char **argv)
 {
-       const char      *usage = "usage: %s inode";
+       const char      *usage = "usage: %s inode\n";
        errcode_t       retval;
        ext2_ino_t      ino;
        __u16           count;
@@ -124,7 +124,7 @@ void do_fetch(int argc, char **argv)
 
 void do_increment(int argc, char **argv)
 {
-       const char      *usage = "usage: %s inode";
+       const char      *usage = "usage: %s inode\n";
        errcode_t       retval;
        ext2_ino_t      ino;
        __u16           count;
@@ -148,7 +148,7 @@ void do_increment(int argc, char **argv)
 
 void do_decrement(int argc, char **argv)
 {
-       const char      *usage = "usage: %s inode";
+       const char      *usage = "usage: %s inode\n";
        errcode_t       retval;
        ext2_ino_t      ino;
        __u16           count;
@@ -164,7 +164,7 @@ void do_decrement(int argc, char **argv)
        retval = ext2fs_icount_decrement(test_icount, ino, &count);
        if (retval) {
                com_err(argv[0], retval,
-                       "while calling ext2fs_icount_increment");
+                       "while calling ext2fs_icount_decrement");
                return;
        }
        printf("Count is now %u\n", count);
@@ -172,7 +172,7 @@ void do_decrement(int argc, char **argv)
 
 void do_store(int argc, char **argv)
 {
-       const char      *usage = "usage: %s inode count";
+       const char      *usage = "usage: %s inode count\n";
        errcode_t       retval;
        ext2_ino_t      ino;
        ext2_ino_t      count;