<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/source/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in lib.sh</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>5b6dca02b3e2254d2fd5706d76d7ab4610a67296 - Merge tag &apos;objtool-core-2026-10-18&apos; of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
        <link>http://kernelsources.org:8080/source/history/linux/tools/objtool/tests/lib.sh#5b6dca02b3e2254d2fd5706d76d7ab4610a67296</link>
        <description>Merge tag &apos;objtool-core-2026-10-18&apos; of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tipPull objtool updates from Ingo Molnar: - Add unit test suite for objtool klp functionality and   known failure modes (by Song Liu and Puranjay Mohan,   with fixes by Joe Lawrence)* tag &apos;objtool-core-2026-10-18&apos; of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (58 commits)  objtool/klp: Add test for ThinLTO symbols sharing a demangled name  objtool/klp: Add test for Clang switch jump tables  objtool/klp: Add test for UBSAN metadata in an unchanged function  objtool/klp: Add test for absolute and __ADDRESSABLE symbols  objtool/klp: Add test for a patch which strips a data annotation  objtool/klp: Add test for the alignment of cloned data sections  objtool/klp: Add test for alternative replacement code in checksums  objtool/klp: Add test for instruction operand checksums  objtool/klp: Add test for a static call introduced by the patch  objtool/klp: Add test for tracepoint and pr_debug static branch keys  objtool/klp: Add test for a static branch introduced by the patch  objtool/klp: Add test for symbols with no checksum entry of their own  objtool/klp: Add test for data object checksums  objtool/klp: Test text annotations on alternative replacements  objtool/klp: Test a hand-built livepatch module&apos;s static call keys  objtool/klp: Test rejection of a file-local static branch key  objtool/klp: Add test for symbols whose linkage the patch changes  objtool/klp: Add test for kCFI prefix symbols and traps  objtool/klp: Add test for __bug_table, __ex_table and __mcount_loc extraction  objtool/klp: Add test for static locals which must not be correlated  ...

            List of files:
            /linux/tools/objtool/tests/lib.sh</description>
        <pubDate>Wed, 21 Oct 2026 00:55:04 +0200</pubDate>
        <dc:creator>Linus Torvalds &lt;torvalds@linux-foundation.org&gt;</dc:creator>
    </item>
<item>
        <title>9b11acaad1a63eddf4a9bf50dc9b90183bf037e1 - objtool: Keep failing test workdirs by default</title>
        <link>http://kernelsources.org:8080/source/history/linux/tools/objtool/tests/lib.sh#9b11acaad1a63eddf4a9bf50dc9b90183bf037e1</link>
        <description>objtool: Keep failing test workdirs by defaultThe klp test runner deletes each test&apos;s working directory when the testfinishes.  On failure that removes diff.log, out.o and the fixture objectsbefore the developer can look at them, and the only hint was to re-run(something) with --keep:  $ make -C tools/objtool tests  ...  not ok - test-special-section: expected section &apos;.kcfi_traps&apos; in output  ...  # pass:49 fail:1 static-skip:1 probe-skip:0 xfail:0 xpass:0  # re-run with --keep to hold on to what a failing test builtChange the default behavior to save failing test working directories. Thisis friendlier to the drive-by tester.  Provide the power-user with a KEEPMakefile variable that can optionally retain &apos;all&apos; or &apos;none&apos; of thosedirectories.  run-tests.sh --keep remains an alias for KEEP=all.Now that a run can be holding objects worth looking at, say where they arewhen it is cut short.  A Ctrl-C left the run directory behind -- the testsclean up after themselves as they exit, but the two levels the runner madeare its own to answer for, and nothing removed them.  Take them away froma trap if the tests left them empty, and print the path if they did not:under the new default the test that was running keeps what it had built,and that is the run most worth being told about.The trap only ever rmdirs, so it cannot overrule what a test decided tokeep; the same helper now serves the end of a normal run.Signed-off-by: Joe Lawrence &lt;joe.lawrence@redhat.com&gt;Signed-off-by: Song Liu &lt;song@kernel.org&gt;Signed-off-by: Josh Poimboeuf &lt;jpoimboe@kernel.org&gt;Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;Assisted-by: Claude:claude-opus-5Link: https://patch.msgid.link/20260916184351.2720310-11-song@kernel.org

            List of files:
            /linux/tools/objtool/tests/lib.sh</description>
        <pubDate>Wed, 16 Sep 2026 20:43:03 +0200</pubDate>
        <dc:creator>Joe Lawrence &lt;joe.lawrence@redhat.com&gt;</dc:creator>
    </item>
<item>
        <title>48dafeead17e96ee5a63816580a0b92732ea32f6 - objtool/klp: Run the klp tests under set -u</title>
        <link>http://kernelsources.org:8080/source/history/linux/tools/objtool/tests/lib.sh#48dafeead17e96ee5a63816580a0b92732ea32f6</link>
        <description>objtool/klp: Run the klp tests under set -uMost of these assertions end in a grep, and an empty pattern matchesanything.  So a mistyped variable name in a test does not fail: it expandsto nothing, the grep succeeds, and the test reports a pass having checkednothing.  assert_section &quot;$sectoin_nmae&quot; becomes a search for two adjacentspaces, which readelf&apos;s column padding satisfies on every line.Refuse unset variables.  lib.sh guards the few genuinely optionalexpansions it has with ${x:-}.Signed-off-by: Song Liu &lt;song@kernel.org&gt;Signed-off-by: Josh Poimboeuf &lt;jpoimboe@kernel.org&gt;Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;Assisted-by: Claude:claude-opus-5Link: https://patch.msgid.link/20260916184351.2720310-9-song@kernel.org

            List of files:
            /linux/tools/objtool/tests/lib.sh</description>
        <pubDate>Wed, 16 Sep 2026 20:43:01 +0200</pubDate>
        <dc:creator>Song Liu &lt;song@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>8593055b7a4015761b3a4bbc3a64371bc42d1d12 - objtool/klp: Give each run one working directory, one per test inside it</title>
        <link>http://kernelsources.org:8080/source/history/linux/tools/objtool/tests/lib.sh#8593055b7a4015761b3a4bbc3a64371bc42d1d12</link>
        <description>objtool/klp: Give each run one working directory, one per test inside itEach test made its own mktemp directory, so a run scattered them through/tmp among everything else using the same names, and there was no way toinspect what a failing test built -- the objects are gone the moment itexits, which is right every time but the one that matters.Give the run one directory and each test a subdirectory of it, named forthe test and nested the way the source is:  /tmp/klp-tests.3zC6oyfd/    generic/test-basic/{orig.o,patched.o,out.o,Module.symvers,...}    x86/test-kcfi/...--keep then reports one path instead of forty, and removing it is onecommand.  A test run by hand still falls back to a temp directory of itsown, and still says where that went.Detecting a leak comes free.  Cleanup is now &quot;remove each test&apos;s directory,then rmdir the run&apos;s&quot;, and the rmdir fails if anything is left -- so a testwhich dies without running its own cleanup is reported rather than quietlyleaving something behind.preflight names the directory the tests build under, since mktemp honoursTMPDIR and a run in a container is otherwise silent about where its workwent.  The runner says what to do only when it is relevant: on a failurewithout --keep, that the option exists; with it, how many directories arewaiting.  Usage text is not read while something is broken.Signed-off-by: Song Liu &lt;song@kernel.org&gt;Signed-off-by: Josh Poimboeuf &lt;jpoimboe@kernel.org&gt;Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;Assisted-by: Claude:claude-opus-5Link: https://patch.msgid.link/20260916184351.2720310-8-song@kernel.org

            List of files:
            /linux/tools/objtool/tests/lib.sh</description>
        <pubDate>Wed, 16 Sep 2026 20:43:00 +0200</pubDate>
        <dc:creator>Song Liu &lt;song@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>2ab0faeb71936be1f53a8222cd5d0a1bcada5b82 - objtool/klp: Grow the klp test harness vocabulary</title>
        <link>http://kernelsources.org:8080/source/history/linux/tools/objtool/tests/lib.sh#2ab0faeb71936be1f53a8222cd5d0a1bcada5b82</link>
        <description>objtool/klp: Grow the klp test harness vocabularyAssertions for what klp diff produces, and for what went into it.The output side covers the things a livepatch is made of: cloned sectionsand symbols, klp symbols and their sympos, tombstones, relocations bysection and by count, the converted .klp.rela sections and theirSHF_RELA_LIVEPATCH flag, SHN_LIVEPATCH symbols, recorded checksums, and klpdiff&apos;s own diagnostics -- a rejection for the wrong reason is not a pass.The input side matters just as much, and is easier to forget.  A test whichasserts only on the output passes when the compiler never emitted theconstruct under test, and reads as coverage it does not have.  So there aretwo forms, and the difference between them is a statement about why thething might be absent:  require_*  the compiler cannot produce it here     -&gt; skip  assert_*   the fixture is supposed to produce it   -&gt; failNames are quoted before they reach grep.  Nearly every name here containsdots -- .text.target, .klp.rela.vmlinux -- and an unescaped dot matches anycharacter, so an assertion for one section could be satisfied by adifferent one whose name merely lines up.Signed-off-by: Song Liu &lt;song@kernel.org&gt;Signed-off-by: Josh Poimboeuf &lt;jpoimboe@kernel.org&gt;Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;Assisted-by: Claude:claude-opus-5Link: https://patch.msgid.link/20260916184351.2720310-7-song@kernel.org

            List of files:
            /linux/tools/objtool/tests/lib.sh</description>
        <pubDate>Wed, 16 Sep 2026 20:42:59 +0200</pubDate>
        <dc:creator>Song Liu &lt;song@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>ae04b6d0f9bf308d1e80cd8d7fb0f917ae52c2ef - objtool/klp: Build klp test fixtures through the harness</title>
        <link>http://kernelsources.org:8080/source/history/linux/tools/objtool/tests/lib.sh#ae04b6d0f9bf308d1e80cd8d7fb0f917ae52c2ef</link>
        <description>objtool/klp: Build klp test fixtures through the harnessCompiling a fixture is the one thing every test does, and it has moreinvariants than it looks.  - The flags describe the kernel a fixture stands in for, and each is    written down with its reason.  That substitution is the whole mechanism    by which these tests cover configurations without building a kernel --    objtool reads no .config, so a configuration reaches it only as    compiler flags and the bytes they produce -- and a flag with no stated    motive is indistinguishable from a mistake.  - -c is not one of them.  Producing an object rather than a program is    the helper&apos;s contract, not something a test may reconsider, so it lives    at the compile and an override cannot drop it.  - A fixture which will not compile is a failure, not a skip.  It is far    more often a mistake in the fixture than a compiler which cannot    express the construct, and the two are indistinguishable once reported    as a skip.  - A newly produced object has no checksums in it, so producing one    invalidates the record that checksumming has already been done.  Left    to itself that invariant ends up in each test which rebuilds.build_one handles a single object for the tests which need more than two ordifferent names; build_pair and build_module_pair are expressed in terms ofit, so none of the above can be lost by going around them.run_checksum comes out of run_diff for the same reason: a test which wantschecksums without a diff should not have to run one.Signed-off-by: Song Liu &lt;song@kernel.org&gt;Signed-off-by: Josh Poimboeuf &lt;jpoimboe@kernel.org&gt;Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;Assisted-by: Claude:claude-opus-5Link: https://patch.msgid.link/20260916184351.2720310-6-song@kernel.org

            List of files:
            /linux/tools/objtool/tests/lib.sh</description>
        <pubDate>Wed, 16 Sep 2026 20:42:58 +0200</pubDate>
        <dc:creator>Song Liu &lt;song@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>317cec905af82e9ccca93cec661e88b1d3968a43 - objtool/klp: Classify klp test outcomes</title>
        <link>http://kernelsources.org:8080/source/history/linux/tools/objtool/tests/lib.sh#317cec905af82e9ccca93cec661e88b1d3968a43</link>
        <description>objtool/klp: Classify klp test outcomesA test could pass, fail, or skip, and the runner reported only the exitstatus of the last one to fail.  Skips are the interesting case: they arehow a suite quietly stops testing anything.Three kinds, and the runner counts them separately:  declared   the test said in advance it does not apply here, e.g. gcc_only             on a clang run.  Expected indefinitely.  probe      the construct did not turn up in the built object this time.             Weaker: one which becomes permanent is a fixture that stopped             testing anything.  undeclared counted as a failure.  A test which gives up for a reason it             never declared is a hole, not an outcome.xfail and xpass come with them, so a known failure is reported rather thancommented out and forgotten, and one which starts passing says so insteadof going quietly green.The result line is what gets classified, not the whole of a test&apos;s output:objtool warns on stderr and the runner captures it, and a stray line aheadof the result would otherwise leave the exit status to decide -- countingan expected failure, which exits 0, as a pass.Every test owes the plan exactly one result line, so a substituted verdictreplaces the test&apos;s own rather than being printed beside it, and a testwhich dies before reporting gets a result of its own instead of beinginferred from its exit status.Also: a TAP version line, LC_ALL=C so the order tests run in and thebehaviour of grep&apos;s character ranges inside them do not depend on theinvoking shell&apos;s locale, and fail() on stdout with every other verdict.Co-developed-by: Puranjay Mohan &lt;puranjay@kernel.org&gt;Signed-off-by: Puranjay Mohan &lt;puranjay@kernel.org&gt;Signed-off-by: Song Liu &lt;song@kernel.org&gt;Signed-off-by: Josh Poimboeuf &lt;jpoimboe@kernel.org&gt;Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;Assisted-by: Claude:claude-opus-5Link: https://patch.msgid.link/20260916184351.2720310-5-song@kernel.org

            List of files:
            /linux/tools/objtool/tests/lib.sh</description>
        <pubDate>Wed, 16 Sep 2026 20:42:57 +0200</pubDate>
        <dc:creator>Song Liu &lt;song@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>d76312b8a1f69be71ec38d04d69fbcdd0520ff89 - objtool/klp: Group the klp tests by architecture</title>
        <link>http://kernelsources.org:8080/source/history/linux/tools/objtool/tests/lib.sh#d76312b8a1f69be71ec38d04d69fbcdd0520ff89</link>
        <description>objtool/klp: Group the klp tests by architectureWhich architecture a test is for is expressed by where it lives: tests arein generic/ or in a directory named for their architecture, each carryingits own fixtures, and the runner executes generic/ plus the one thatmatches.  A test which cannot apply here is then not run at all, ratherthan running in order to announce that it did not.Layout does this better than a declaration would.  There is no x86_only(),and no lookup letting a fixtures/&lt;arch&gt;/ file shadow a generic one of thesame name -- an arch-specific test simply carries its own fixtures.Compilers cannot work the same way: CI varies CC over the same tree, so acompiler requirement stays a declaration in the test.What a run leaves out is reported once:  # not run: 5 tests in x86/ (this run is arm64)Silence would have been cheaper and wrong.  A run covering less than thetree holds must not look like a run that covered all of it.Signed-off-by: Song Liu &lt;song@kernel.org&gt;Signed-off-by: Josh Poimboeuf &lt;jpoimboe@kernel.org&gt;Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;Assisted-by: Claude:claude-opus-5Link: https://patch.msgid.link/20260916184351.2720310-4-song@kernel.org

            List of files:
            /linux/tools/objtool/tests/lib.sh</description>
        <pubDate>Wed, 16 Sep 2026 20:42:56 +0200</pubDate>
        <dc:creator>Song Liu &lt;song@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>c009fabc865200029173eb40db62f407225043d4 - objtool/klp: Check the klp test environment once, before any test</title>
        <link>http://kernelsources.org:8080/source/history/linux/tools/objtool/tests/lib.sh#c009fabc865200029173eb40db62f407225043d4</link>
        <description>objtool/klp: Check the klp test environment once, before any testEvery test checked for itself that objtool exists, was built with klpsupport, and that $CC runs.  Three problems with that: it is the same workdone 40 times, a missing objtool reads as a per-test skip rather than as asuite which cannot run, and a run in which everything skipped still exits0.Do it once, before any test, in klp_preflight() in lib.sh, and export theanswers where the tests can read them.  If the suite cannot run the wholerun fails and says why; a test which gets as far as running can assume itsenvironment.Nothing is written down, so nothing can go stale.  Sourcing lib.sh runs thechecks, which means a test run by hand establishes its own answers ratherthan inheriting those of some earlier run with a different CC, and a testis never handed an empty value for where objtool is or which architectureit is on: either the exports are set or the run has already failed.preflight answers only whether the suite can run at all -- not what thecompiler is capable of.  A test needing a particular compiler featureprobes for it and skips; that costs one compile and keeps the reason nextto the test that has to justify it.Signed-off-by: Song Liu &lt;song@kernel.org&gt;Signed-off-by: Josh Poimboeuf &lt;jpoimboe@kernel.org&gt;Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;Assisted-by: Claude:claude-opus-5Link: https://patch.msgid.link/20260916184351.2720310-3-song@kernel.org

            List of files:
            /linux/tools/objtool/tests/lib.sh</description>
        <pubDate>Wed, 16 Sep 2026 20:42:55 +0200</pubDate>
        <dc:creator>Song Liu &lt;song@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>cff27d90769da941f6897a9d9152670af7b71f95 - objtool: Add test harness for the klp subcommands</title>
        <link>http://kernelsources.org:8080/source/history/linux/tools/objtool/tests/lib.sh#cff27d90769da941f6897a9d9152670af7b71f95</link>
        <description>objtool: Add test harness for the klp subcommands&quot;objtool klp checksum&quot; and &quot;objtool klp diff&quot; work on object files alone,with no kernel, vmlinux or configuration involved, so they can be testeddirectly. That is worth doing: most klp generation bugs so far have been insymbol correlation, special section extraction and relocation conversion,and several of them failed silently, producing a livepatch which builtcleanly but was missing data.A test compiles a fixture twice, as the original and (with -DPATCHED) thepatched object, runs both through klp checksum, diffs them and asserts onthe result.  Fixtures are compiled at test time rather than committed asbinaries: codegen varies between compilers and architectures, and thatvariation is where a good number of these bugs come from.Assertions check properties rather than compare against recorded output.Golden files would need re-recording for every compiler change and wouldreport churn instead of regressions.klp diff resolves symbols against Module.symvers, so the harness writesone. Whether a symbol is listed there decides between an ordinaryrelocation and a klp relocation, which makes it the main knob tests use.Run with:  make -C tools/objtool testsTests skip when objtool was built without klp support or when a fixturedoes not build for the target architecture.  A missing objtool binary failsinstead of skipping, since that means a broken invocation rather than anenvironment which cannot run the test.Signed-off-by: Puranjay Mohan &lt;puranjay@kernel.org&gt;Co-developed-by: Joe Lawrence &lt;joe.lawrence@redhat.com&gt;Signed-off-by: Joe Lawrence &lt;joe.lawrence@redhat.com&gt;Signed-off-by: Song Liu &lt;song@kernel.org&gt;Signed-off-by: Josh Poimboeuf &lt;jpoimboe@kernel.org&gt;Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;Assisted-by: Claude:claude-opus-5Link: https://patch.msgid.link/20260916184351.2720310-2-song@kernel.org

            List of files:
            /linux/tools/objtool/tests/lib.sh</description>
        <pubDate>Wed, 16 Sep 2026 20:42:54 +0200</pubDate>
        <dc:creator>Puranjay Mohan &lt;puranjay@kernel.org&gt;</dc:creator>
    </item>
</channel>
</rss>
