Bug 16485 - AB-INT PTEST: patch ptest failure in bad-filenames
Summary: AB-INT PTEST: patch ptest failure in bad-filenames
Status: NEW
Alias: None
Product: Package Testing (ptest)
Classification: QA/Testing
Component: ptest (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Undecided normal
Target Milestone: ---
Assignee: Unassigned
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2026-11-03 12:58 UTC by João Marcos Costa
Modified: 2026-11-03 12:59 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description João Marcos Costa 2026-11-03 12:58:59 UTC
https://autobuilder.yoctoproject.org/valkyrie/#/builders/61/builds/4834/steps/15/logs/stdio

Failed ptests:
{'patch': ['bad-filenames']}

qemuarm64-ptest ubuntu2404-vk-arm2

"""
* emit_patch ../z | patch -f -p1 --dry-run || echo status: $? -- ok
* emit_patch /absolute/path | patch -f -p0 --dry-run || echo status: $? -- ok
* emit_patch $filename | (cd / && patch -f -p0 --dry-run) || echo status: $? -- ok
* emit_patch a/../z | patch -f -p0 --dry-run || echo status: $? -- ok
* emit_patch a/../z | patch -f -p1 --dry-run || echo status: $? -- ok
* emit_patch ../z | patch -f -p0 --dry-run || echo status: $? -- ok
* patch -f -p0 --dry-run < d.diff || echo status: $? -- ok
* patch -f -p0 --dry-run < d.diff || echo status: $? -- ok
* patch -f -p1 --dry-run < d.diff || echo status: $? -- ok
* 
    emit_patch '"a\nb"' | patch   >patch.out 2>&1
    status=$?
    sed "$fixup" patch.out
    echo status: $status
   -- ok
* 
    emit_patch 'foo' | patch 'a
b'  >patch.out 2>&1
    status=$?
    sed "$fixup" patch.out
    echo status: $status
   -- ok
* 
    emit_patch 'foo' | patch '-o' 'a
b' >patch.out 2>&1
    status=$?
    sed "$fixup" patch.out
    echo status: $status
   -- ok
* emit_patch_with_NUL | patch; echo status: $? -- ok
* patch -f -p0 < d.diff || echo status: $? -- ok
* emit_patch f | patch -r- "" || echo status: $? -- FAILED
--- expected
+++ got
@@ -1,3 +1,3 @@
-File '' is not a regular file -- refusing to patch
-1 out of 1 hunk ignored
-status: 1
+patching file ''
+/usr/bin/patch: **** Can't rename file .owKeGuD to '' : No such file or directory
+status: 2
15 tests (14 passed, 1 failed)
FAIL: bad-filenames
"""

Full logs at: https://valkyrie.yocto.io/pub/non-release/20261103-45/testresults/qemuarm64-ptest/patch.log

FYI, patch was upgraded from 2.8 to 2.8.1 not long ago: https://git.openembedded.org/openembedded-core/commit/meta/recipes-devtools/patch?id=3f628b4f428ae171e58c3204feb5fc630f7b1b79