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 <ovidiu.panait@...>
---
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