The "run-test" bash ptest expects read permissions for /dev/stdin:
test -r /dev/fd/0
test -r /dev/stdin

The test currently fails because:
- bash-ptest is run as a regular user
- the underlying device for /dev/stdin is a pty, which is owned by root

Make the pty file readable by all users to fix this ptest.

Signed-off-by: Ovidiu Panait <[email protected]>
---
 utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utils.c b/utils.c
index 87ac20e..643693a 100644
--- a/utils.c
+++ b/utils.c
@@ -406,7 +406,7 @@ setup_slave_pty(FILE *fp, char *pty_name) {
        }
 
        /* Makes the slave read/writeable for the user. */
-       if (chmod(pty_name, S_IRUSR|S_IWUSR) != 0) {
+       if (chmod(pty_name, S_IRUSR|S_IWUSR|S_IROTH) != 0) {
                fprintf(fp, "ERROR: chmod() failed with: %s.\n", 
strerror(errno));
        }
 
-- 
2.39.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#59484): https://lists.yoctoproject.org/g/yocto/message/59484
Mute This Topic: https://lists.yoctoproject.org/mt/97762754/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to