Skip to content
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

Host tests: LittleFS SpeedTest SIGFPE (Floating point exception) #8339

Closed
mcspr opened this issue Oct 15, 2021 · 3 comments · Fixed by #8340
Closed

Host tests: LittleFS SpeedTest SIGFPE (Floating point exception) #8339

mcspr opened this issue Oct 15, 2021 · 3 comments · Fixed by #8340

Comments

@mcspr
Copy link
Collaborator

mcspr commented Oct 15, 2021

Running 40b26b7

> cd host/tests
> make ../../libraries/LittleFS/examples/SpeedTest/SpeedTest
> ./bin/SpeedTest/SpeedTest
SPIFFS: 1048576 bytes
SPIFFS: loading 1048576 bytes from './bin/SpeedTest/SpeedTest-spiffs1024KB'
LittleFS: 1048576 bytes
LittleFS: loading 1048576 bytes from './bin/SpeedTest/SpeedTest-littlefs1024KB'
Beginning test
Creating 512KB file, may take a while...
==> Time to write 512KB in 256b chunks = 2 milliseconds
==> Created file size = 524288
Reading 512KB file sequentially in 256b chunks
==> Time to read 512KB sequentially in 256b chunks = 1 milliseconds = 524288000 bytes/s
Reading 512KB file MISALIGNED in flash and RAM sequentially in 256b chunks
fish: './bin/SpeedTest/SpeedTest' terminated by signal SIGFPE (Floating point exception)

stop - start can be 0

Program received signal SIGFPE, Arithmetic exception.
0x000055555555917c in DoTest (fs=0x5555555874f0 <LittleFS>) at ./../../libraries/LittleFS/examples/SpeedTest//SpeedTest.ino:75
75        Serial.printf("==> Time to read %dKB sequentially MISALIGNED in flash and RAM in 256b chunks = %ld milliseconds = %ld bytes/s\n", TESTSIZEKB, stop - start, TESTSIZEKB * 1024 / (stop - start) * 1000);

There are more offending lines though

Serial.printf("==> Time to read %dKB sequentially in 256b chunks = %ld milliseconds = %ld bytes/s\n", TESTSIZEKB, stop - start, TESTSIZEKB * 1024 / (stop - start) * 1000);

Serial.printf("==> Time to read %dKB sequentially MISALIGNED in flash and RAM in 256b chunks = %ld milliseconds = %ld bytes/s\n", TESTSIZEKB, stop - start, TESTSIZEKB * 1024 / (stop - start) * 1000);

Serial.printf("==> Time to read %dKB in reverse in 256b chunks = %ld milliseconds = %ld bytes/s\n", TESTSIZEKB, stop - start, TESTSIZEKB * 1024 / (stop - start) * 1000);

Serial.printf("==> Time to write 64KB in 1b chunks = %ld milliseconds = %ld bytes/s\n", stop - start, 65536 / (stop - start) * 1000);

Serial.printf("==> Time to read 64KB in 1b chunks = %ld milliseconds = %ld bytes/s\n", stop - start, 65536 / (stop - start) * 1000);

I suppose there should be a helper function for example(s) or the tests specifically that handles time tracing instead of manual approach like this

@earlephilhower
Copy link
Collaborator

While I see your point, I'm not sure it's worth the code to patch an onboard flash speed test to run on the host which is using DRAM and can end up with div-by-0 error errors. This example in particular was meant to compare on-device speeds of LittleFS, SDFS, and SPIFFS, and running on the host is not really useful IMHO.

@mcspr
Copy link
Collaborator Author

mcspr commented Oct 15, 2021

Hm. This list might need updating then

../../libraries/LittleFS/examples/SpeedTest/SpeedTest ; do

It runs for every PR

@earlephilhower
Copy link
Collaborator

Wow, I guess we are getting faster CI systems all the time! Thanks, GitHub!

The test is used for valgrind checking of the File operations, not actual functional correctness, so on second thought it should be kept and fixed. Let me throw in a PR...

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

Successfully merging a pull request may close this issue.

2 participants