-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Closed
Labels
CoverityA Coverity detected issue or its fixA Coverity detected issue or its fixbugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bugLow impact/importance bug
Description
Static code scan issues found in file:
Category: Error handling issues
Function: test_mount_flags
Component: Tests
CID: 215714
Details:
53 zassert_equal(ret, -EROFS, "Expected EROFS", ret);
54 ret = fs_open(&fs, TEST_FS_MNTP"/some", FS_O_RDWR);
55 zassert_equal(ret, -EROFS, "Expected EROFS", ret);
56 ret = fs_open(&fs, TEST_FS_MNTP"/some", FS_O_READ);
57 zassert_equal(ret, 0, "Expected success", ret);
58 fs_close(&fs);
>>> CID 215714: (CHECKED_RETURN)
>>> Calling "fs_unmount" without checking return value (as is done elsewhere 16 out of 20 times).
59 fs_unmount(&mp);
29 ret = fs_open(&fs, TEST_FS_MNTP"/some", FS_O_CREATE);
30 zassert_equal(ret, 0, "Expected success", ret);
31 fs_close(&fs);
32 TC_PRINT("Create other directory\n");
33 zassert_equal(ret, 0, "Expected success", ret);
34 ret = fs_mkdir(TEST_FS_MNTP"/other");
>>> CID 215714: (CHECKED_RETURN)
>>> Calling "fs_unmount" without checking return value (as is done elsewhere 16 out of 20 times).
35 fs_unmount(&mp);
36
37 /* Check fs operation on volume mounted with FS_MOUNT_FLAG_READ_ONLY */
38 mp.flags = FS_MOUNT_FLAG_READ_ONLY;
39 TC_PRINT("Mount as read-only\n");
40 ret = fs_mount(&mp);
Please fix or provide comments in coverity using the link:
https://scan9.coverity.com/reports.htm#v32951/p12996.
Note: This issue was created automatically. Priority was set based on classification
of the file affected and the impact field in coverity. Assignees were set using the CODEOWNERS file.
Metadata
Metadata
Assignees
Labels
CoverityA Coverity detected issue or its fixA Coverity detected issue or its fixbugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bugLow impact/importance bug