aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-06-18 15:00:20 +0200
committerCharles <sircharlesaze@gmail.com>2020-06-18 15:00:20 +0200
commit757749f4c514dd45d906a821eb41f8bba690c3e2 (patch)
tree88b380fbfc4f0d277984882241d383d2ceffc0e2 /test
parent99a4f8397a9652b15d171ecb86e7281b80ed57d7 (diff)
downloadlibasm_test-757749f4c514dd45d906a821eb41f8bba690c3e2.tar.gz
libasm_test-757749f4c514dd45d906a821eb41f8bba690c3e2.tar.bz2
libasm_test-757749f4c514dd45d906a821eb41f8bba690c3e2.zip
Disabling ft_write and ft_read segfault test until I have access to a Mac to fix the weird stuff with errno and fork
Diffstat (limited to 'test')
-rw-r--r--test/ft_read_test.c32
-rw-r--r--test/ft_write_test.c34
2 files changed, 33 insertions, 33 deletions
diff --git a/test/ft_read_test.c b/test/ft_read_test.c
index f061c5f..34fd7bc 100644
--- a/test/ft_read_test.c
+++ b/test/ft_read_test.c
@@ -6,7 +6,7 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/08 03:07:44 by cacharle #+# #+# */
-/* Updated: 2020/05/04 16:09:34 by charles ### ########.fr */
+/* Updated: 2020/06/18 14:58:54 by charles ### ########.fr */
/* */
/* ************************************************************************** */
@@ -58,21 +58,21 @@ static int read_origin_errno;
static
void ft_read_test_segfault(void)
{
- int tmp[2];
- char buf_read[2048];
-
- if (pipe(tmp) < 0)
- exit(EXIT_FAILURE);
- write(tmp[1], "asdfkasdfkl;jasd;ljkfa;lssdlfasdfasdfasdfasdfasdfasdfasdfasdfasdf", 40);
- TEST_ASM_FUNCTION(ft_read(-1, buf_read, 2));
- TEST_ASM_FUNCTION(ft_read(tmp[0], NULL, 2));
- TEST_ASM_FUNCTION(ft_read(tmp[0], buf_read, 0));
- TEST_ASM_FUNCTION(ft_read(tmp[0], buf_read, 5));
- TEST_ASM_FUNCTION(ft_read(tmp[0], buf_read, 32));
- close(tmp[0]);
- close(tmp[1]);
- TEST_ASM_FUNCTION(ft_read(-1, buf_read, 2));
- TEST_ASM_FUNCTION(ft_read(OPEN_MAX + 1, buf_read, 2));
+ /* int tmp[2]; */
+ /* char buf_read[2048]; */
+ /* */
+ /* if (pipe(tmp) < 0) */
+ /* exit(EXIT_FAILURE); */
+ /* write(tmp[1], "asdfkasdfkl;jasd;ljkfa;lssdlfasdfasdfasdfasdfasdfasdfasdfasdfasdf", 40); */
+ /* TEST_ASM_FUNCTION(ft_read(-1, buf_read, 2)); */
+ /* TEST_ASM_FUNCTION(ft_read(tmp[0], NULL, 2)); */
+ /* TEST_ASM_FUNCTION(ft_read(tmp[0], buf_read, 0)); */
+ /* TEST_ASM_FUNCTION(ft_read(tmp[0], buf_read, 5)); */
+ /* TEST_ASM_FUNCTION(ft_read(tmp[0], buf_read, 32)); */
+ /* close(tmp[0]); */
+ /* close(tmp[1]); */
+ /* TEST_ASM_FUNCTION(ft_read(-1, buf_read, 2)); */
+ /* TEST_ASM_FUNCTION(ft_read(OPEN_MAX + 1, buf_read, 2)); */
}
static
diff --git a/test/ft_write_test.c b/test/ft_write_test.c
index f961791..32e0712 100644
--- a/test/ft_write_test.c
+++ b/test/ft_write_test.c
@@ -6,7 +6,7 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/08 03:07:48 by cacharle #+# #+# */
-/* Updated: 2020/05/04 16:06:28 by charles ### ########.fr */
+/* Updated: 2020/06/18 14:58:45 by charles ### ########.fr */
/* */
/* ************************************************************************** */
@@ -59,22 +59,22 @@ static ssize_t ret;
static
void ft_write_test_segfault(void)
{
- int tmp[2];
- if (pipe(tmp) < 0)
- exit(EXIT_FAILURE);
- TEST_ASM_FUNCTION(ft_write(-1, "test", 5));
- TEST_ASM_FUNCTION(ft_write(tmp[1], NULL, 5));
- TEST_ASM_FUNCTION(ft_write(tmp[1], "test", 0));
- TEST_ASM_FUNCTION(ft_write(tmp[1], "test", 5));
- TEST_ASM_FUNCTION(ft_write(tmp[1], "t", 1));
- TEST_ASM_FUNCTION(ft_write(tmp[1], "", 0));
- TEST_ASM_FUNCTION(ft_write(tmp[1], "test", 4));
- TEST_ASM_FUNCTION(ft_write(tmp[1], "test", 2));
- TEST_ASM_FUNCTION(ft_write(tmp[1], NULL, 2));
- close(tmp[0]);
- close(tmp[1]);
- TEST_ASM_FUNCTION(ft_write(-1, "tt", 2));
- TEST_ASM_FUNCTION(ft_write(OPEN_MAX + 1, "tt", 2));
+ /* int tmp[2]; */
+ /* if (pipe(tmp) < 0) */
+ /* exit(EXIT_FAILURE); */
+ /* TEST_ASM_FUNCTION(ft_write(-1, "test", 5)); */
+ /* TEST_ASM_FUNCTION(ft_write(tmp[1], NULL, 5)); */
+ /* TEST_ASM_FUNCTION(ft_write(tmp[1], "test", 0)); */
+ /* TEST_ASM_FUNCTION(ft_write(tmp[1], "test", 5)); */
+ /* TEST_ASM_FUNCTION(ft_write(tmp[1], "t", 1)); */
+ /* TEST_ASM_FUNCTION(ft_write(tmp[1], "", 0)); */
+ /* TEST_ASM_FUNCTION(ft_write(tmp[1], "test", 4)); */
+ /* TEST_ASM_FUNCTION(ft_write(tmp[1], "test", 2)); */
+ /* TEST_ASM_FUNCTION(ft_write(tmp[1], NULL, 2)); */
+ /* close(tmp[0]); */
+ /* close(tmp[1]); */
+ /* TEST_ASM_FUNCTION(ft_write(-1, "tt", 2)); */
+ /* TEST_ASM_FUNCTION(ft_write(OPEN_MAX + 1, "tt", 2)); */
}
static