From 57e0173584a914b1a92aa73deade6afb463186db Mon Sep 17 00:00:00 2001 From: Vaibhav Gupta Date: Tue, 23 Jul 2019 19:11:54 +0530 Subject: psxtests: Add ndbm test suite Joel Sherrill modified the patch to add autoconf logic to avoid building this new test unless the tool chain include . 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. --- testsuites/psxtests/psxndbm01/psxndbm01.scn | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 testsuites/psxtests/psxndbm01/psxndbm01.scn (limited to 'testsuites/psxtests/psxndbm01/psxndbm01.scn') 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 -- cgit v1.2.3