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

[libcxx][test] Fix a test for the range of file offsets on ARMv7 Linux targets. #123449

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

vvereschaka
Copy link
Contributor

XFAIL the offset_range test on the ARMv7 Linux targets (32-bit).

Ref PR #122798

…ets.

XFAIL offset_range test on the ARMv7 targets (32-bit).

Ref PR llvm#122798
@vvereschaka vvereschaka requested a review from mstorsjo January 18, 2025 05:30
@vvereschaka vvereschaka self-assigned this Jan 18, 2025
@vvereschaka vvereschaka requested a review from a team as a code owner January 18, 2025 05:30
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Jan 18, 2025
@llvmbot
Copy link
Member

llvmbot commented Jan 18, 2025

@llvm/pr-subscribers-libcxx

Author: Vladimir Vereschaka (vvereschaka)

Changes

XFAIL the offset_range test on the ARMv7 Linux targets (32-bit).

Ref PR #122798


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

1 Files Affected:

  • (modified) libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/offset_range.pass.cpp (+5)
diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/offset_range.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/offset_range.pass.cpp
index 5afd4465db31e0..9bb52c8ac8f481 100644
--- a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/offset_range.pass.cpp
+++ b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/offset_range.pass.cpp
@@ -28,6 +28,11 @@
 //
 // XFAIL: target=powerpc-{{.+}}-aix{{.*}}
 
+// By default, off_t is typically a 32-bit integer on ARMv7 Linux systems, 
+// meaning it can represent file sizes up to 2GB (2^31 bytes) only.
+//
+// XFAIL: target=armv7{{.*}}-{{.+}}-linux{{.*}}
+
 #include <fstream>
 #include <iostream>
 #include <cassert>

Copy link

github-actions bot commented Jan 18, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

// By default, off_t is typically a 32-bit integer on ARMv7 Linux systems,
// meaning it can represent file sizes up to 2GB (2^31 bytes) only.
//
// XFAIL: target=armv7{{.*}}-{{.+}}-linux{{.*}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reasoning looks and sounds reasonable… however it doesn’t seem to hold universally, because we do have some existing CI test configurations that also run on armv7 Linux, where this test does pass. It didn’t trigger this XFAIL though, because the triple has a slightly different form - target=armv7l-linux-gnueabihf, so there’s no vendor field. If you’d tweak the regex to not require a vendor field, I think it would match - and this XFAIL would trigger…

Apparently that setup has got 64 bit off_t by default?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants