On Wed, Oct 22, 2025 at 5:51 AM Stefano Brivio
On Wed, 15 Oct 2025 16:04:02 +0800 Yumei Huang
wrote: Test memory/passt failed with error "objsize: No such file or directory" because of an escaping issue. Fix it.
Sorry for the delay.
I tested the patch and it works for me, it simply adds a \ at the beginning of the line, and that print simply shows results in the test log. The output is not used in any automated way.
But I never ran into the issue, so I was looking for an explanation for this:
Link: https://bugs.passt.top/show_bug.cgi?id=155 Signed-off-by: Yumei Huang
--- test/memory/passt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/memory/passt b/test/memory/passt index 7e45724..c5142ea 100644 --- a/test/memory/passt +++ b/test/memory/passt @@ -51,7 +51,7 @@ guest sed /proc/slabinfo -ne 's/^\([^ ]* *[^ ]* *[^ ]* *[^ ]*\).*/\\\1/p' > /tmp guest kill \$(cat /tmp/pid) guest diff -y --suppress-common-lines /tmp/meminfo.before /tmp/meminfo.after || : guest nm -td -Sr --size-sort -P /bin/passt.avx2 | head -30 | tee /tmp/nm.size -guest sed /proc/slabinfo -ne 's/\(.*<objsize>\).*$/\1/p' | tail -1; (diff -y --suppress-common-lines /tmp/slabinfo.before /tmp/slabinfo.after | sort -grk8) +guest sed /proc/slabinfo -ne 's/\(.*<objsize>\).*$/\\\1/p' | tail -1; (diff -y --suppress-common-lines /tmp/slabinfo.before /tmp/slabinfo.after | sort -grk8)
Without the \ at the beginning, we have this line:
# name
<objsize> and... maybe you have a file in the directory where you run the tests that's called num_objs, or objsize, created as a result of a previous failure (and some other issue), and '
Perhaps a \# at the beginning, instead of #, makes Bash ignore the whole line, and for some reason it's not ignored otherwise?
It shouldn't have anything to do with the guest image because that's read-only.
Could you have a look if you see any "strange" file name in your test directory?
I don't see any strange file either num_objs or objsize in my test directory. The cmd is supposed to run inside the guest, and the error appears in pane_guest.log. I guess it's not related to the files on the host?
Otherwise I would be tempted to just go ahead and apply this because it's harmless and it's not *that* important that we find a solution to this. We're going to rewrite this test eventually.
-- Stefano
-- Thanks, Yumei Huang