Description of problem: Today the only way to test kernel version detection is by submitting a file to retrace-server. It would be good to factor this piece of code out so we can more easily test and modify it. Version-Release number of selected component (if applicable): retrace-server-1.16-1.el6.noarch Additional info:
If I understood you correctly, you are talking about this function https://github.com/abrt/retrace-server/blob/master/src/retrace/retrace.py#L481. Am I right? How do yo imagine this detection would work? Could you give us some ideas?
(In reply to Matej Marušák from comment #1) > If I understood you correctly, you are talking about this function > https://github.com/abrt/retrace-server/blob/master/src/retrace/retrace. > py#L481. Am I right? Yes that is the main function. > How do yo imagine this detection would work? Could you give us some ideas? It could be the case that we could re-do one of the commandline tools to add this functionality, or possibly add a new one that does not necessarily have to be user visible in a non-test environment. It may be ok if there was some way to just run this over a number of vmcore files without a command tool (for example, if we ran python manually, etc). Goal is mainly to be able to test it with a number of vmcores. Offhand I don't recall a need to modify the detection code so I'm marking this as a "low" priority for now. Once the testing infrastructure is there (bug 129078) it may be nice to try to attempt this but I'm not sure how invasive it will be.
I don't think this is too important anymore. For now when reworking get_kernel_version I just pulled this code out into a separate python test program and ran it against a ton of vmcores. I compared the existing 'kernelver' file with the new code and then I could see any differences. There is another bit of code for the arch if we ever rework that but hopefully a similar thing can be done.
Created attachment 1391686 [details] python test program to rework get_kernel_version