Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
tests: add test for frame buffer interface #4227
Conversation
sergiocazzolato
changed the title from
Adding test for interface frame buffer
to
tests: adding test for interface frame buffer
Nov 15, 2017
codecov-io
commented
Nov 16, 2017
•
Codecov Report
@@ Coverage Diff @@
## master #4227 +/- ##
=========================================
Coverage ? 75.97%
=========================================
Files ? 442
Lines ? 38483
Branches ? 0
=========================================
Hits ? 29239
Misses ? 7229
Partials ? 2015Continue to review full report at Codecov.
|
zyga
changed the title from
tests: adding test for interface frame buffer
to
tests: add test for frame buffer interface
Nov 16, 2017
zyga
requested a review
from
mvo5
Nov 16, 2017
| @@ -0,0 +1,3 @@ | ||
| +#!/bin/sh | ||
| + | ||
| +head -c 10 /dev/fb0 |
bboozzoo
Nov 17, 2017
•
Contributor
I'd probably make this a dd if=/dev/fb0 of=/dev/null count=10. IIRC head will stop after hitting a 0 in the input, or use od -N 10 if the content is important/
| @@ -0,0 +1,3 @@ | ||
| +#!/bin/sh | ||
| + | ||
| +echo "$1" | dd bs=4 seek=$((100 * 1024 + 200)) >/dev/fb0 |
bboozzoo
Nov 17, 2017
Contributor
I think you mean:
echo "$1" | dd bs=4 seek=$((100*1024 + 200)) of=/dev/fb0
stolowski
requested changes
Nov 17, 2017
Looks good overall, thanks for the test. Some trivials + a question.
| +name: test-snapd-framebuffer | ||
| +version: 1.0 | ||
| +summary: Basic snap to check access to file system | ||
| +description: A basic snap to check access to file system |
stolowski
Nov 17, 2017
Contributor
Both summary and description need changing, looks like a copy-paste from another test.
| + The test also checks the interface connection and disconnection works properly. | ||
| + | ||
| +prepare: | | ||
| + snap try $TESTSLIB/snaps/test-snapd-framebuffer |
sergiocazzolato
Nov 22, 2017
Contributor
Thanks for reviewing this. Snaps are automatically removed in the reset.sh script which is called in the test setup.
| + | ||
| + if [ ! -e /dev/fb0 ]; then | ||
| + echo "Framebuffer not available on /dev/fb0" | ||
| + exit 0 |
stolowski
Nov 17, 2017
Contributor
Is this intended, shouldn't this be an error? Or is it available on some of the systems only? Should we restrict this test to be run on select systems instead?
sergiocazzolato
Nov 22, 2017
Contributor
That could be done for sure, but as I was asked to detect it dinamically the path in the uhid test (which is similat to this one), I though that should be better to make this detection dinamic here.
sergiocazzolato commentedNov 15, 2017
To test this use a device which has the file /dev/fb0, most of the cloud images don't have it.