[Toybox] ltp test failure with toybox mv

Rob Landley rob at landley.net
Fri Jul 9 11:10:03 PDT 2021


On 7/8/21 3:40 PM, enh wrote:
>     Did I fix it? Did I break it? My laptop hasn't got cgroups (or 2) mounted
>     because the whole point of devuan is NOT having systemd, and I still haven't got
>     mkroot to the point I can do tests in a toy environment under qemu.
> 
> if you're thinking "this test isn't new, and toybox mv had worked like this for
> a long time, why the breakage now?" it seems like the test wasn't being run
> until someone built a kernel with CONFIG_CGROUP_NET_PRIO=y which then caused
> this test to run where it wasn't being run before. 

I wasn't. I'm familiar with "new use case showed up" from the aboriginal linux
days. Usually a new package (often a build time or runtime dependency, including
in the toolchain)...

> i'm told the reason for this weird behavior is that basically "/proc/cgroups is
> the API", so rmdir(2) is how you remove a group, but you can't remove the
> virtual files within a group, so there's this hack in the kernel.

Yeah, I very vaguely remember this from before Linus threw Kay Seivers out of
the kernel. It's still an explicit posix violation, and there's a "rmdir"
command line tool that calls the rmdir() system call without bothering the contents.

This test is being bothered that "mv" is implemented in a posix conforming way.
It seems to me like a bad test. That said, we're passing the bad test now.

> anyway, i've synced AOSP (thanks for the fix!) and handed the bug back to the
> folks who just wanted to configure their kernel :-)

Here's hoping it works, as I said I don't have this test environment set up.
(Too many open windows on my laptop to mount cgroups2 because given the
existence of "2" is because the systemd developers didn't like the generic api
of the original and wanted to hardwire policy into the kernel instead, I 100%
expect mounting it to have side effects requiring a reboot to undo and I have
too many open windows to want to do that right now. And I haven't quite got
mkroot to the point I can run all my tests there yet because I got distracted
away from toysh development by job hunting...)

Rob



More information about the Toybox mailing list