Skip to content

release/19.x: [BinaryFormat] Disable MachOTest.UnalignedLC on SPARC (#100086) #102103

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
Aug 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion llvm/unittests/BinaryFormat/MachOTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,23 @@
//
//===----------------------------------------------------------------------===//

#include "llvm/ADT/bit.h"
#include "llvm/BinaryFormat/MachO.h"
#include "llvm/TargetParser/Triple.h"
#include "gtest/gtest.h"

using namespace llvm;
using namespace llvm::MachO;

TEST(MachOTest, UnalignedLC) {
#if BYTE_ORDER == BIG_ENDIAN
// As discussed in Issue #86793, this test cannot work on a strict-alignment
// targets like SPARC. Besides, it's undefined behaviour on big-endian hosts.
#define MAYBE_UnalignedLC DISABLED_UnalignedLC
#else
#define MAYBE_UnalignedLC UnalignedLC
#endif

TEST(MachOTest, MAYBE_UnalignedLC) {
unsigned char Valid32BitMachO[] = {
0xCE, 0xFA, 0xED, 0xFE, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00,
Expand Down
Loading