Changeset 4ac5ffbb in rtems for testsuites
- Timestamp:
- 02/05/18 08:31:32 (6 years ago)
- Branches:
- 5, master
- Children:
- 53b6484
- Parents:
- 03e5a780
- Location:
- testsuites/fstests/fsclose01
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
testsuites/fstests/fsclose01/init.c
r03e5a780 r4ac5ffbb 1 1 /* 2 * Copyright (c) 2012, 201 7embedded brains GmbH. All rights reserved.2 * Copyright (c) 2012, 2018 embedded brains GmbH. All rights reserved. 3 3 * 4 4 * embedded brains GmbH … … 427 427 } 428 428 429 static void test (test_context *ctx)429 static void test_close(test_context *ctx) 430 430 { 431 431 const char *path = "generic"; … … 508 508 } 509 509 510 static void test_tmpfile(test_context *ctx) 511 { 512 rtems_resource_snapshot before; 513 FILE *f; 514 int rv; 515 516 rv = mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO); 517 rtems_test_assert(rv == 0); 518 519 f = tmpfile(); 520 rtems_test_assert(f != NULL); 521 rv = fclose(f); 522 rtems_test_assert(rv == 0); 523 524 rtems_resource_snapshot_take(&before); 525 f = tmpfile(); 526 rtems_test_assert(f != NULL); 527 rv = fclose(f); 528 rtems_test_assert(rv == 0); 529 rtems_test_assert(rtems_resource_snapshot_check(&before)); 530 } 531 510 532 static void Init(rtems_task_argument arg) 511 533 { 512 534 TEST_BEGIN(); 513 test(&test_instance); 535 test_close(&test_instance); 536 test_tmpfile(&test_instance); 514 537 TEST_END(); 515 538 rtems_test_exit(0);
Note: See TracChangeset
for help on using the changeset viewer.