Skip to content

test: use pwd and ls from GNU coreutils in apport-valgrind tests#579

Open
bdrung wants to merge 1 commit intocanonical:mainfrom
bdrung:fix-tests
Open

test: use pwd and ls from GNU coreutils in apport-valgrind tests#579
bdrung wants to merge 1 commit intocanonical:mainfrom
bdrung:fix-tests

Conversation

@bdrung
Copy link
Copy Markdown
Member

@bdrung bdrung commented Apr 21, 2026

apport-valgrind fails on ls and pwd from uutils. The valgrind error output contains:

==868049== Invalid read of size 1
==868049==    at 0x532A166: strlen (vg_replace_strmem.c:506)
==868049==    by 0x41C323C: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E2C6: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E215: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x4318F5C: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E203: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x550E600: (below main) (libc_start_call_main.h:59)
==868049==  Address 0x7fff1a1eafcd is not stack'd, malloc'd or (recently) free'd
==868049==
==868049== Invalid read of size 1
==868049==    at 0x532A174: strlen (vg_replace_strmem.c:506)
==868049==    by 0x41C323C: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E2C6: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E215: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x4318F5C: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E203: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x550E600: (below main) (libc_start_call_main.h:59)
==868049==  Address 0x7fff1a1eafce is not stack'd, malloc'd or (recently) free'd
==868049==
==868049== Invalid read of size 1
==868049==    at 0x41C329D: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E2C6: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E215: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x4318F5C: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E203: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x550E600: (below main) (libc_start_call_main.h:59)
==868049==  Address 0x7fff1a1eaff6 is not stack'd, malloc'd or (recently) free'd
==868049==
==868049== Invalid read of size 1
==868049==    at 0x532E12D: bcmp (vg_replace_strmem.c:1234)
==868049==    by 0x410814F: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x41C3325: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E2C6: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E215: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x4318F5C: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E203: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x550E600: (below main) (libc_start_call_main.h:59)
==868049==  Address 0x7fff1a1eafcd is not stack'd, malloc'd or (recently) free'd
==868049==
==868049== Invalid read of size 1
==868049==    at 0x532EBB0: memmove (vg_replace_strmem.c:1415)
==868049==    by 0x432558F: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x4335255: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x4311950: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x425C268: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x41C335D: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E2C6: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E215: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x4318F5C: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E203: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x550E600: (below main) (libc_start_call_main.h:59)
==868049==  Address 0x7fff1a1eafcd is not stack'd, malloc'd or (recently) free'd
==868049==
==868049== Invalid read of size 1
==868049==    at 0x532EBBD: memmove (vg_replace_strmem.c:1415)
==868049==    by 0x432558F: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x4335255: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x4311950: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x425C268: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x41C335D: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E2C6: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E215: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x4318F5C: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E203: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x550E600: (below main) (libc_start_call_main.h:59)
==868049==  Address 0x7fff1a1eafcf is not stack'd, malloc'd or (recently) free'd
==868049==
==868049== Invalid read of size 1
==868049==    at 0x532EBB0: memmove (vg_replace_strmem.c:1415)
==868049==    by 0x41BB20E: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x41C33DD: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E2C6: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E215: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x4318F5C: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E203: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x550E600: (below main) (libc_start_call_main.h:59)
==868049==  Address 0x7fff1a1eafcd is not stack'd, malloc'd or (recently) free'd
==868049==
==868049== Invalid read of size 1
==868049==    at 0x532EBBD: memmove (vg_replace_strmem.c:1415)
==868049==    by 0x41BB20E: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x41C33DD: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E2C6: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E215: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x4318F5C: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E203: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x550E600: (below main) (libc_start_call_main.h:59)
==868049==  Address 0x7fff1a1eafcf is not stack'd, malloc'd or (recently) free'd
==868049==
coreutils: unknown program 'memcheck-amd64-linux'

Use the GNU coreutils implementation for ls and pwd to test with C code instead of Rust code.

apport-valgrind fails on `ls` and `pwd` from uutils. The valgrind error
output contains:

```
==868049== Invalid read of size 1
==868049==    at 0x532A166: strlen (vg_replace_strmem.c:506)
==868049==    by 0x41C323C: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E2C6: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E215: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x4318F5C: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E203: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x550E600: (below main) (libc_start_call_main.h:59)
==868049==  Address 0x7fff1a1eafcd is not stack'd, malloc'd or (recently) free'd
==868049==
==868049== Invalid read of size 1
==868049==    at 0x532A174: strlen (vg_replace_strmem.c:506)
==868049==    by 0x41C323C: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E2C6: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E215: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x4318F5C: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E203: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x550E600: (below main) (libc_start_call_main.h:59)
==868049==  Address 0x7fff1a1eafce is not stack'd, malloc'd or (recently) free'd
==868049==
==868049== Invalid read of size 1
==868049==    at 0x41C329D: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E2C6: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E215: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x4318F5C: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E203: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x550E600: (below main) (libc_start_call_main.h:59)
==868049==  Address 0x7fff1a1eaff6 is not stack'd, malloc'd or (recently) free'd
==868049==
==868049== Invalid read of size 1
==868049==    at 0x532E12D: bcmp (vg_replace_strmem.c:1234)
==868049==    by 0x410814F: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x41C3325: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E2C6: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E215: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x4318F5C: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E203: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x550E600: (below main) (libc_start_call_main.h:59)
==868049==  Address 0x7fff1a1eafcd is not stack'd, malloc'd or (recently) free'd
==868049==
==868049== Invalid read of size 1
==868049==    at 0x532EBB0: memmove (vg_replace_strmem.c:1415)
==868049==    by 0x432558F: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x4335255: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x4311950: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x425C268: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x41C335D: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E2C6: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E215: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x4318F5C: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E203: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x550E600: (below main) (libc_start_call_main.h:59)
==868049==  Address 0x7fff1a1eafcd is not stack'd, malloc'd or (recently) free'd
==868049==
==868049== Invalid read of size 1
==868049==    at 0x532EBBD: memmove (vg_replace_strmem.c:1415)
==868049==    by 0x432558F: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x4335255: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x4311950: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x425C268: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x41C335D: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E2C6: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E215: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x4318F5C: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E203: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x550E600: (below main) (libc_start_call_main.h:59)
==868049==  Address 0x7fff1a1eafcf is not stack'd, malloc'd or (recently) free'd
==868049==
==868049== Invalid read of size 1
==868049==    at 0x532EBB0: memmove (vg_replace_strmem.c:1415)
==868049==    by 0x41BB20E: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x41C33DD: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E2C6: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E215: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x4318F5C: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E203: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x550E600: (below main) (libc_start_call_main.h:59)
==868049==  Address 0x7fff1a1eafcd is not stack'd, malloc'd or (recently) free'd
==868049==
==868049== Invalid read of size 1
==868049==    at 0x532EBBD: memmove (vg_replace_strmem.c:1415)
==868049==    by 0x41BB20E: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x41C33DD: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E2C6: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E215: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x4318F5C: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x417E203: ??? (in /usr/lib/cargo/bin/coreutils/ls)
==868049==    by 0x550E600: (below main) (libc_start_call_main.h:59)
==868049==  Address 0x7fff1a1eafcf is not stack'd, malloc'd or (recently) free'd
==868049==
coreutils: unknown program 'memcheck-amd64-linux'
```

Use the GNU coreutils implementation for `ls` and `pwd` to test with C
code instead of Rust code.
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.45%. Comparing base (be024b6) to head (5a52436).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #579   +/-   ##
=======================================
  Coverage   84.45%   84.45%           
=======================================
  Files         104      104           
  Lines       20939    20939           
  Branches     3212     3212           
=======================================
  Hits        17683    17683           
  Misses       2816     2816           
  Partials      440      440           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant