[Toybox] [PATCH] pidof.test: block on sleep rather than read.

enh enh at google.com
Thu Jan 23 16:24:27 PST 2020


okay, i can reproduce this locally now: just run the test via adb
(without -t to allocate a pty). my own script conspired against me
here by adding -t to adb if `tty -s`, so locally i was always running
with a pty where you _can_ do a blocking read on stdout. but with just
regular adb you're talking to a socket and see these failures.

i've attached a new version of the patch with a less vague and more
convinced checkin comment (but the same fix)...


On Wed, Jan 22, 2020 at 9:02 PM enh <enh at google.com> wrote:
>
> The commit that added the read mentioned the killall tests, but they use
> sleep. Blocking on a read of stdout is failing in some of the Android
> test infrastructure where it seems to end up connected to a socket.
>
>   ./pidof-12488.test[2]: can't open /proc/self/fd/1: No such device or address
>
> (Unfortunately I haven't been able to reproduce this locally, or even on
> a cloud instance. It seems to only happen in the test infrastructure,
> but it's 100% reproduceable there.)
> ---
>  tests/pidof.test | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-pidof.test-block-on-sleep-rather-than-read.patch
Type: text/x-patch
Size: 1259 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20200123/c7ccbe88/attachment-0003.bin>


More information about the Toybox mailing list