Changeset 9e8df1fe in rtems for testsuites/fstests/fsrfsbitmap01/test.c
- Timestamp:
- 04/10/18 05:02:01 (5 years ago)
- Branches:
- 5, master
- Children:
- 7ff743d
- Parents:
- d869c182
- git-author:
- Chris Johns <chrisj@…> (04/10/18 05:02:01)
- git-committer:
- Chris Johns <chrisj@…> (04/11/18 01:51:57)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
testsuites/fstests/fsrfsbitmap01/test.c
rd869c182 r9e8df1fe 196 196 } 197 197 198 /* Check the free and size are equal after opening */ 199 rtems_test_assert( control.free == control.size ); 200 198 201 /* 199 202 * This is a new bitmap with no bits set. Try and find a bit with a few … … 245 248 rc == 0 ? "PASS" : "FAIL", strerror (rc)); 246 249 rtems_rfs_exit_on_error (rc, false, &control, buffer.buffer); 250 /* Check the free is 0 */ 251 rtems_test_assert( control.free == 0 ); 247 252 248 253 bit = rand () % size; … … 252 257 bit, rc == 0 ? "PASS" : "FAIL", strerror (rc)); 253 258 rtems_rfs_exit_on_error (rc, false, &control, buffer.buffer); 259 rtems_test_assert( control.free == 1); 254 260 255 261 last_bit = bit; … … 270 276 rc == 0 ? "pass" : "FAIL", strerror (rc)); 271 277 rtems_rfs_exit_on_error (rc, false, &control, buffer.buffer); 278 rtems_test_assert( control.free == 1); 272 279 273 280 rc = rtems_rfs_bitmap_map_alloc (&control, size - 1, &result, &bit); … … 427 434 rc = rtems_rfs_bitmap_map_clear_all(&control); 428 435 rtems_test_assert( rc == 0 ); 436 /* Check the free and size are equal after clearing all */ 437 rtems_test_assert( control.free == control.size ); 438 439 /* Check accounting for bits when setting a bit, see #3089 */ 440 printf (" 35. Set a bit and check accounting.\n"); 441 rc = rtems_rfs_bitmap_map_set(&control, 0); 442 rtems_test_assert( rc == 0 ); 443 rtems_test_assert( control.free == control.size - 1); 444 /* Setting again should not change the accounting. */ 445 rc = rtems_rfs_bitmap_map_set(&control, 0); 446 rtems_test_assert( rc == 0 ); 447 rtems_test_assert( control.free == control.size - 1); 429 448 430 449 rtems_rfs_bitmap_close (&control);
Note: See TracChangeset
for help on using the changeset viewer.