Skip to content

[libc] Enable bind test for riscv #100132

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

Merged
merged 1 commit into from
Jul 24, 2024
Merged

Conversation

mikhailramalho
Copy link
Member

The bind test was failing in the rv32 build bot because of how the build bot was setup to run the tests: we were using shared directories between the host and qemu and the bind functions was trying to create a file in this directory, thus creating it in the host machine.

The OS was returning "-1 ENXIO (No such device or address)", so we changed the rv32 buildbot to copy the binaries to qemu and dropped the shared directories feature.

A clean run (where all tests need to be copied to qemu) is taking 7 min, up from 3 min. Incremental runs still run in 3 min.

The bind test was failing in the rv32 build bot because of how the build
bot was setup to run the tests: we were using shared directories between
the host and qemu and the bind functions was trying to create a file in
this directory, thus creating it in the host machine.

The OS was returning "-1 ENXIO (No such device or address)", so we
changed the rv32 buildbot to copy the binaries to qemu and dropped the
shared directories feature.

A clean run (where all tests need to be copied to qemu) is taking 7 min,
up from 3 min. Incremental runs still run in 3 min.
@llvmbot
Copy link
Member

llvmbot commented Jul 23, 2024

@llvm/pr-subscribers-libc

Author: Mikhail R. Gadelha (mikhailramalho)

Changes

The bind test was failing in the rv32 build bot because of how the build bot was setup to run the tests: we were using shared directories between the host and qemu and the bind functions was trying to create a file in this directory, thus creating it in the host machine.

The OS was returning "-1 ENXIO (No such device or address)", so we changed the rv32 buildbot to copy the binaries to qemu and dropped the shared directories feature.

A clean run (where all tests need to be copied to qemu) is taking 7 min, up from 3 min. Incremental runs still run in 3 min.


Full diff: https://github.com/llvm/llvm-project/pull/100132.diff

1 Files Affected:

  • (modified) libc/config/linux/riscv/entrypoints.txt (+1)
diff --git a/libc/config/linux/riscv/entrypoints.txt b/libc/config/linux/riscv/entrypoints.txt
index 6ab90771802fd..597aeb361afe4 100644
--- a/libc/config/linux/riscv/entrypoints.txt
+++ b/libc/config/linux/riscv/entrypoints.txt
@@ -856,6 +856,7 @@ if(LLVM_LIBC_FULL_BUILD)
     libc.src.sys.select.select
 
     # sys/socket.h entrypoints
+    libc.src.sys.socket.bind
     libc.src.sys.socket.socket
   )
 endif()

@mikhailramalho mikhailramalho merged commit 6c23f97 into llvm:main Jul 24, 2024
8 checks passed
@mikhailramalho mikhailramalho deleted the enable-bind branch July 24, 2024 14:26
yuxuanchen1997 pushed a commit that referenced this pull request Jul 25, 2024
Summary:
The bind test was failing in the rv32 build bot because of how the build bot was set to run the tests: we were using shared directories between the host and qemu and the bind function was trying to create a file in this directory, thus creating it in the host machine.

The OS was returning "-1 ENXIO (No such device or address)", so we changed the rv32 buildbot to copy the binaries to qemu and dropped the shared directories feature.

Test Plan: 

Reviewers: 

Subscribers: 

Tasks: 

Tags: 


Differential Revision: https://phabricator.intern.facebook.com/D60250586
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants