bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

execute, spawn-pipe: Fix test failures when running under QEMU user-mode


From: Bruno Haible
Subject: execute, spawn-pipe: Fix test failures when running under QEMU user-mode
Date: Mon, 30 Aug 2021 02:16:15 +0200

In a QEMU user-mode environment (for various CPUs), the test-execute.sh
and test-spawn-pipe.sh tests fail. This happens with qemu 6.1.0, but did not
happen with qemu 4.1.0 and older versions.

The reason is that when qemu is used to execute a program, the file descriptor
3 is open, referencing /dev/urandom.

These two patches work around it.


2021-08-29  Bruno Haible  <bruno@clisp.org>

        spawn-pipe: Fix test failure when running under QEMU user-mode.
        * tests/test-spawn-pipe-child.c: Include <stdbool.h>, <string.h>,
        qemu.h.
        (main): Under QEMU user-mode, allow fd 2 or fd 3 to be open.
        * modules/spawn-pipe-tests (Files): Add qemu.h.
        (Depends-on): Add stdbool.

2021-08-29  Bruno Haible  <bruno@clisp.org>

        execute: Fix test failure when running under QEMU user-mode.
        * tests/test-execute-child.c: Include <stdbool.h>, qemu.h.
        (main): Under QEMU user-mode, allow fd 3 to be open.
        * modules/execute-tests (Files): Add qemu.h.
        (Depends-on): Add stdbool.

Attachment: 0001-execute-Fix-test-failure-when-running-under-QEMU-use.patch
Description: Text Data

Attachment: 0002-spawn-pipe-Fix-test-failure-when-running-under-QEMU-.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]