squash pkg/spiffs: (opendir, readdir, closedir) Use pointer to private data directly instead of copying#2
Merged
vincent-d merged 1 commit intoOTAkeys:pr/spiffsfrom Jul 18, 2016
Conversation
…e data directly instead of copying
|
|
||
| SPIFFS_opendir(&fs_desc->fs, dirname, &d); | ||
| memcpy(dirp->private_data.buffer, &d, sizeof(d)); | ||
| spiffs_DIR *res = SPIFFS_opendir(&fs_desc->fs, dirname, d); |
Author
There was a problem hiding this comment.
Also added a check on the return value of opendir. It fails if the fs is not mounted or if SPIFFS_CHECK_CFG fails.
Member
|
@gebart , are we sure the memory alignment is OK. That was why I used a memcpy. |
Author
|
The alignment of private_data.buffer, you mean? The alignment of that should be the same as for |
Member
|
yep I meant private_data.buffer, but I've missed the union thing, so that should be OK indeed. |
vincent-d
pushed a commit
that referenced
this pull request
Jul 18, 2016
…e data directly instead of copying (#2)
vincent-d
pushed a commit
that referenced
this pull request
Jul 19, 2016
…e data directly instead of copying (#2)
vincent-d
pushed a commit
that referenced
this pull request
Jul 19, 2016
…e data directly instead of copying (#2)
vincent-d
pushed a commit
that referenced
this pull request
Jul 27, 2016
…e data directly instead of copying (#2)
vincent-d
pushed a commit
that referenced
this pull request
Jul 28, 2016
…e data directly instead of copying (#2)
vincent-d
pushed a commit
that referenced
this pull request
Aug 10, 2016
…e data directly instead of copying (#2)
vincent-d
pushed a commit
that referenced
this pull request
Sep 7, 2016
…e data directly instead of copying (#2)
vincent-d
pushed a commit
that referenced
this pull request
Dec 6, 2016
…e data directly instead of copying (#2)
vincent-d
pushed a commit
that referenced
this pull request
Dec 26, 2016
…e data directly instead of copying (#2)
vincent-d
pushed a commit
that referenced
this pull request
Jan 11, 2017
…e data directly instead of copying (#2)
vincent-d
pushed a commit
that referenced
this pull request
Jan 20, 2017
…e data directly instead of copying (#2)
vincent-d
pushed a commit
that referenced
this pull request
Feb 7, 2017
…e data directly instead of copying (#2)
vincent-d
pushed a commit
that referenced
this pull request
May 29, 2019
…onal sys: make uart_stdio RX optional (attempt #2)
toonst
pushed a commit
that referenced
this pull request
Jul 19, 2019
The evtimer_msg test is expanded to also delete entries. Furthermore the messages that are printed should now show numbers that are very close (if not equal). Something like this: At 740 ms received msg 0: "#2 supposed to be 740" At 1081 ms received msg 1: "#0 supposed to be 1081" At 1581 ms received msg 2: "#1 supposed to be 1581" At 4035 ms received msg 3: "#3 supposed to be 4035" The function evtimer_print is also called to show the intermediate status of evtimer entries.
vincent-d
pushed a commit
that referenced
this pull request
Sep 6, 2019
The test randomly fails on `native` due to timers being not accurate but
it cannot be otherwise. So better disable it than raising fake errors.
main(): This is RIOT! (Version: buildtest)
Testing generic evtimer
This should list 2 items
ev #1 offset=1000
ev #2 offset=500
This should list 4 items
ev #1 offset=659
ev #2 offset=341
ev #3 offset=500
ev #4 offset=2454
Are the reception times of all 4 msgs close to the supposed values?
At 662 ms received msg 0: "#2 supposed to be 659"
At 1009 ms received msg 1: "#0 supposed to be 1000"
At 1511 ms received msg 2: "#1 supposed to be 1500"
Traceback (most recent call last):
File "/tmp/dwq.0.3125418833043728/ef3af88c4b3615788b164464a437df5c/tests/evtimer_msg/tests/01-run.py", line 33, in <module>
sys.exit(run(testfunc))
File "/tmp/dwq.0.3125418833043728/ef3af88c4b3615788b164464a437df5c/dist/pythonlibs/testrunner/__init__.py", line 29, in run
testfunc(child)
File "/tmp/dwq.0.3125418833043728/ef3af88c4b3615788b164464a437df5c/tests/evtimer_msg/tests/01-run.py", line 26, in testfunc
assert(actual in range(expected - ACCEPTED_ERROR, expected + ACCEPTED_ERROR))
AssertionError
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.