5 Commits

Author SHA1 Message Date
Vince Woo
20d1b54de4
Fix directory detection bug in Os::FileSystem::getPathType (#3727)
* Fixing directory detection bug.

* Removed some superfluous whitespace

* Adding branch path for non-directory and non-file to return PathType::OTHER. Fixing a spelling mistake.

* Moving getPathType to OS specific FileSystem implementations

* Incorporating PR comments and cleaning up comments

* Reverting unnecessary comment changes

* Incorporating fixes for static analysis findings
2025-06-16 15:22:16 -07:00
kevin-f-ortega
09ea55bc8f
Add upper-bound limit to for loop in Os::FileSystem (#3535)
* Adding upper-bound limit to forloop in order to avoid inf loop

* applying code formatter
2025-04-29 17:08:38 -07:00
M Starch
f912e1bd75
Issue 3285 reducing signed size type in os file (#3402)
* Remove FwSignedSizeType from file

* Restoring FwSignedSizeType to seek offsets

* Fixing usages and UTs

* Fixes on Linux

* CI fix

* CI round 3

* CI rev 4

* Fixing code scan errors

* Review fixes - pt 1

* Failed to save
2025-03-28 11:47:07 -07:00
M Starch
d034786bc6
Refactor Os::Queue into CMake selection (#2895)
* Initial interface tests

* Initial working rules tests

* Moving MaxHeap to Types; Fixing minor bugs

* Basic ConditionVariables, Queue blocking, and UTs

* Queue updates for Ref

* Queue build all WIP

* UTs compile

* Passing UTs

* Removing unupdated linux queue implementations

* Fixing linux specific build issues

* Fixing task regression

* Fixing queue test memory leak

* Spelling, comments, formating, and todos

* Condition variable tests

* Minor edits from review

* Condition variable interface tests, fixes

* sp

* ci fixes

* Minor condition variable fix

* Fixing post merge issues

* Final review fixes

* Fixing FS stubs

* Fixing max heap failures

* Linux fixes

* Fixing issues w.r.t. CI
2024-09-30 12:42:50 -07:00
Thomas Boyer-Chammard
d6ebdff460
Refactor Os::FileSystem and Os::Directory (#2871)
* Add FileSystem Interface

* Add OS::FileSystem interface and implementations

* static interface + global Os::init()

* Add test harness

* Implement Os::Directory interfaces and use it in FileSystem::readDirectory

* Add Stub tests for Directory and FileSystem

* wip: modify the interface from Michael feedback

* wip: move functions around and rework interface a little more

* Add Directory rule-based tests

* Refactored Directory for open-create + WIP: FileSystem tests

* Update state tracking mechanism in FileSystem test implementation + add RandomizedTesting

* Replace bounded while-loop with for-loop

* Code cleanup

* fix typo

* Rename FileTracker and code reorganization / clarification

* Code style and add CWD rule

* Clean up tester code

* More cleanup

* Add Posix tests to Os_ut_exe

* Fix DpCatalog readDirectory usage

* Appease CI checks

* Spelling and CI warnings

* Spelling + removing FppConstants include

* Add review changes and todos

* Add Directory::read(Fw::StringBase&) overload

* Refactor copyFileData to iterate over copied size

* Remove FppConstants.hpp include

* Rework moveFile into rename/copy-remove

* Add majestic comments

* Add option to error if dir exist in Fs::createDirectory

* spelling

* include <algorithm> for std::find in tests

* Fix leftover ::CREATE modes in comments and stub tests

* Fix CmdSequencer test case

* Fix memory leak in testing by conditioning the Open rule

* Fix FileManager tests

* Add Directory and FileSystem FPP type definitions; update CMakeLists and clean up comments

* spelling

* Reoder header guards

* Implement changes from peer-review

* read into StringBase with const_cast

* Fix resetSer() call

* Fix spelling

* fix spelling again i guess

* Fix DpCatalog unchecked return value
2024-09-27 09:15:21 -07:00