Skip to content

STORAGE: FAT32/SDCARD Filesystem support with basic test (basic.cpp) #3468

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

Merged
merged 11 commits into from
Dec 22, 2016

Conversation

simonqhughes
Copy link
Contributor

@simonqhughes simonqhughes commented Dec 19, 2016

Description

This pull request contains the following changes:

  • The FAT32/SD card support has been moved from<src_root>\mbed-os\features\unsupported\fs to <src_root>\mbed-os\features\filesystem. This tree contains the fat and sd directories for the FATFileSystem and SDFileSystem support respectively.
  • The creation of tests under <src_root>\mbed-os\features\TESTS\filesystem
  • The addition the <src_root>\mbed-os\features\TESTS\filesystem\basic\basic.cpp test. This includes greentea ported tests from the glibc library.
  • The addition the <src_root>\mbed-os\features\TESTS\filesystem\fopen\fopen.cpp test. This includes ported tests from the CFSTORE open test.

The work is being delivered to the feature-storage branch for the Israel/mbed-client team to adopt.

Status

READY

Migrations

This PR does not change any APIs.

Related PRs

There are no related PRs.

@theotherjimmy
Copy link
Contributor

@simonqhughes The Block Device API (introduced here #3449) will decouple the FAT FS from the SD Card driver. Please be aware of the changes that my need to occur depending on merging order of these two pull requests.

@theotherjimmy
Copy link
Contributor

theotherjimmy commented Dec 19, 2016

@simonqhughes Another note. Please take a look at the Travis CI failure. It looks to me like moving the FAT FS headers has messed with the USB code, which expected to be able to include it.

REDACTION: I don't think we care too much about that Travis failure for feature branches.

Well, now I care

@sg-
Copy link
Contributor

sg- commented Dec 19, 2016

REDACTION: I don't think we care too much about that Travis failure for feature branches.

Feature branches are deliverables and must pass all CI

@sg-
Copy link
Contributor

sg- commented Dec 19, 2016

Notes:

  • should live in features/filesystem
  • SD driver to move out of OS (i think) when block storage development is complete

@geky
Copy link
Contributor

geky commented Dec 19, 2016

@theotherjimmy, I can retarget #3449 at the feature-storage branch. We should probably go ahead and merge this first, #3449 should be easy to rebase onto this since there should be no changes to the filesystem API. Additionally we get the sanity of running the glib tests @simonqhughes is bringing in on the pr.

@geky
Copy link
Contributor

geky commented Dec 20, 2016

I don't know how long we want to keep build_travis in the tests for mbed-os. It seems like they may become more trouble then they are worth.

@simonqhughes, for now, here is the patch to redirect the build_travis step:
geky@6f88739#diff-178bb26296e93523919bbd312ce1de61

I wasn't sure if I could add that change to this pr, I didn't try in case it would mess up your development setup.

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 20, 2016

I don't know how long we want to keep build_travis in the tests for mbed-os. It seems like they may become more trouble then they are worth.

It's not just about travis but about having some dependencies on this filesystem in the mbed 2 (scripts that are used for building mbed 2 libraries). Travis shows it nicely that there are some. How shall we fix this?

@geky
Copy link
Contributor

geky commented Dec 20, 2016

@0xc0170, are these changes reasonable?
geky@6f88739#diff-178bb26296e93523919bbd312ce1de61

@simonqhughes
Copy link
Contributor Author

Summary of changes:

  • The FAT32/SD card support has been moved from<src_root>\mbed-os\features\unsupported\fs to <src_root>\mbed-os\features\filesystem.
  • The creation of tests under <src_root>\mbed-os\features\TESTS\filesystem
  • The addition the <src_root>\mbed-os\features\TESTS\filesystem\basic\basic.cpp test. This includes greentea ported tests from the glibc library.
  • The addition the <src_root>\mbed-os\features\TESTS\filesystem\fopen\fopen.cpp test. This includes ported tests from the CFSTORE open test.
  • the addition of the fix reported by geky here: geky@ 6f88739 #diff-178bb26296e93523919bbd312ce1de61
  • fix to tools/paths.py to fix buld_travis.py results.

@theotherjimmy
Copy link
Contributor

@simonqhughes Thanks for the summary. What do the test actually test for?

@geky
Copy link
Contributor

geky commented Dec 20, 2016

@bridadan any idea why the jenkins check is failing?

@sg-
Copy link
Contributor

sg- commented Dec 20, 2016

[K64F ARM] Build failures:
[K64F ARM]   * K64F::ARM::FEATURES-TESTS-FILESYSTEM-FOPEN
[K64F ARM]         Building project fopen (K64F, ARM)
[K64F ARM]         Scan: ARM
[K64F ARM]         Scan: FEATURE_LWIP
[K64F ARM]         Scan: FEATURE_STORAGE
[K64F ARM]         Scan: fopen
[K64F ARM]         Compile [100.0%]: fopen.cpp
[K64F ARM]         [Warning] mbed_config.h@25,0:  #47-D: incompatible redefinition of macro "UNITY_INCLUDE_CONFIG_H"
[K64F ARM]         [Error] fopen.cpp@37,0:  #5: cannot open source input file "sys/stat.h": No such file or directory
[K64F ARM]         
[K64F ARM] [mbed] ERROR: "python" returned error code 1.

@geky
Copy link
Contributor

geky commented Dec 20, 2016

Ah, thanks @sg-, it looks like this is an actual test failure that will require looking into.

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 21, 2016

/morph test-nightly

@geky
Copy link
Contributor

geky commented Dec 21, 2016

Assuming tests pass, LGTM, once merged we can make more granular changes as needed.

@mbed-bot
Copy link

Result: FAILURE

Your command has finished executing! Here's what you wrote!

/morph test-nightly

Output

mbed Build Number: 1312

Build failed!

@geky
Copy link
Contributor

geky commented Dec 21, 2016

/morph test-nightly

@mbed-bot
Copy link

Result: FAILURE

Your command has finished executing! Here's what you wrote!

/morph test-nightly

Output

mbed Build Number: 1314

Build failed!

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 22, 2016

@simonqhughes THe only failure for the latest one is build for SARA_NBIOT_EVK, is that related? Error is [Error] SDFileSystem.h@84,0: #20: identifier "SPI" is undefined

…build correctly for targets that dont have SPI interfaces.
@0xc0170 0xc0170 merged commit 80a74c6 into ARMmbed:feature-storage Dec 22, 2016
@0xc0170 0xc0170 removed the needs: CI label Dec 22, 2016
@sg-
Copy link
Contributor

sg- commented Dec 22, 2016

Why is this merged without /morph test-nightly passing?

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 22, 2016

Why is this merged without /morph test-nightly passing?

/morph test-nightly

@mbed-bot
Copy link

Result: FAILURE

Your command has finished executing! Here's what you wrote!

/morph test-nightly passing?

Output

mbed Build Number: 1319

Test failed!

@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test-nightly passing?

/morph test-nightly

Output

mbed Build Number: 1320

All builds and test passed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants