paulgazz/kmax

Enhancement: klocalizer should provide clearer error when patch has no C file changes

Opened this issue · 0 comments

Description

  • If a Linux kernel patch lacks C file changes, klocalizer will state that there was no satisfying configuration.
  • Instead, klocalizer should state that the commit lacks any constraints to apply.

Steps to reproduce

  1. Clone the Linux kernel with git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git and enter the directory.
  2. Get a patch from the Linux kernel using git show {commit} > patch.diff. I initially encountered this issue with the commit 81983758430957d9a5cb3333fe324fd70cf63e7e.
  3. Check out the source code at the commit and create a kernel configuration file with a command like make defconfig.
  4. Run klocalizer with klocalizer --repair .config -a x86_64 --include-mutex patch.diff.

What I expected to happen

  1. I expected klocalizer to tell me that there were no constraints to add to the configuration file.

What actually happened

  1. klocalizer states that there was "no satisfying configuration found":
(venv) alexei@turing:~/LinuxKernels/kmax_examination/linux_kmax_investigation_2$ klocalizer --repair .config -a x86_64 --include-mutex patch.diff
klocalizer, kmax 4.8
INFO: Diff file was given as input ("patch.diff"): assuming it was applied to the Linux source.
WARNING: No cached formulas for 56717c74d093 available for download :(
INFO: Trying the following architectures: x86_64
ERROR: No satisfying configuration found.