Rtos API example

Embed: (wiki syntax)

« Back to documentation index

open.cpp File Reference

open.cpp File Reference

Test cases to open KVs in the CFSTORE using the drv->Open() interface. More...

Go to the source code of this file.

Functions

control_t cfstore_open_test_01_end (const size_t call_count)
 Basic open test which does the following:

  • creates KV with default rw perms and writes some data to the value blob.

control_t cfstore_open_test_02_end (const size_t call_count)
 test to open() a pre-existing key and try to write it, which should fail as by default pre-existing keys are opened read-only
control_t cfstore_open_test_03_end (const size_t call_count)
 test to open() a pre-existing key and try to write it, which should succeed because the key was opened read-write permissions explicitly
control_t cfstore_open_test_04_end (const size_t call_count)
 test to call cfstore_open() with a key_name string that exceeds the maximum length
control_t cfstore_open_test_05_end (const size_t call_count)
 test to call cfstore_open() with key_name that in includes illegal characters

  • the character(s) can be at the beginning of the key_name
  • the character(s) can be at the end of the key_name
  • the character(s) can be somewhere within the key_name string
  • a max-length string of random characters (legal and illegal)
  • a max-length string of random illegal characters only

control_t cfstore_open_test_06_end (const size_t call_count)
 test to call cfstore_open() with key_name that in includes illegal characters

  • a max-length string of random illegal characters only

control_t cfstore_open_test_07_end (const size_t call_count)
 test to call cfstore_open() with key_name that in includes illegal characters

  • a max-length string of random characters (legal and illegal)


Detailed Description

Test cases to open KVs in the CFSTORE using the drv->Open() interface.

Please consult the documentation under the test-case functions for a description of the individual test case.

Definition in file open.cpp.


Function Documentation

control_t cfstore_open_test_01_end ( const size_t  call_count )

Basic open test which does the following:

  • creates KV with default rw perms and writes some data to the value blob.

  • closes the newly created KV.
  • opens the KV with the default permissions (r-only)
  • reads the KV data and checks its the same as the previously created data.
  • closes the opened key
Returns:
on success returns CaseNext to continue to next test case, otherwise will assert on errors.

Definition at line 99 of file open.cpp.

control_t cfstore_open_test_02_end ( const size_t  call_count )

test to open() a pre-existing key and try to write it, which should fail as by default pre-existing keys are opened read-only

Basic open test which does the following:

  • creates KV with default rw perms and writes some data to the value blob.
  • closes the newly created KV.
  • opens the KV with the default permissions (read-only)
  • tries to write the KV data which should fail because KV was not opened with write flag set.
  • closes the opened key
Returns:
on success returns CaseNext to continue to next test case, otherwise will assert on errors.

Definition at line 186 of file open.cpp.

control_t cfstore_open_test_03_end ( const size_t  call_count )

test to open() a pre-existing key and try to write it, which should succeed because the key was opened read-write permissions explicitly

Basic open test which does the following:

  • creates KV with default rw perms and writes some data to the value blob.
  • closes the newly created KV.
  • opens the KV with the rw permissions (non default)
  • tries to write the KV data which should succeeds because KV was opened with write flag set.
  • closes the opened key
Returns:
on success returns CaseNext to continue to next test case, otherwise will assert on errors.

Definition at line 239 of file open.cpp.

control_t cfstore_open_test_04_end ( const size_t  call_count )

test to call cfstore_open() with a key_name string that exceeds the maximum length

Returns:
on success returns CaseNext to continue to next test case, otherwise will assert on errors.

Definition at line 287 of file open.cpp.

control_t cfstore_open_test_05_end ( const size_t  call_count )

test to call cfstore_open() with key_name that in includes illegal characters

  • the character(s) can be at the beginning of the key_name
  • the character(s) can be at the end of the key_name
  • the character(s) can be somewhere within the key_name string
  • a max-length string of random characters (legal and illegal)
  • a max-length string of random illegal characters only

Returns:
on success returns CaseNext to continue to next test case, otherwise will assert on errors.

Definition at line 385 of file open.cpp.

control_t cfstore_open_test_06_end ( const size_t  call_count )

test to call cfstore_open() with key_name that in includes illegal characters

  • a max-length string of random illegal characters only

Returns:
on success returns CaseNext to continue to next test case, otherwise will assert on errors.

Definition at line 528 of file open.cpp.

control_t cfstore_open_test_07_end ( const size_t  call_count )

test to call cfstore_open() with key_name that in includes illegal characters

  • a max-length string of random characters (legal and illegal)

Returns:
on success returns CaseNext to continue to next test case, otherwise will assert on errors.

Definition at line 570 of file open.cpp.