Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 2d80c92d authored by Steve Muckle's avatar Steve Muckle Committed by Shuah Khan
Browse files

selftests/exec: include cwd in long path calculation



When creating a pathname close to PATH_MAX to test execveat, factor in
the current working directory path otherwise we end up with an absolute
path that is longer than PATH_MAX. While execveat() may succeed, subsequent
calls to the kernel from the runtime environment which are required to
successfully execute the test binary/script may fail because of this.

To keep the semantics of the test the same, rework the relative pathname
part of the test to be relative to the root directory so it isn't
decreased by the length of the current working directory path.

Signed-off-by: default avatarSteve Muckle <smuckle.linux@gmail.com>
Signed-off-by: default avatarShuah Khan <shuahkh@osg.samsung.com>
parent d54e9a8f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment