xicodomingues / francinette Goto Github PK
View Code? Open in Web Editor NEWAn easy to use testing framework for the 42 projects
License: MIT License
An easy to use testing framework for the 42 projects
License: MIT License
I tested my ft_printf with the iMacs at 42, 100% with both francinette and francinette --strict but on my M2 Macbook, many KOs and some Abort and Segfault.
Is this normal ? I haven't tested my GNL at school but it says KO on a lot of tests on my macbook for now. I will try my code tomorrow at school. (I hope to get better results there :D)
Thank you !
When I do a usual paco inside the printf project folder, It runes the printfTester but not the fsores.
.
When I tried to install I got this:
cp: ./francinette and francinette are identical (not copied).
bash: line 37: cd: /francinette: No such file or directory
When running executing the install command, got the following error (extract from the log). Francinette -u and -h works, haven't tested it on a real project yet.
OS: WSL2, Ubuntu 20.04.6 LTS, x64
Building wheels for collected packages: halo
Building wheel for halo (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/bcheronn/francinette/venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-hn4fwlle/halo/setup.py'"'"'; __file__='"'"'/tmp/pip-install-hn4fwlle/halo/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-0dm0qs4z
cwd: /tmp/pip-install-hn4fwlle/halo/
Complete output (6 lines):
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: invalid command 'bdist_wheel'
----------------------------------------
ERROR: Failed building wheel for halo
Running setup.py clean for halo
Failed to build halo```
The first calloc test in libft-unit-test tester timeouts on my laptop but not in school.
I looked at the test, and I think that the problem is in the test rather than in my code. In all other calloc tester functions the pointer to the tested function is casted to typeof(calloc)*
like this but in test_ft_calloc_free
it is casted to void *(*)(size_t)
like this. Later it is called with one param. But that's UB because ft_calloc
has 2 params.
I suggest replacing
void * (*ft_calloc)(size_t) = ptr;
...
free(ft_calloc(42));
with
typeof(calloc) *ft_calloc = ptr;
...
free(ft_calloc(42, 1));
or whatever value of the second parameter makes sense.
hi, i try to run
francinette --strict
to test my ft_printf on Linux but give me this output:
pf_utils.c:108:38: error: use of undeclared identifier 'RTLD_NEXT'
t_write libc_write = (t_write)dlsym(RTLD_NEXT, "write");
to fix this need to add in pf_utils.c file this:
#define _GNU_SOURCE
#include <stdio.h>
The tester does not free up the 30 bytes of memory allocated in the function map_list in the fsoares test, i think that is causing a leak while in strict mode.
void *map_length(void *s)
{
char *str = malloc(30);
if (str != NULL)
sprintf(str, "__%lX", strlen((char *)s));
return str;
}
this function allocates 30 bytes but does not free it i think.
The norminette checks every file when it is supposed to check only files in the current directory, files needed in the project or files passed in the arguments.
With paco strlcat
for instance, it will check any file instead of just testing strlcat
t_list *old; // 1 > 2 > 3
t_list *new; // a > b > c
ft_lstadd_front(old, new); // a > 1 > 2 > 3 (b, c memory leak)
ft_lstadd_front(old, new); // a > b > c > 1 > 2 > 3 (no memory leak)
apt
is being used but only works on debian based systems and its derivatives.
I use arch (btw) and it is using pacman as its package manager
So running francinette just like usual, I pass all the tests.
When running with --strict, I get KO_NULL_CHECK's, which I can fix by freeing my previous return result on the next call to get_next_line, but by doing so I then with non-strict francinette get Aborts because it is now double freeing.
So my questions are:
This is with get_next_line version:11
Notes:
My issues stems from the following code from the tests:
file_utils.c:116
The result is NOT free'd
file_utils.c:73
The result is free'd (file_utils.c:88)
Perhaps I understand the tests wrong and it's not supposed to be freed there?
all testers even yours give correct even when you don't do anything if the allocation fail for the new node and in strict to
I did my best to get everything working, but I'm still not able to make the fsoares run.
This issue is on Ubuntu, 42 Lisbon moved to Ubuntu on all machines.
Any help is appreciated. Thx
Compiling tests: fsoares (my own)
In file included from list_utils.c:2:
list_utils.h:6:20: error: unknown type name ‘t_list’; did you mean ‘va_list’?
6 | int same_list_elem(t_list *expected, t_list *result);
| ^~~~~~
| va_list
list_utils.h:6:38: error: unknown type name ‘t_list’; did you mean ‘va_list’?
6 | int same_list_elem(t_list *expected, t_list *result);
| ^~~~~~
| va_list
list_utils.h:8:1: error: unknown type name ‘t_list’; did you mean ‘va_list’?
8 | t_list *lstnew(void *content);
| ^~~~~~
| va_list
list_utils.h:9:19: error: unknown type name ‘t_list’; did you mean ‘va_list’?
9 | void lstadd_front(t_list **list, t_list *new);
| ^~~~~~
| va_list
list_utils.h:9:34: error: unknown type name ‘t_list’; did you mean ‘va_list’?
9 | void lstadd_front(t_list **list, t_list *new);
| ^~~~~~
| va_list
list_utils.h:10:1: error: unknown type name ‘t_list’; did you mean ‘va_list’?
10 | t_list **create_list(int n_elems, ...);
| ^~~~~~
| va_list
list_utils.h:11:15: error: unknown type name ‘t_list’; did you mean ‘va_list’?
11 | int same_list(t_list **expected, t_list **result);
| ^~~~~~
| va_list
list_utils.h:11:34: error: unknown type name ‘t_list’; did you mean ‘va_list’?
11 | int same_list(t_list **expected, t_list **result);
| ^~~~~~
| va_list
list_utils.h:13:19: error: unknown type name ‘t_list’; did you mean ‘va_list’?
13 | char *node_to_str(t_list *node);
| ^~~~~~
| va_list
list_utils.h:14:19: error: unknown type name ‘t_list’; did you mean ‘va_list’?
14 | char *list_to_str(t_list **head_ptr);
| ^~~~~~
| va_list
list_utils.h:15:22: error: unknown type name ‘t_list’; did you mean ‘va_list’?
15 | char *list_to_str_fn(t_list **head_ptr, char *(*str_node)(t_list *node));
| ^~~~~~
| va_list
list_utils.h:15:59: error: unknown type name ‘t_list’; did you mean ‘va_list’?
15 | char *list_to_str_fn(t_list **head_ptr, char *(*str_node)(t_list *node));
| ^~~~~~
| va_list
list_utils.h:16:1: error: unknown type name ‘t_list’; did you mean ‘va_list’?
16 | t_list *lstlast(t_list *lst);
| ^~~~~~
| va_list
list_utils.h:16:17: error: unknown type name ‘t_list’; did you mean ‘va_list’?
16 | t_list *lstlast(t_list *lst);
| ^~~~~~
| va_list
list_utils.h:17:18: error: unknown type name ‘t_list’; did you mean ‘va_list’?
17 | void lstadd_back(t_list **list, t_list *new);
| ^~~~~~
| va_list
list_utils.h:17:33: error: unknown type name ‘t_list’; did you mean ‘va_list’?
17 | void lstadd_back(t_list **list, t_list *new);
| ^~~~~~
| va_list
list_utils.h:18:15: error: unknown type name ‘t_list’; did you mean ‘va_list’?
18 | void lstclear(t_list **lst, void (*del)(void *));
| ^~~~~~
| va_list
list_utils.c:4:20: error: unknown type name ‘t_list’; did you mean ‘va_list’?
4 | int same_list_elem(t_list *expected, t_list *result)
| ^~~~~~
| va_list
list_utils.c:4:38: error: unknown type name ‘t_list’; did you mean ‘va_list’?
4 | int same_list_elem(t_list *expected, t_list *result)
| ^~~~~~
| va_list
list_utils.c:28:1: error: unknown type name ‘t_list’; did you mean ‘va_list’?
28 | t_list *lstnew(void *content)
| ^~~~~~
| va_list
list_utils.c: In function ‘lstnew’:
list_utils.c:30:2: error: unknown type name ‘t_list’; did you mean ‘va_list’?
30 | t_list *new;
| ^~~~~~
| va_list
list_utils.c:32:22: error: ‘t_list’ undeclared (first use in this function); did you mean ‘va_list’?
32 | new = malloc(sizeof(t_list));
| ^~~~~~
| va_list
list_utils.c:32:22: note: each undeclared identifier is reported only once for each function it appears in
list_utils.c:35:5: error: request for member ‘next’ in something not a structure or union
35 | new->next = NULL;
| ^~
list_utils.c:36:5: error: request for member ‘content’ in something not a structure or union
36 | new->content = content;
| ^~
list_utils.c: At top level:
list_utils.c:40:19: error: unknown type name ‘t_list’; did you mean ‘va_list’?
40 | void lstadd_front(t_list **list, t_list *new)
| ^~~~~~
| va_list
list_utils.c:40:34: error: unknown type name ‘t_list’; did you mean ‘va_list’?
40 | void lstadd_front(t_list **list, t_list *new)
| ^~~~~~
| va_list
list_utils.c:46:1: error: unknown type name ‘t_list’; did you mean ‘va_list’?
46 | t_list *lstlast(t_list *lst)
| ^~~~~~
| va_list
list_utils.c:46:17: error: unknown type name ‘t_list’; did you mean ‘va_list’?
46 | t_list *lstlast(t_list *lst)
| ^~~~~~
| va_list
list_utils.c:59:18: error: unknown type name ‘t_list’; did you mean ‘va_list’?
59 | void lstadd_back(t_list **list, t_list *new)
| ^~~~~~
| va_list
list_utils.c:59:33: error: unknown type name ‘t_list’; did you mean ‘va_list’?
59 | void lstadd_back(t_list **list, t_list *new)
| ^~~~~~
| va_list
list_utils.c:70:19: error: unknown type name ‘t_list’; did you mean ‘va_list’?
70 | char *node_to_str(t_list *node)
| ^~~~~~
| va_list
list_utils.c:80:19: error: unknown type name ‘t_list’; did you mean ‘va_list’?
80 | char *list_to_str(t_list **head_ptr)
| ^~~~~~
| va_list
list_utils.c:85:22: error: unknown type name ‘t_list’; did you mean ‘va_list’?
85 | char *list_to_str_fn(t_list **head_ptr, char *(*str_node)(t_list *node))
| ^~~~~~
| va_list
list_utils.c:85:59: error: unknown type name ‘t_list’; did you mean ‘va_list’?
85 | char *list_to_str_fn(t_list **head_ptr, char *(*str_node)(t_list *node))
| ^~~~~~
| va_list
list_utils.c:105:1: error: unknown type name ‘t_list’; did you mean ‘va_list’?
105 | t_list **create_list(int n_elems, ...)
| ^~~~~~
| va_list
list_utils.c: In function ‘create_list’:
list_utils.c:107:2: error: unknown type name ‘t_list’; did you mean ‘va_list’?
107 | t_list **header_ptr = malloc(sizeof(t_list *));
| ^~~~~~
| va_list
list_utils.c:107:38: error: ‘t_list’ undeclared (first use in this function); did you mean ‘va_list’?
107 | t_list **header_ptr = malloc(sizeof(t_list *));
| ^~~~~~
| va_list
list_utils.c:107:46: error: expected expression before ‘)’ token
107 | t_list **header_ptr = malloc(sizeof(t_list *));
| ^
list_utils.c:113:3: error: implicit declaration of function ‘lstadd_back’ [-Werror=implicit-function-declaration]
113 | lstadd_back(header_ptr, lstnew(va_arg(argp, char *)));
| ^~~~~~~~~~~
list_utils.c: At top level:
list_utils.c:119:15: error: unknown type name ‘t_list’; did you mean ‘va_list’?
119 | int same_list(t_list **expected, t_list **result)
| ^~~~~~
| va_list
list_utils.c:119:34: error: unknown type name ‘t_list’; did you mean ‘va_list’?
119 | int same_list(t_list **expected, t_list **result)
| ^~~~~~
| va_list
list_utils.c:141:15: error: unknown type name ‘t_list’; did you mean ‘va_list’?
141 | void lstclear(t_list **lst, void (*del)(void *))
| ^~~~~~
| va_list
cc1: all warnings being treated as errors
Problem compiling the tests
The new update that changed the error test took place after i got evaluated by Moulinette, Moulinette passed my work with full score, but when i tested my code again using the updated tester it showed me KO
on the new tests (which are not used by Moulinette), that's why i guess that this test should be moved to the --strict flag, thank you.
Moulinette
throws back my project twice, both times it is Makefile
related problem:I was using -I.
flag in the implicit rule of compilation(%.o: %.c
), and i did put by mistake <libft.h>
instead of "libft.h"
in one of the files, but the Makefile
just worked seamlessly without throwing any errors.(the three flags were used: -Wall -Wextra -Werror
). The Moulinette
doesn't seem to use the -I.
flag in the first compilation test, and that threw an error, so I had to remove the -I.
flag to fix the problem.
The tests don't test the libft.a
library for compilation, my Makefile
was creating the library libft.a
with only one object file(ft_isalpha.o
), and that was due to my misunderstanding(i was using $<
instead of $^
), when the Moulinette
tried to test with my libft.a
it threw and error because the next function to test(ft_isdigit
) was not included in the library.
I hope that i explained the problem well, and i hope that the problems that cost me 6 evaluation points (and lot of time) get fixed, so further students won't fall for the same problem.
Hi, I have a fully functional libft tested with the francinette on my Mac and on those at school, but on my Linux machine (Linux Mint 21, Python 3.10) I have this error while running libftTester : cannot unpack non-iterable NoneType object
, and it is the only test which fails.
Instead of manually adding colors, and manual formatting, and manual spinners with Halo, use rich
Can use this command to get a list of undefined symbols, basically allowing to check for forbidden functions
nm -un pipex | grep -v __ | cut -c2-
on your version of the test the program test_lsmap.c does not compile with clang 11 on debian 12 beta with this warning
✖ Compiling tests: fsoares (my own)
test_lstmap.c: In function ‘map_length’:
test_lstmap.c:8:33: error: ‘%lX’ directive writing between 1 and 16 bytes into a region of size 8 [-Werror=format-overflow=]
8 | sprintf(str, "%lX", strlen((char *)s));
| ^~~
test_lstmap.c:8:30: note: directive argument in the range [0, 9223372036854775805]
8 | sprintf(str, "%lX", strlen((char *)s));
| ^~~~~~~
test_lstmap.c:8:17: note: ‘sprintf’ output between 4 and 19 bytes into a destination of size 10
8 | sprintf(str, "__%lX", strlen((char *)s));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
For some odd reason, ar is printing ar: creating archive libftprintf.a
to stderr instead of stdout, causing the test to "fail" to compile.
This is easily worked around, but it would be nice is the tests could compile without having to forcibly silence ar. I am unsure how to proceed re: attempting to fix this on my own, however.
Regards,
Tim
Hey, i have the following error when trying to test my minitalk, i am not sure how to solve this:
✖ Preparing tests: fsoares (my own tests) Undefined symbols for architecture x86_64: "___asan_handle_no_return", referenced from: _show_signal_msg in server.o _handle_termination in server.o "___asan_init", referenced from: _asan.module_ctor in server.o _asan.module_ctor in libftprintf.a(libftprintf.o) _asan.module_ctor in libftprintf.a(printhex.o) _asan.module_ctor in libftprintf.a(printint.o) _asan.module_ctor in libftprintf.a(printpointer.o) _asan.module_ctor in libftprintf.a(printunsignedint.o) "___asan_memcpy", referenced from: __add_malloc in server.o __mark_as_free in server.o _get_malloc_size in server.o _print_mallocs in server.o _check_leaks in server.o _get_all_allocs in server.o _show_malloc_stack in server.o ... "___asan_memset", referenced from: _malloc in server.o "___asan_option_detect_stack_use_after_return", referenced from: _show_signal_msg in server.o _setup_framework in server.o _set_signature in server.o _error in server.o __add_malloc in server.o __mark_as_free in server.o _get_malloc_size in server.o ... "___asan_register_image_globals", referenced from: _asan.module_ctor in server.o _asan.module_ctor in libftprintf.a(libftprintf.o) _asan.module_ctor in libftprintf.a(printhex.o) _asan.module_ctor in libftprintf.a(printint.o) _asan.module_ctor in libftprintf.a(printpointer.o) _asan.module_ctor in libftprintf.a(printunsignedint.o) "___asan_report_load1", referenced from: __mark_as_free in server.o _get_malloc_size in server.o _print_mallocs in server.o _check_leaks in server.o _get_all_allocs in server.o _show_malloc_stack in server.o _ft_strlen in libftprintf.a(libftprintf.o) ... "___asan_report_load4", referenced from: _set_signature in server.o _check_leaks in server.o _get_all_allocs in server.o _add_trace_to_signature in server.o _show_malloc_stack in server.o _ft_putchar in libftprintf.a(libftprintf.o) _printstring in libftprintf.a(libftprintf.o) ... "___asan_report_load8", referenced from: _show_signal_msg in server.o _save_traces in server.o _setup_framework in server.o _error in server.o _malloc in server.o __mark_as_free in server.o _reset_malloc_mock in server.o ... "___asan_report_store1", referenced from: __add_malloc in server.o __mark_as_free in server.o _get_all_allocs in server.o _ft_putchar in libftprintf.a(libftprintf.o) _writedigitsupc in libftprintf.a(printhex.o) _writedigitslowc in libftprintf.a(printhex.o) _printint in libftprintf.a(printint.o) ... "___asan_report_store4", referenced from: _set_signature in server.o __add_malloc in server.o _get_all_allocs in server.o _printstring in libftprintf.a(libftprintf.o) _format in libftprintf.a(libftprintf.o) _ft_printf in libftprintf.a(libftprintf.o) "___asan_report_store8", referenced from: _setup_framework in server.o __add_malloc in server.o _get_all_allocs in server.o _show_malloc_stack in server.o "___asan_set_shadow_00", referenced from: _setup_framework in server.o "___asan_set_shadow_f5", referenced from: __add_malloc in server.o "___asan_set_shadow_f8", referenced from: _setup_framework in server.o "___asan_stack_free_5", referenced from: _setup_framework in server.o "___asan_stack_malloc_0", referenced from: _ft_putchar in libftprintf.a(libftprintf.o) _writedigitsupc in libftprintf.a(printhex.o) _writedigitslowc in libftprintf.a(printhex.o) _printint in libftprintf.a(printint.o) _writedigits in libftprintf.a(printint.o) _writedigits in libftprintf.a(printpointer.o) _writedigits in libftprintf.a(printunsignedint.o) ... "___asan_stack_malloc_1", referenced from: _set_signature in server.o _error in server.o __mark_as_free in server.o _get_malloc_size in server.o _print_mallocs in server.o _check_leaks in server.o _get_all_allocs in server.o ... "___asan_stack_malloc_2", referenced from: _show_signal_msg in server.o _show_malloc_stack in server.o "___asan_stack_malloc_3", referenced from: __add_malloc in server.o "___asan_stack_malloc_5", referenced from: _setup_framework in server.o "___asan_unregister_image_globals", referenced from: _asan.module_dtor in server.o _asan.module_dtor in libftprintf.a(libftprintf.o) _asan.module_dtor in libftprintf.a(printhex.o) _asan.module_dtor in libftprintf.a(printint.o) _asan.module_dtor in libftprintf.a(printpointer.o) _asan.module_dtor in libftprintf.a(printunsignedint.o) "___asan_version_mismatch_check_apple_clang_1200", referenced from: _asan.module_ctor in server.o _asan.module_ctor in libftprintf.a(libftprintf.o) _asan.module_ctor in libftprintf.a(printhex.o) _asan.module_ctor in libftprintf.a(printint.o) _asan.module_ctor in libftprintf.a(printpointer.o) _asan.module_ctor in libftprintf.a(printunsignedint.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[1]: *** [server] Error 1 make: *** [all] Error 2 Problem preprating the testes, please contact me at fsoares- in slack or open an issue on github
Change it instead of having only one global timeout that is predefined for all projects, make the timeout dependent on the project
For example:
libft - 3
get_net_line - 15
(And think about which are the good ones for every project)
When running "francinette -b -s" from ft_printf directory i get "The command was not found or was not executable: ./printf.out.".
I fixed it by changing line 79 of file "Fsoares.py" from this
errors = self.check_errors(self.run_tests("./printf.out"))
to this
errors = self.check_errors(self.run_tests("./printf_b.out" if self.exec_bonus else "./printf.out"))
It keeps running get_next_line tests. The NAME in my Makefile is "pipex". I have tried changing it to libft.a, it successfully runs libft tests. Any target it does not find, it goes to get_next_line, so I guess it is not recognizing pipex as a project it should test.
Create a change log that tracks modification for each version.
When francinette updates it should display the changes made since the last version present localy
when encountering issues on gnl (malloc / free issues), tests on my osx machine (10.13.6 (17G66)) will crash/freeze.
no problem from 42 school (catalina).
is there anything I can do (except writing my code right TT)
message from terminal >
Running tests: fsoares (my own tests)
BUFFER_SIZE: 1
Invalid fd : 1.OK 2.OK 3.OK 4_LEAKS.OK
empty.txt : 1.OK 2.OK 3_LEAKS.KO
==3723==AddressSanitizer CHECK failed: /BuildRoot/Library/Caches/com.apple.xbs/Sources/clang_compiler_rt/clang-900.0.39.2/src/projects/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:259 "((h->type == CommonInterceptorMetadata::CIMT_FILE)) != (0)" (0x0, 0x0)
#0 0x10d3eef5f in __asan::AsanCheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x60f5f)
#1 0x10d4061f7 in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x781f7)
#2 0x10d3dc158 in wrap_fclose (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x4e158)
#3 0x109dd80f0 in add_to_error_file utils.c:316
#4 0x109dcf19c in main tester.c:111
#5 0x7fff6eac3014 in start (libdyld.dylib:x86_64+0x1014)
/bin/sh: line 1: 3723 Killed: 9 ./test1.out < lines_around_10.txt
make: [mandatory] Error 137 (ignored)
BUFFER_SIZE: 10
Invalid fd : 1.OK 2.OK 3.OK 4_LEAKS.OK
empty.txt : 1.OK 2.OK 3_LEAKS.KO
==3739==AddressSanitizer CHECK failed: /BuildRoot/Library/Caches/com.apple.xbs/Sources/clang_compiler_rt/clang-900.0.39.2/src/projects/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:259 "((h->type == CommonInterceptorMetadata::CIMT_FILE)) != (0)" (0x0, 0x0)
#0 0x106628f5f in __asan::AsanCheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x60f5f)
#1 0x1066401f7 in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x781f7)
#2 0x106616158 in wrap_fclose (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x4e158)
#3 0x103015f50 in add_to_error_file utils.c:316
#4 0x10300bc80 in main tester.c:111
#5 0x7fff6eac3014 in start (libdyld.dylib:x86_64+0x1014)
/bin/sh: line 1: 3739 Killed: 9 ./test2.out < lines_around_10.txt
make: [mandatory] Error 137 (ignored)
BUFFER_SIZE: 1000000
Invalid fd : 1.OK 2.OK 3.OK 4_LEAKS.OK
empty.txt : 1.OK 2.OK 3_LEAKS.KO
==3757==AddressSanitizer CHECK failed: /BuildRoot/Library/Caches/com.apple.xbs/Sources/clang_compiler_rt/clang-900.0.39.2/src/projects/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:259 "((h->type == CommonInterceptorMetadata::CIMT_FILE)) != (0)" (0x0, 0x0)
#0 0x10517df5f in __asan::AsanCheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x60f5f)
#1 0x1051951f7 in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x781f7)
#2 0x10516b158 in wrap_fclose (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x4e158)
#3 0x101b6afb0 in add_to_error_file utils.c:316
#4 0x101b6125c in main tester.c:111
#5 0x7fff6eac3014 in start (libdyld.dylib:x86_64+0x1014)
/bin/sh: line 1: 3757 Killed: 9 ./test3.out < lines_around_10.txt
make: [mandatory] Error 137 (ignored)
execution.log >
2022-12-02 02:48:24,153 [base][INFO]: copying /Rud/projets/42/42_memory_git/42memory/gnl to /Users/r/francinette/temp/get_next_line/__my_srcs
2022-12-02 02:48:24,165 [base][INFO]: To execute: []
2022-12-02 02:48:24,165 [base][INFO]: Missing: []
2022-12-02 02:48:24,165 [base][INFO]: Copying from /Users/r/francinette/tests/get_next_line/gnlTester to /Users/r/francinette/temp/get_next_line/gnlTester
2022-12-02 02:48:24,193 [base_exec][INFO]: on dir /Users/r/francinette/temp/get_next_line/gnlTester
2022-12-02 02:48:24,194 [base_exec][INFO]: on dir /Users/r/francinette/temp/get_next_line/gnlTester
2022-12-02 02:48:38,276 [base][INFO]: Copying from /Users/r/francinette/tests/get_next_line/fsoares to /Users/r/francinette/temp/get_next_line/fsoares
2022-12-02 02:48:38,298 [base_exec][INFO]: on dir /Users/r/francinette/temp/get_next_line/fsoares
2022-12-02 02:48:38,298 [base_exec][INFO]: executing: make TIMEOUT=10 mandatory
2022-12-02 02:48:38,299 [base_exec][INFO]: on dir /Users/r/francinette/temp/get_next_line/fsoares
2022-12-02 02:49:13,871 [base_exec][INFO]: BUFFER_SIZE: 1
Invalid fd : 1.OK 2.OK 3.OK 4_LEAKS.OK
empty.txt : 1.OK 2.OK 3_LEAKS.KO
==3723==AddressSanitizer CHECK failed: /BuildRoot/Library/Caches/com.apple.xbs/Sources/clang_compiler_rt/clang-900.0.39.2/src/projects/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:259 "((h->type == CommonInterceptorMetadata::CIMT_FILE)) != (0)" (0x0, 0x0)
#0 0x10d3eef5f in __asan::AsanCheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x60f5f)
#1 0x10d4061f7 in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x781f7)
#2 0x10d3dc158 in wrap_fclose (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x4e158)
#3 0x109dd80f0 in add_to_error_file utils.c:316
#4 0x109dcf19c in main tester.c:111
#5 0x7fff6eac3014 in start (libdyld.dylib:x86_64+0x1014)
/bin/sh: line 1: 3723 Killed: 9 ./test1.out < lines_around_10.txt
make: [mandatory] Error 137 (ignored)
BUFFER_SIZE: 10
Invalid fd : 1.OK 2.OK 3.OK 4_LEAKS.OK
empty.txt : 1.OK 2.OK 3_LEAKS.KO
==3739==AddressSanitizer CHECK failed: /BuildRoot/Library/Caches/com.apple.xbs/Sources/clang_compiler_rt/clang-900.0.39.2/src/projects/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:259 "((h->type == CommonInterceptorMetadata::CIMT_FILE)) != (0)" (0x0, 0x0)
#0 0x106628f5f in __asan::AsanCheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x60f5f)
#1 0x1066401f7 in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x781f7)
#2 0x106616158 in wrap_fclose (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x4e158)
#3 0x103015f50 in add_to_error_file utils.c:316
#4 0x10300bc80 in main tester.c:111
#5 0x7fff6eac3014 in start (libdyld.dylib:x86_64+0x1014)
/bin/sh: line 1: 3739 Killed: 9 ./test2.out < lines_around_10.txt
make: [mandatory] Error 137 (ignored)
BUFFER_SIZE: 1000000
Invalid fd : 1.OK 2.OK 3.OK 4_LEAKS.OK
empty.txt : 1.OK 2.OK 3_LEAKS.KO
==3757==AddressSanitizer CHECK failed: /BuildRoot/Library/Caches/com.apple.xbs/Sources/clang_compiler_rt/clang-900.0.39.2/src/projects/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:259 "((h->type == CommonInterceptorMetadata::CIMT_FILE)) != (0)" (0x0, 0x0)
#0 0x10517df5f in __asan::AsanCheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x60f5f)
#1 0x1051951f7 in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x781f7)
#2 0x10516b158 in wrap_fclose (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x4e158)
#3 0x101b6afb0 in add_to_error_file utils.c:316
#4 0x101b6125c in main tester.c:111
#5 0x7fff6eac3014 in start (libdyld.dylib:x86_64+0x1014)
/bin/sh: line 1: 3757 Killed: 9 ./test3.out < lines_around_10.txt
make: [mandatory] Error 137 (ignored)
2022-12-02 02:49:13,878 [gnl-fsoares][INFO]: errors: ['empty.txt', '==3723==AddressSanitizer CHECK failed', '/bin/sh', 'empty.txt', '==3739==AddressSanitizer CHECK failed', '/bin/sh', 'empty.txt', '==3757==AddressSanitizer CHECK failed', '/bin/sh']
2022-12-02 02:49:13,967 [base][WARNING]: norminette errors: ['get_next_line_utils.c', 'get_next_line.c', 'main.c', 'get_next_line.h']
2022-12-02 02:49:13,968 [base][WARNING]: missing functions: []
2022-12-02 02:49:13,968 [base][WARNING]: errors in functions: [('gnlTester', ['gnlTester']), ('fsoares', ['fsoares'])]
Using ubuntu 22.04 on WSL (W11), other test just fine. Also tried other's code but same result.
t_list *ft_lstlast(t_list *lst)
{
if (!lst)
{
return (NULL);
}
while ((*lst).next)
{
lst = (*lst).next;
}
return (lst);
}
Compiling tests: libftTester (https://github.com/Tripouille/libftTester)
tests/ft_lstlast_test.cpp:23:2: error: use of undeclared identifier 'ft_lstadd_back'
ft_lstadd_back(&l, ft_lstnew((void*)1));
^
tests/ft_lstlast_test.cpp:25:2: error: use of undeclared identifier 'ft_lstadd_back'
ft_lstadd_back(&l, ft_lstnew((void*)2));
^
2 errors generated.
Problem compiling tests
Hello there and thanks for making an amazing framework!
I have an issue with your printf-tester - tests 1-3 compile and work, but your own tests fail to compile. At first I thought there was a problem with my own makefile, but I can't seem to see what it is - and the errors I do see pop up in code that is not my own. The compiler throws 70+ errors mostly in this category: [bonus.c:90:74: warning: format specifies type 'char *' but the argument has type 'void *' [-Wformat]]
- discarding the Werror flag in makes these warnings of course, but I still get "Problem compiling the tests" in the end. (execution.log attached)
Again - this might very well be my own fault in some way, but as the errors point in another direction I thought I might bring this to your attention.
Kind regards,
Albert van Andel
Hello,
I've been getting this error which seems to come from the pipex' Fsoares.py compare output function:
def compare_output(self, test, native: CompletedProcess, native_outfile, pipex, pipex_outfile):
def diff_stderr(stderr, actual_stderr):
errs = sorted(stderr.lower().splitlines())
actual_errs = stderr.lower().splitlines()
for line in errs:
split = line.split(":")
if len(split) < 3:
continue
cmd, msg = map(str.strip, split[1:]) <~~~~~~~~~~~~~~~~~ HERE
line = next(filter(lambda line: cmd in line, actual_errs), None)
if line is None:
return True
if msg not in line:
return True
return False
problems = []
if diff_stderr(native.stderr, pipex.stderr):
problems.append(
["stderr\nNeeds to have the same message\nand command/filename", native.stderr, pipex.stderr])
if native.returncode != pipex.returncode != 0:
problems.append(["return code", str(native.returncode), str(pipex.returncode)])
if native_outfile != pipex_outfile:
problems.append(["outfile content", native_outfile, pipex_outfile])
return [test, problems]
Additionally, it seems that the here_doc the tester uses isn't created when the francinette is running. I say this because I'm getting missing file error in my logs and after printing the temp directory at run time, there are just no here_doc to be found.
Moulinette tests if ft_strtrim works properly when the set string has 2 or more same characters, like ",," or "...,,,,".
I don't need more this program but I don't know how can I uninstall, how can I uninstall this app framework
The summary section at the end writes Failed tests twice: one with ft_, one without ft_.
Failed tests: ft_putnbr_fd, ft_strtrim, split, ft_itoa, putnbr_fd, strtrim, ft_split, substr, itoa, ft_substr
Hello,
I installed francinette and norminette in order to make Francinette work properly.
I need help to undertand how Francinette is calling norminette.
For some reason, norminette gets installed in the the library on my MAC. In order to make norminette work with command norminette I had to create an allias on . zshrc: alias norminette=/Users/IsabelTovar/Library/Python/3.9/bin/norminette
I feel some turn around must be applied also with Francinette so it calls the norminette at the right location.
Thank you for your help!
Isabel
Hello, thanks for your amazing work! But we can't use it at home because we don't have the "norminette", cane we have an option to configure that?
Thanks!
Describe the bug
By the way the repo is not mine, you can find it here
Because, i print the string only after i fully receive it, and not char by char as others have done, i guess that what could have caused the issue.
I tested my Libft all day yesterday, everything was working fine, I had no issues.
Since this morning I get a crash on some tests for the Memmove && strrchr functions.
All these crashes appear in the Alelievr tester, and I think it has something to do with the tester since it's the "only" part that has been changed since yesterday.
[crash]: your memmove crash because it read too many bytes or attempt to read on dst !
Test code:
int size = 10;
char *dst = electric_alloc(size);
char *data = electric_alloc(size);
__builtin___memset_chk (data, 'A', size, __builtin_object_size (data, 0));
ft_memmove(dst, data, size);
dst = electric_alloc_rev(size);
data = electric_alloc_rev(size);
__builtin___memset_chk (data, 'A', size, __builtin_object_size (data, 0));
ft_memmove(dst, data, size);
exit(TEST_SUCCESS);
[crash]: your strrchr crash because it read too many bytes or attempt to write on s !
Test code:
char *src = electric_alloc(10);
__builtin___strcpy_chk (src, "123456789", __builtin_object_size (src, 2 > 1 ? 1 : 0));
ft_strrchr(src, 'a');
src = electric_alloc_rev(10);
__builtin___strcpy_chk (src, "123456789", __builtin_object_size (src, 2 > 1 ? 1 : 0));
ft_strrchr(src, 'a');
exit(TEST_SUCCESS);
Let me know if you need more informations.
Btw I didn't test it at school, for now only on my personal macbook.
Add setup tools, organize the code and tools better, create doc folder to add future changelog
Start using git tags instead of manual versioning
Bug:
when i start the francinette in my root projecs, it keeps working normally until it starts the tests and it displays an error about leaks "Leaks: ⠙'NoneType' object has no attribute 'group'" , i guess it's some kinda of a bug
LOG File:
2022-11-20 18:17:04,521 [c selector][INFO]: Testing path: /home/jack/Desktop/test/42repos/cursus/minitalk/ex00
2022-11-20 18:17:04,522 [utils][INFO]: Makefile path: /home/jack/Desktop/test/42repos/cursus/minitalk/Makefile
2022-11-20 18:17:04,522 [gnl][INFO]: Testing: get_next_line.c
2022-11-20 18:17:04,522 [utils][INFO]: Makefile path: /home/jack/Desktop/test/42repos/cursus/minitalk/Makefile
2022-11-20 18:17:04,523 [minitalk][INFO]: Makefile path: /home/jack/Desktop/test/42repos/cursus/minitalk/Makefile
2022-11-20 18:17:04,523 [minitalk][INFO]: Makefile path: /home/jack/Desktop/test/42repos/cursus/minitalk/Makefile
2022-11-20 18:17:04,523 [main][INFO]: Test params: TestRunInfo(source_dir=PosixPath('/home/jack/Desktop/test/42repos/cursus/minitalk'), base_dir=PosixPath('/home/jack/francinette'), ex_to_execute=None, args=Namespace(bonus=False, clean=False, exercise=[], git_repo=None, ignore_norm=False, mandatory=False, strict=False, testers=None, timeout='10', update=False, verbose=False), has_bonus=False)
2022-11-20 18:17:04,532 [base][INFO]: Removing already present directory /home/jack/francinette/temp/minitalk
2022-11-20 18:17:04,532 [base][INFO]: copying /home/jack/Desktop/test/42repos/cursus/minitalk to /home/jack/francinette/temp/minitalk
2022-11-20 18:17:04,535 [base][ERROR]:
Traceback (most recent call last):
File "/home/jack/francinette/testers/BaseTester.py", line 120, in prepare_ex_files
repo = git.Repo(self.temp_dir)
File "/home/jack/francinette/venv/lib/python3.8/site-packages/git/repo/base.py", line 266, in __init__
self.working_dir: Optional[PathLike] = self._working_tree_dir or self.common_dir
File "/home/jack/francinette/venv/lib/python3.8/site-packages/git/repo/base.py", line 347, in common_dir
raise InvalidGitRepositoryError()
git.exc.InvalidGitRepositoryError
2022-11-20 18:17:04,615 [base][INFO]: On directory /home/jack/francinette/temp/minitalk
2022-11-20 18:17:04,825 [base][INFO]: CompletedProcess(args=['norminette'], returncode=0, stdout='minitalk.h: OK!\nclient.c: OK!\nserver.c: OK!\n', stderr='')
2022-11-20 18:17:04,862 [base][INFO]: copying /home/jack/Desktop/test/42repos/cursus/minitalk to /home/jack/francinette/temp/minitalk/__my_srcs
2022-11-20 18:17:04,863 [base][INFO]: bonus investigation: []
2022-11-20 18:17:04,863 [base][INFO]: To execute: []
2022-11-20 18:17:04,863 [base][INFO]: Missing: []
2022-11-20 18:17:04,863 [base][INFO]: Calling 'make fclean all' on directory /home/jack/francinette/temp/minitalk
2022-11-20 18:17:04,979 [base][INFO]: CompletedProcess(args=['make', 'fclean', 'all'], returncode=0, stdout='rm -f server client\ncc -Wall -Wextra -Werror server.c -o server\ncc -Wall -Wextra -Werror client.c -o client\n', stderr='')
2022-11-20 18:17:05,025 [base][INFO]: Copying from /home/jack/francinette/tests/minitalk/fsoares to /home/jack/francinette/temp/minitalk/fsoares
2022-11-20 18:17:05,026 [base_exec][INFO]: on dir /home/jack/francinette/temp/minitalk/fsoares
2022-11-20 18:17:05,032 [base_exec][INFO]: added sanitization to makefile ../__my_srcs/Makefile
2022-11-20 18:17:05,032 [base_exec][INFO]: executing: make TIMEOUT=10 fclean all
2022-11-20 18:17:05,032 [base_exec][INFO]: on dir /home/jack/francinette/temp/minitalk/fsoares
2022-11-20 18:17:05,306 [base_exec][INFO]:
2022-11-20 18:17:05,500 [mt-fsoares][INFO]: CompletedProcess(args="/home/jack/francinette/temp/minitalk/__my_srcs/client 1997 'teste\n-----\n'", returncode=0, stdout=b'', stderr=b'')
2022-11-20 18:17:05,517 [mt-fsoares][INFO]: CompletedProcess(args=['kill', '-INT', '1997'], returncode=0, stdout=b'', stderr=b'')
2022-11-20 18:17:05,519 [base][ERROR]: 'NoneType' object has no attribute 'group'
Traceback (most recent call last):
File "/home/jack/francinette/testers/BaseTester.py", line 183, in test_using
return (tester.name, tx.execute())
File "/home/jack/francinette/testers/minitalk/Fsoares.py", line 76, in execute
result = self.test_client_server()
File "/home/jack/francinette/testers/minitalk/Fsoares.py", line 89, in test_client_server
no_leaks = self.test_leaks()
File "/home/jack/francinette/testers/minitalk/Fsoares.py", line 234, in test_leaks
self.send_message(server, "teste\n-----\n")
File "/home/jack/francinette/testers/minitalk/Fsoares.py", line 266, in send_message
return re.match(r"__PID: (\d+)", client.stdout.decode('utf-8', errors="backslashreplace")).group(1)
AttributeError: 'NoneType' object has no attribute 'group'
2022-11-20 18:17:05,523 [base][WARNING]: norminette errors: []
2022-11-20 18:17:05,523 [base][WARNING]: missing functions: []
2022-11-20 18:17:05,523 [base][WARNING]: errors in functions: [('fsoares', ['fsoares'])]```
In the eval sheet there is a request to test that it should compile without passing the -D BUFFER_SIZE
flag
Make the initial leak check with the leaks command (in mac) And if it finds leaks, then hookup the stack tracer.
Improves execution times.
Francinette doesn't run because it says it's not in the folder or the makefile is not correct. I pass a screenshot where you can see that I am in the "libft" project folder, there are all my "*.c" files and you can see my makefile with the name of the project, and logs francinette
This is running on Ubuntu 22.04
execution.log
Describe the bug
While trying to run the program on Ubuntu, libftTester returns this error:
> In file included from tests/ft_lstmap_test.cpp:8:
utils/sigsegv.hpp:4:11: fatal error: 'iostream' file not found
# include <iostream>
Hi and thank you for your work. I tried to run francinette on Ubuntu Budgie 22.10, but there is a problem when testing ft_printf.
On first run test all the makefile targets to see if they work correctly.
This needs to vary between projects, to check the results.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.