UTBotCpp
UTBotCpp copied to clipboard
[coreutils] Running tests for 'gnulib/lib/exclude.c' failed
Steps to reproduce
- Open and configure project
coreutils - Choose target
libcoreutils.a - Generate tests for file
gnulib/lib/exclude.c - Run tests
- See logs
Initialisation of unnamed union (should be filtered out?)
Logs
/home/utbot/projects/coreutils/utbot_tests/gnulib/lib/exclude_test.cpp:446:97: error: expected unqualified-id
struct exclude_segment utbotInnerVar1 = {NULL, exclude_hash, 0, from_bytes<exclude_segment::>({0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0})};
Code
TEST(error, free_exclude_test_1)
{
struct exclude ex = {NULL, (struct pattern_buffer *) 18446744073709551615};
struct exclude_segment utbotInnerVar1 = {NULL, exclude_hash, 0, from_bytes<exclude_segment::>({0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0})};
ex.head = &utbotInnerVar1;
free_exclude(&ex);
struct exclude expected_ex = {NULL, NULL};
}
Wrong name of enum
Logs
/home/utbot/projects/coreutils/utbot_tests/gnulib/lib/exclude_test.cpp:504:118: error: no enum named 'exclude_type' in 'UTBot::exclude_segment'
struct exclude_segment utbotInnerVar1 = {(struct exclude_segment *) 16717361816799281152, (enum exclude_segment::exclude_type)(-232335864), 0, from_bytes<exclude_segment::>({0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0})};
Code
TEST(error, excluded_file_name_test_3)
{
struct exclude ex = {NULL, (struct pattern_buffer *) 18446744073709551615};
char f[] = "ccabcccccc";
struct exclude_segment utbotInnerVar1 = {(struct exclude_segment *) 16717361816799281152, (enum exclude_segment::exclude_type)(-232335864), 0, from_bytes<exclude_segment::>({0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0})};
ex.head = &utbotInnerVar1;
excluded_file_name(&ex, f);
}
Looks like a problem @sava-cska is working on
Union error
Logs
/home/utbot/coreutils/tests/gnulib/lib/exclude_dot_c_test.cpp:684:59: error: expected unqualified-id
.v = from_bytes<exclude_segment::exclude_segment::(anonymous union at ../lib/exclude.c:106:5)>({0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0})};
^
/home/utbot/coreutils/tests/gnulib/lib/exclude_dot_c_test.cpp:684:60: error: use of undeclared identifier 'anonymous'
.v = from_bytes<exclude_segment::exclude_segment::(anonymous union at ../lib/exclude.c:106:5)>({0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0})};
Code
TEST(error, excluded_file_name_test_7)
{
struct exclude ex = {
.head = NULL,
.patbuf = (struct pattern_buffer*) 0xffffffff};
char f[] = "cccccccac";
struct exclude ex = {
.head = NULL,
.patbuf = (struct pattern_buffer*) 0xffffffff};
struct exclude_segment utbotInnerVar1 = {
.next = NULL,
.type = (enum exclude_type)(2001152744),
.options = 0,
.v = from_bytes<exclude_segment::exclude_segment::(anonymous union at ../lib/exclude.c:106:5)>({0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0})};
ex.head = (struct exclude_segment*) &utbotInnerVar1;
excluded_file_name(&ex, f);
}
Struct redefinition error
Logs
/home/utbot/coreutils/tests/gnulib/lib/exclude_dot_c_test.cpp:677:20: error: redefinition of 'ex'
struct exclude ex = {
^
/home/utbot/coreutils/tests/gnulib/lib/exclude_dot_c_test.cpp:673:20: note: previous definition is here
struct exclude ex = {
^
Code
TEST(error, excluded_file_name_test_7)
{
struct exclude ex = {
.head = NULL,
.patbuf = (struct pattern_buffer*) 0xffffffff};
char f[] = "cccccccac";
struct exclude ex = {
.head = NULL,
.patbuf = (struct pattern_buffer*) 0xffffffff};
struct exclude_segment utbotInnerVar1 = {
.next = NULL,
.type = (enum exclude_type)(2001152744),
.options = 0,
.v = from_bytes<exclude_segment::exclude_segment::(anonymous union at ../lib/exclude.c:106:5)>({0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0})};
ex.head = (struct exclude_segment*) &utbotInnerVar1;
excluded_file_name(&ex, f);
}