-
Notifications
You must be signed in to change notification settings - Fork 22
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
Add Test Cases for patching #258
Conversation
@b100dian, IMO this is not at all critical WRT time, so take all the time you need to review this comfortably. But I requested your review (rather meant as "suggested to review this to you"), because I feel a review from me will be far less stringent due to far less know-how (and I already looked over this PR without seeing anything I could criticise). If you are absolutely out-of-time in the foreseeable future, please say so and I will do my best and mark this as reviewed, so nephros can proceed to merge this. |
Thanks for adding much missed test cases! What I tried: I started the app from the CI build and it failed with
Then the app from debug deploy from Sailfish IDE -> starts, displays "Case 1 unpatched Case2 unpatched" (as expected by reading |
I can not reproduce that here, with the package installed (not using an IDE). Having the On my device that looks like this:
Why did I invent So the test infrastructure consists of:
What do the patches do? I'll cop out of this one and refer to "read the source Luke" here. Not all of them have a visible effect on the app, my main goal was to test the patching process itself, not so much changing the test app (I trust my patches work correctly after they apply correctly and in practice never even open the test app). |
Dear @b100dian, this seems to be a bit deadlocked between you both. I am afraid that @nephros will have to regularly update this branch from the master branch (as it happened by commit 67f8b64), until this is merged. I considered a "best effort review" from me, which will only scratch the surface because this contains too much non-trivial C++ and QML code for me to review properly. But as @nephros is successfully using the test cases to generate meaningful results and I am happy that he does, I trust that this is working. At least I could let this stalled PR progress this way. OTOH I value your knowledge and practical programming experience very much @b100dian, so I would rather like to see this properly reviewed (i.e., by you, not me). But if you do lack the time in the foreseeable future, just state so and we deviate from the standard procedures: I perform a "best effort review", this is merged and your review is postponed; although I see the risk of this becoming postponed to "never-never day" as a consequence. All in all this is not altering existing code and not adding code, which is deployed to users, AFAICS: Hence I do not believe anything really bad can happen ("famous last words™"). |
P.S.: »I'll cop out of this one and refer to "read the source Luke" here.« made me chuckle. "But I also want nicely written, in-depth documentation for the test cases in our wiki"! While that is true, I rather have test cases without much documentation than no test-cases at all. Even though I am afraid of the day on which I will face the "read the source Luke" part in practice. More on the serious side: As @nephros addressed the " |
Exactly, sorry for not making that clear in my reply. So the answer to "when are patches applied" is "when you apply them" i.e. using the PM GUI as usual, or I have summed up some of the comments here in c22a1eb and added some instructions how to use and expand the patching test cases. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you both - not intending to deadlock this at all:)
The simple explanation for how to test the patches eluded me, I was looking for some nonexistent automated process and I'm actually glad it is as simple as the added Readme points out 😌
For the error I've seen - I don't have problems with building the test package myself.
The problem with the import is just with the output_rpms attached to the checks of this PR and possibly what will come out in say, chum/OBS build. I haven't had that problem when building myself.
OK thanks all. I will squash/rebase a couple of these, and then merge this. |
copy of the first test patch. 32-to-64 uses the following style of diff file: --- a/usr/lib/foo +++ b/usr/lib/foo 32-to-64-alt uses the following style of diff file: --- /usr/lib/foo +++ /usr/lib/foo both are equally valid inputs for `patch -p1 -d /`
See #232
This should probably not be squashed on merge so the individual cases keep their histories.