support/download: fix scp and reintroduce source-check
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest0 of 11 patches 0 repliesNew
Patches in v1 No applies recorded yet
None of the 11 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [Buildroot] [PATCH 00/11] support/download: fix scp and reintroduce source-check
Hello,
Sorry the long delay.
Quoted 10 lines · Thomas Petazzoni
+Ricardo in Cc.
Quoted 6 lines · Thomas De Schampheleire
Quoted 3 lines
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.
Quoted 4 lines
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