summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psxndbm01/psxndbm01.scn
diff options
context:
space:
mode:
authorVaibhav Gupta <vaibhavgupta40@gmail.com>2019-07-23 19:11:54 +0530
committerJoel Sherrill <joel@rtems.org>2019-07-30 10:18:09 -0500
commit57e0173584a914b1a92aa73deade6afb463186db (patch)
tree1fe51973e29e9447fd929c565b2288e5a12b18d8 /testsuites/psxtests/psxndbm01/psxndbm01.scn
parentarm/raspberrypi: Fix linker map (diff)
downloadrtems-57e0173584a914b1a92aa73deade6afb463186db.tar.bz2
psxtests: Add ndbm test suite
Joel Sherrill <joel@rtems.org> modified the patch to add autoconf logic to avoid building this new test unless the tool chain include <ndbm.h>. The ensures that git bisect continues to work and that the addition of this test does not immediately force the entire community to update their tools.
Diffstat (limited to '')
-rw-r--r--testsuites/psxtests/psxndbm01/psxndbm01.scn29
1 files changed, 29 insertions, 0 deletions
diff --git a/testsuites/psxtests/psxndbm01/psxndbm01.scn b/testsuites/psxtests/psxndbm01/psxndbm01.scn
new file mode 100644
index 0000000000..3fa386630a
--- /dev/null
+++ b/testsuites/psxtests/psxndbm01/psxndbm01.scn
@@ -0,0 +1,29 @@
+*** PSXNDBM 01 Test ***
+
+Open Database.
+Store Records in Database.
+Fetch Records from Database and check.
+Close Database.
+
+Testcases for 'dbm_open()'.
+Use 'O_CREAT | O_EXCL' to open existing file and confirm error.
+Use path name larger than '{PATH_MAX}-3 bytes.' and confirm error.
+Open file with write access only and confirm error.
+
+Testcases for 'dbm_store()'
+Insert new record with same key using 'DBM_INSERT' mode and confirm error.
+Insert new record with same key using 'DBM_REPLACE' mode and confirm changes.
+Store a new record and confirm that total number of records is successful 2.
+
+Testcases for 'dbm_fetch()'
+Fetch existing records and confirm results.
+Fetch non-existing record and confirm error.
+
+Testcases for 'dbm_delete()'
+Delete non-existing record and confirm error.
+Delete existing record and confirm that total number of records is successful 1.
+Confirm if correct record is deleted.
+Check if the data is not corrupted after usage of 'dbm_delete()'.
+Empty records in database and check results of 'dbm_firstkey()'.
+
+*** END OF TEST PSXNDBM 01 *** \ No newline at end of file