Code Monkey home page Code Monkey logo

francinette's Introduction

Francinette

An easy to use testing framework for the 42 projects.

Use francinette or paco inside a project folder to run it.

Currently has tests for: libft, ft_printf, get_next_line, minitalk and pipex.

Francinette is only tested and confirmed to work on MacOS on non ARM chips. Some testers may work on Linux and ARM, but I give no guaranties of any test working or even compiling.

❗ Important note:

If you have little to no experience programming, I highly highly highly recommend that you write your own tests first. For example, for ft_split try to write a main that tests that your code works in most cases. It is also useful to think about corner cases, like what should it return if the string is "" or " " or "word". Don't rely just on francinette or other tests.

⚠️ Write your own tests, It's a very essential part of programming. ⚠️

Table of Contents

  1. Purpose
  2. Install
  3. Update
  4. Running
  5. Uninstall
  6. FAQ
  7. Acknowledgments

Purpose:

This is designed to function as a kind of moulinette that you can execute in local.

That means that by executing francinette it will check norminette, compile the code and execute the tests.

You can use it as a local test battery, to test your code.

Example execution:

Example Image

Install:

Francinette has an automatic installer.

Copy the line bellow to your console and execute it. It will automatically download the repo, create the necessary folders and alias, and install a python virtual environment dedicated to running this tool.

In linux it will also download and install the necessary packages for it to run. It needs admin permission to do that.

bash -c "$(curl -fsSL https://raw.github.com/xicodomingues/francinette/master/bin/install.sh)"

The francinette folder will be under your $HOME directory (/Users/<your_username>/)

Update:

Normally francinette will prompt you when there is a new version, and you can then update it.

You can also force it from francinette itself:

~ $> francinette -u              # Forces francinette to update

If the above does not work you can also execute the command bellow:

bash -c "$(curl -fsSL https://raw.github.com/xicodomingues/francinette/master/bin/update.sh)"

Running:

If you are on a root of a project, francinette should be able to tell which project it is and execute the corresponding tests.

You can also use the shorter version of the command: paco

To see all the available options execute paco -h

/C00 $> francinette                  # Execute the tests for C00

/C00/ex00 $> francinette             # Execute only the tests for ex00 in C00

/libft $> francinette                # Execute the tests for libft

~ $> francinette -h                  # Shows the help message

libft $> paco memset isalpha memcpy  # Executes only the specified tests

The name of the folder is not important. What is important is that you have a Makefile that contains the name of the project (for example libft), or the expected delivery files. If there is no Makefile or delivery files are not present francinette will not know what project to execute.

~ $> francinette [email protected]/intra-uuid-234

This command clones the git repository present in [email protected]/intra-uuid-234 into the current folder and executes the corresponding tests

All the files are copied to the folder ~/francinette/temp/<project>. In here is where the norminette is checked, the code compiled and the tests executed. Normally you do not need to access this directory for anything. But if you run into unexpected problems, this is where the magic happens.

Log files can be found in: ~/francinette/logs

Uninstall

To uninstall francinette delete the francinette folder. It should be located under your $HOME directory (/Users/<your_username>/ or /home/<your_username>/)

You also need to remove the automatically created aliases. For that open your ~/.zshrc file and delete the lines:

alias francinette="$HOME"/francinette/tester.sh
alias paco="$HOME"/francinette/tester.sh

FAQ

If you have any questions you can create an issue or reach me on slack under fsoares-

I'm more advanced than the tests you have available. When are you adding more tests?

When I reach that exercise or project. You can also add them. For that you need to create a ProjectTester.py file. and change the function guess_project in main.py to recognize the project.

This test that you put up is incorrect!

Please create a new github issue, indicating for what exercise which test fails, and a description of what you think is wrong. You can also try to fix it and create a pull request for that change!

What is NULL_CHECK in strict?

This is a way to test if you are protecting your malloc calls. This means that it will make every call to malloc fail and return NULL instead of a newly allocated pointer. You need to take this into account when programming so that you don't get segmentation faults.

The tester for get_next_line is giving me Timeout errors

This is something that is very common. My tester will get slower for every malloc that you do, so if you do a lot of mallocs it will probably timeout.

If it timeouts while in the strict mode, don't worry, this one is very very inefficient. I have plans to change some things to not make it so horrible, but for the time being, don't worry if it gives a Timeout.

Troubleshooting

I've installed francinette, but when I try to execute it I get the message: command not found: francinette

In the install script I try to set two alias to for francinette: francinette and paco. If you are in MacOS I do that by adding two lines to the .zshrc file, and to .bashrc in linux. If by some chance you are using other shell, or for some other reason it does not work, You can try to set the aliases yourself, by adding:

alias francinette="$HOME"/francinette/tester.sh
alias paco="$HOME"/francinette/tester.sh

Now it should work. If it does not, don't be afraid to contact me.

Acknowledgments

francinette's People

Contributors

bcheronn avatar juansaldana1 avatar primeo7 avatar puyma avatar twalker314 avatar xicodomingues avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

francinette's Issues

[libft] ft_lstadd_front memory leak

sample

t_list *old;  // 1 > 2 > 3
t_list *new; // a > b > c 

as-is

ft_lstadd_front(old, new);  // a > 1 > 2 > 3   (b, c memory leak)

to-be

ft_lstadd_front(old, new);  // a > b > c > 1 > 2 > 3   (no memory leak)

Francinette needs to be executed inside a project folder, Ubuntu

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
1
execution.log

get_next_line: strict null checks

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:

  1. Is up to the caller to free the memory or should the function free it?
  2. Is it my implementation or is it out dated tests?

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?

printf: cannot compile fsoares tests without passing c to ar

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

At home

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!

'iostream' file not found on Ubuntu

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>
  • OS: Pop!_OS

Change way to check leaks

Make the initial leak check with the leaks command (in mac) And if it finds leaks, then hookup the stack tracer.

Improves execution times.

minitalk issue.

Describe the bug

  • OS: MacOS Catalina

1st - Problem in compilation:

compilation error

By the way the repo is not mine, you can find it here

2nd - francinette possible bug

francinette error

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.

Error with halo when installing on WSL2 Ubuntu 20.02

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```

[Errno 2] No such file or directory: 'norminette'

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

Printf tester with -b -s

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"))

[Libft] LibftTester test for ft_lstlast not compiling

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

crash during fsoares gnl tests - osx 10.13.6 (17G66)

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'])]

Add forbidden function check

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-

Make default timeout project dependent

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)

Rework structure to be more pythonic

Add setup tools, organize the code and tools better, create doc folder to add future changelog

Start using git tags instead of manual versioning

No such file or directory

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

test_lstmap.c compilation error with sprintf

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

Difference of results based on the computer ?

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 !

The new change on the error test is not graded by Moulinette

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.

Error running francinette in Pipex project folder

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.

lst map

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

ft_printf won't compile

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

execution.log

incorrect test for calloc in alelievr/libft-unit-test

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.

(Linux) Python bug while running Tripouille/libftTester

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.

minitalk tests not working

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'])]```

LIBFT - Memmove && strrchr crash since v0.9.4

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.

ft_printf --strict on Linux

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>

All tests passes, although the Makefile doesn't work properly

The Moulinette throws back my project twice, both times it is Makefile related problem:

The 1st 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 2nd problem(which i find a more serious issue):

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.

Ubuntu - All tests working, except fsoares

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

Fails to prepare tests for Minitalk

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

Pipex: too many values to unpack (expect 2) and here doc missing

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.

Norminette checks everything

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

The francinette does not do a free in the test of lst_map in libft.

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.