Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase test timeout duration for RISC-V #103

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

moui0
Copy link

@moui0 moui0 commented Oct 20, 2023

Test fails on RISC-V because it is a very slow architecture: fix this by increasing the timeout on this specific test.

Error messages:

example.py:52: in main
    responses = gdbmi.write("-file-exec-and-symbols %s" % SAMPLE_C_BINARY)
pygdbmi/gdbcontroller.py:125: in write
    return self.io_manager.write(
pygdbmi/IoManager.py:284: in write
    return self.get_gdb_response(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pygdbmi.IoManager.IoManager object at 0x3feb1bbe10>, timeout_sec = 1
raise_error_on_timeout = True

    def get_gdb_response(
        self,
        timeout_sec: float = DEFAULT_GDB_TIMEOUT_SEC,
        raise_error_on_timeout: bool = True,
    ) -> List[Dict]:
        """Get response from GDB, and block while doing so. If GDB does not have any response ready to be read
        by timeout_sec, an exception is raised.
    
        Args:
            timeout_sec: Maximum time to wait for reponse. Must be >= 0. Will return after
            raise_error_on_timeout: Whether an exception should be raised if no response was found after timeout_sec
    
        Returns:
            List of parsed GDB responses, returned from gdbmiparser.parse_response, with the
            additional key 'stream' which is either 'stdout' or 'stderr'
    
        Raises:
            GdbTimeoutError: if response is not received within timeout_sec
            ValueError: if select returned unexpected file number
        """
    
        if timeout_sec < 0:
            logger.warning("timeout_sec was negative, replacing with 0")
            timeout_sec = 0
    
        if USING_WINDOWS:
            retval = self._get_responses_windows(timeout_sec)
        else:
            retval = self._get_responses_unix(timeout_sec)
    
        if not retval and raise_error_on_timeout:
>           raise GdbTimeoutError(
                "Did not get response from gdb after %s seconds" % timeout_sec
            )
E           pygdbmi.constants.GdbTimeoutError: Did not get response from gdb after 1 seconds

pygdbmi/IoManager.py:104: GdbTimeoutError

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant