[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: getusershell: Don't completely ignore lines that contain a comment
From: |
Bruno Haible |
Subject: |
Re: getusershell: Don't completely ignore lines that contain a comment |
Date: |
Tue, 27 Aug 2024 23:34:13 +0200 |
Collin Funk wrote:
> But it is hard to improve the test because it reads /etc/shell.
>
> I can't modify that to check for unexpected/edge cases. :(
I bet that most implementations read this file via open() or fopen(), right?
Then how about adding to the test an open() and an fopen() function that,
instead of opening /etc/shells, opens a data file in gnulib's tests/
(or gltests/) directory?
You know that a function in the main executable overrides the function
in the libc, at least on ELF platforms. We thus might have to skip
the test on macOS, maybe...
Bruno