Skip to content
Closed
Changes from 2 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
4 changes: 4 additions & 0 deletions libc/test/src/__support/File/file_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ StringFile *new_string_file(char *buffer, size_t buflen, int bufmode,
LIBC_NAMESPACE::File::mode_flags(mode));
}

// TODO: Investigate the precommit bots' failures of this test and re-enable it.
Copy link
Contributor

Choose a reason for hiding this comment

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

Use

#if 0
...
#endif

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Member

Choose a reason for hiding this comment

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

Google Test supports disabling tests by prefixing their name with DISABLED_. This is better than commenting out the code or using #if 0, as disabled tests are still compiled (and thus won't rot). We should consider implementing the same feature in libc's test framework.

Copy link
Contributor

Choose a reason for hiding this comment

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

We'd probably want that to be target dependent as well, there's a handful of places where I need to disable a test only on NVPTX for example.

// https://github.com/llvm/llvm-project/issues/128185.
#if 0
TEST(LlvmLibcFileTest, WriteOnly) {
const char data[] = "hello, file";
constexpr size_t FILE_BUFFER_SIZE = sizeof(data) * 3 / 2;
Expand Down Expand Up @@ -150,6 +153,7 @@ TEST(LlvmLibcFileTest, WriteOnly) {

ASSERT_EQ(f->close(), 0);
}
#endif

TEST(LlvmLibcFileTest, WriteLineBuffered) {
const char data[] = "hello\n file";
Expand Down
Loading