[PATCH 0/2] Fixes for nstool
This fixes a couple of bugs I found in nstool. I discovered these during the Avocado work, but they are bugs independent of that. David Gibson (2): test/nstool: Provide useful error if given a path that's too long test/nstool: Fix fd leak in accept() loop test/nstool.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) -- 2.40.1
Normal filesystem paths can be very long (PATH_MAX is around 8k), however
Unix domain sockets can only use relatively short paths (UNIX_PATH_MAX is
108 on Linux). Currently nstool will simply truncate paths that are too
long, leading to difficult to understand failures.
Make such failures clearer, with an explicit error message if given a path
that's too long.
Signed-off-by: David Gibson
nstool loops on accept(), but failed to close the accepted socket fds
before continuing on. So, with repeated commands it would eventually die
with an EMFILE.
Signed-off-by: David Gibson
On Tue, 23 May 2023 12:25:41 +1000
David Gibson
This fixes a couple of bugs I found in nstool. I discovered these during the Avocado work, but they are bugs independent of that.
David Gibson (2): test/nstool: Provide useful error if given a path that's too long test/nstool: Fix fd leak in accept() loop
Applied. -- Stefano
participants (2)
-
David Gibson
-
Stefano Brivio