Skip to content

{bp-3091} testing/fs: update api name fs_getfilep/fs_putfilep to file_get/file_put #3113

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: releases/12.10
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****************************************************************************
* apps/testing/testsuites/kernel/fs/cases/fs_getfilep_test.c
* apps/testing/testsuites/kernel/fs/cases/fs_file_get_test.c
*
* SPDX-License-Identifier: Apache-2.0
*
Expand Down Expand Up @@ -45,10 +45,10 @@
****************************************************************************/

/****************************************************************************
* Name: test_nuttx_fs_getfilep01
* Name: test_nuttx_fs_file_get01
****************************************************************************/

void test_nuttx_fs_getfilep01(FAR void **state)
void test_nuttx_fs_file_get01(FAR void **state)
{
FAR struct file *filep;
int ret;
Expand All @@ -72,7 +72,7 @@ void test_nuttx_fs_getfilep01(FAR void **state)

/* get struct file */

ret = fs_getfilep(fileno(fp), &filep);
ret = file_get(fileno(fp), &filep);
assert_int_equal(ret, 0);

/* malloc memory */
Expand Down Expand Up @@ -100,11 +100,11 @@ void test_nuttx_fs_getfilep01(FAR void **state)

/* put filep */

fs_putfilep(filep);
file_put(filep);

/* get struct file again */

ret = fs_getfilep(fileno(fp), &filep);
ret = file_get(fileno(fp), &filep);
assert_int_equal(ret, 0);

assert_int_equal(filep->f_pos, BUF_SIZE);
Expand All @@ -113,7 +113,7 @@ void test_nuttx_fs_getfilep01(FAR void **state)

/* put filep */

fs_putfilep(filep);
file_put(filep);

assert_int_equal(fclose(fp), 0);
}
2 changes: 1 addition & 1 deletion testing/testsuites/kernel/fs/cmocka_fs_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ int main(int argc, char *argv[])
cmocka_unit_test_setup_teardown(test_nuttx_fs_fsync02,
test_nuttx_fs_test_group_setup,
test_nuttx_fs_test_group_teardown),
cmocka_unit_test_setup_teardown(test_nuttx_fs_getfilep01,
cmocka_unit_test_setup_teardown(test_nuttx_fs_file_get01,
test_nuttx_fs_test_group_setup,
test_nuttx_fs_test_group_teardown),
cmocka_unit_test_setup_teardown(test_nuttx_fs_mkdir01,
Expand Down
4 changes: 2 additions & 2 deletions testing/testsuites/kernel/fs/include/fstest.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ void test_nuttx_fs_fstatfs01(FAR void **state);
void test_nuttx_fs_fsync01(FAR void **state);
void test_nuttx_fs_fsync02(FAR void **state);

/* cases/fs_getfilep_test.c
/* cases/fs_file_get_test.c
* ************************************************/

void test_nuttx_fs_getfilep01(FAR void **state);
void test_nuttx_fs_file_get01(FAR void **state);

/* cases/fs_mkdir_test.c
* ************************************************/
Expand Down
Loading