paulgazz / kmax

A collection of analysis tools for Kconfig and Kbuild constraints.
42 stars 21 forks source link

Path resolution bug in klocalizer can lead to AssertionError #273

Closed lolrepeatlol closed 3 weeks ago

lolrepeatlol commented 2 months ago

Description

Steps to reproduce

Steps followed

To get a repaired configuration file for a commit range, I followed the steps here:

  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. Create a diff from a range of patches using git diff {commit1}..{commit2} > patchset.diff. I initially encountered this issue with the range 541b80216cd1d511841c3c8d9559a7b13f4f79f2 to 0df2ac59bebfac221463ef57ed3554899b41d75f.
  3. Check out the source code at the latest of the two commits and create a kernel configuration file with a command like make allnoconfig.
  4. Run klocalizer with klocalizer --repair .config -a x86_64 --include-mutex patchset.diff.

    What I expected to happen

  5. I expected klocalizer to repair the kernel configuration file.

    What actually happened

  6. klocalizer runs into an AssertionError:
    WARNING: No cached formulas for e98bee58dd93 available for download :(
    Traceback (most recent call last):
    File "/home/alexei/.local/bin/klocalizer", line 1726, in <module>
    klocalizerCLI()
    File "/home/alexei/.local/bin/klocalizer", line 810, in klocalizerCLI
    assert os.path.isfile(srcfile_fullpath)
    AssertionError
    alexei@turing:~/LinuxKernels/hybridtest/linuxhybrid$

Additional details

lolrepeatlol commented 3 weeks ago

Addressed by the professor in #279.