[Buildroot] [PATCH 00/11] support/download: fix scp and reintroduce source-check

Ricardo Martincoski ricardo.martincoski at gmail.com
Mon Jan 28 02:25:24 UTC 2019


Hello,

Sorry the long delay.

On Thu, Jan 03, 2019 at 06:57 PM, Thomas Petazzoni wrote:

> +Ricardo in Cc.
> 
> On Thu, 3 Jan 2019 21:54:19 +0100, Thomas De Schampheleire wrote:
> 
>> > Indeed, I believe the scp download method is rarely used and tested. The
>> > only solution to not break it again is to have proper tests for it in
>> > support/testing/. Should it be part of your patch series ? :-)
>> 
>> But how to generically test it? It requires a configured ssh server, which
>> is not even guaranteed on localhost.

But this can be guaranteed on the docker image.
This is the main use case for the runtime tests.
Of course I also like to be able to run the tests locally without the docker
image, but what we need to ensure is running inside the docker image. And we
could have a configured ssh server in the docker image.

> 
> I am not sure. A dummy SSH server ? Or do the build with a fake scp
> command in the PATH, which verifies it has the expected arguments, and
> emulates what scp would do ?

So more a unit test than a runtime test. I like the idea, but I am don't know
how difficult would be to implement this.
For me any test case that can catch regressions is welcome.
If we follow this way, perhaps this patch [1] can be an example of using the
same runtime infra for tests that are not runtime tests (do not run on the
target, I mean).
[1] http://patchwork.ozlabs.org/patch/992700/

One way to have a test case that runs in both local machine (without the docker
image) and in the docker image (either in the local machine or in the Gitlab CI)
is to have a rootfs image generated by Buildroot with a working server and use
that image as a downloaded artifact for the test case, and use a br2-external to
hold packages that use that server. See these commits [2][3] that I did not send
as patches yet, adding a image with a cvs server and using it to test the
download of packages with the cvs backend.

[2] https://gitlab.com/RicardoMartincoski/buildroot/commit/22e548dc4f49c225b658cb6e1119373bfae6b02b
[3] https://gitlab.com/RicardoMartincoski/buildroot/commit/064bd4ba344a107c5f56471800891af8fbb9ae2b


Regards,
Ricardo


More information about the buildroot mailing list