Skip to content

Commit 8252739

Browse files
committed
remove testdata directory
1 parent 94d3491 commit 8252739

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

libc/test/src/sys/ioctl/linux/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
add_custom_target(libc_sys_ioctl_unittests)
22

3-
add_subdirectory(testdata)
4-
53
add_libc_unittest(
64
ioctl_test
75
SUITE

libc/test/src/sys/ioctl/linux/ioctl_test.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
#include "test/UnitTest/ErrnoSetterMatcher.h"
1717
#include "test/UnitTest/Test.h"
1818

19+
#include "hdr/sys_stat_macros.h"
20+
1921
#include "hdr/sys_ioctl_macros.h"
2022

2123
using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::Succeeds;
@@ -24,12 +26,12 @@ TEST(LlvmLibcSysIoctlTest, InvalidCommandAndFIONREAD) {
2426
LIBC_NAMESPACE::libc_errno = 0;
2527

2628
// Setup the test file
27-
constexpr const char *TEST_FILE_NAME = "testdata/ioctl.test";
29+
constexpr const char *TEST_FILE_NAME = "ioctl.test";
2830
constexpr const char TEST_MSG[] = "ioctl test";
2931
constexpr int TEST_MSG_SIZE = sizeof(TEST_MSG) - 1;
3032
auto TEST_FILE = libc_make_test_file_path(TEST_FILE_NAME);
3133
int new_test_file_fd =
32-
LIBC_NAMESPACE::open(TEST_FILE, O_CREAT | O_WRONLY, 0644);
34+
LIBC_NAMESPACE::open(TEST_FILE, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
3335
ASSERT_THAT(
3436
(int)LIBC_NAMESPACE::write(new_test_file_fd, TEST_MSG, TEST_MSG_SIZE),
3537
Succeeds(TEST_MSG_SIZE));

libc/test/src/sys/ioctl/linux/testdata/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)