Skip to content

EasySandbox tests are not passing in Fedora after compliation #7

@p0ryae

Description

@p0ryae

gcc version: 9.1.0 (have tried 12.x)
g++ version: 9.1.0(have tried 12.x)
make version: 4.4.1 (have tried 3.82)

Logs when compiling initially using make:

gcc -c -fPIC -std=c99 -g -Wall -D_BSD_SOURCE   EasySandbox.c
In file included from /usr/include/unistd.h:25,
                 from EasySandbox.c:40:
/usr/include/features.h:194:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
  194 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
      |   ^~~~~~~
gcc -c -fPIC -std=c99 -g -Wall -D_BSD_SOURCE   malloc.c
In file included from /usr/include/bits/libc-header-start.h:33,
                 from /usr/include/stdio.h:27,
                 from malloc.c:24:
/usr/include/features.h:194:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
  194 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
      |   ^~~~~~~
gcc -shared -o EasySandbox.so EasySandbox.o malloc.o -ldl
gcc -std=c99 -g -Wall -D_BSD_SOURCE   -o t/test01 t/test01.c -lm
gcc -std=c99 -g -Wall -D_BSD_SOURCE   -o t/test02 t/test02.c -lm
In file included from /usr/include/unistd.h:25,
                 from t/test02.c:3:
/usr/include/features.h:194:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
  194 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
      |   ^~~~~~~
gcc -std=c99 -g -Wall -D_BSD_SOURCE   -o t/test03 t/test03.c -lm
In file included from /usr/include/bits/libc-header-start.h:33,
                 from /usr/include/stdio.h:27,
                 from t/test03.c:3:
/usr/include/features.h:194:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
  194 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
      |   ^~~~~~~
gcc -std=c99 -g -Wall -D_BSD_SOURCE   -o t/test04 t/test04.c -lm
In file included from /usr/include/bits/libc-header-start.h:33,
                 from /usr/include/stdio.h:27,
                 from t/test04.c:3:
/usr/include/features.h:194:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
  194 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
      |   ^~~~~~~
gcc -std=c99 -g -Wall -D_BSD_SOURCE   -o t/test05 t/test05.c -lm
In file included from /usr/include/bits/libc-header-start.h:33,
                 from /usr/include/stdio.h:27,
                 from t/test05.c:5:
/usr/include/features.h:194:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
  194 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
      |   ^~~~~~~
gcc -std=c99 -g -Wall -D_BSD_SOURCE   -o t/test06 t/test06.c -lm
In file included from /usr/include/bits/libc-header-start.h:33,
                 from /usr/include/stdio.h:27,
                 from t/test06.c:4:
/usr/include/features.h:194:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
  194 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
      |   ^~~~~~~
gcc -std=c99 -g -Wall -D_BSD_SOURCE   -o t/test07 t/test07.c -lm
In file included from /usr/include/bits/libc-header-start.h:33,
                 from /usr/include/stdio.h:27,
                 from t/test07.c:3:
/usr/include/features.h:194:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
  194 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
      |   ^~~~~~~
gcc -std=c99 -g -Wall -D_BSD_SOURCE   -o t/test08 t/test08.c -lm
In file included from /usr/include/bits/libc-header-start.h:33,
                 from /usr/include/stdlib.h:26,
                 from t/test08.c:3:
/usr/include/features.h:194:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
  194 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
      |   ^~~~~~~
g++ -g -Wall -D_BSD_SOURCE  -o t/test09 t/test09.cpp -lm
In file included from /usr/local/include/c++/9.1.0/x86_64-pc-linux-gnu/bits/os_defines.h:39,
                 from /usr/local/include/c++/9.1.0/x86_64-pc-linux-gnu/bits/c++config.h:524,
                 from /usr/local/include/c++/9.1.0/iostream:38,
                 from t/test09.cpp:3:
/usr/include/features.h:194:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
  194 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
      |   ^~~~~~~
g++ -g -Wall -D_BSD_SOURCE  -o t/test10 t/test10.cpp -lm
In file included from /usr/local/include/c++/9.1.0/x86_64-pc-linux-gnu/bits/os_defines.h:39,
                 from /usr/local/include/c++/9.1.0/x86_64-pc-linux-gnu/bits/c++config.h:524,
                 from /usr/local/include/c++/9.1.0/iostream:38,
                 from t/test10.cpp:3:
/usr/include/features.h:194:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
  194 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
      |   ^~~~~~~
g++ -g -Wall -D_BSD_SOURCE  -o t/test11 t/test11.cpp -lm
In file included from /usr/local/include/c++/9.1.0/x86_64-pc-linux-gnu/bits/os_defines.h:39,
                 from /usr/local/include/c++/9.1.0/x86_64-pc-linux-gnu/bits/c++config.h:524,
                 from /usr/local/include/c++/9.1.0/iostream:38,
                 from t/test11.cpp:4:
/usr/include/features.h:194:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
  194 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
      |   ^~~~~~~
g++ -g -Wall -D_BSD_SOURCE  -o t/test12 t/test12.cpp -lm
In file included from /usr/local/include/c++/9.1.0/x86_64-pc-linux-gnu/bits/os_defines.h:39,
                 from /usr/local/include/c++/9.1.0/x86_64-pc-linux-gnu/bits/c++config.h:524,
                 from /usr/local/include/c++/9.1.0/iostream:38,
                 from t/test12.cpp:3:
/usr/include/features.h:194:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
  194 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
      |   ^~~~~~~
gcc -std=c99 -g -Wall -D_BSD_SOURCE   -o t/test13 t/test13.c -lm
In file included from /usr/include/bits/libc-header-start.h:33,
                 from /usr/include/stdio.h:27,
                 from t/test13.c:3:
/usr/include/features.h:194:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
  194 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
      |   ^~~~~~~
g++ -g -Wall -D_BSD_SOURCE  -o t/test14 t/test14.cpp -lm
In file included from /usr/local/include/c++/9.1.0/x86_64-pc-linux-gnu/bits/os_defines.h:39,
                 from /usr/local/include/c++/9.1.0/x86_64-pc-linux-gnu/bits/c++config.h:524,
                 from /usr/local/include/c++/9.1.0/iostream:38,
                 from t/test14.cpp:4:
/usr/include/features.h:194:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
  194 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
      |   ^~~~~~~
gcc -std=c99 -g -Wall -D_BSD_SOURCE   -o t/test15 t/test15.c -lm
In file included from /usr/include/bits/libc-header-start.h:33,
                 from /usr/include/stdio.h:27,
                 from t/test15.c:1:
/usr/include/features.h:194:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
  194 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"

Compile successfully finishes however without any errors (only warnings present). But the tests don't pass. The following is the log when running the tests:

./runalltests.sh t/test01 t/test02 t/test03 t/test04 t/test05 t/test06 t/test07 t/test08 t/test09 t/test10 t/test11 t/test12 t/test13 t/test14 t/test15
Executing t/test01...failed (exit code mismatch, expected 0, got 139)
Executing t/test02...1a2
> Hello, world
failed (output mismatch, expected [<<entering SECCOMP mode>>
Hello, world], got [<<entering SECCOMP mode>>])
Executing t/test03...failed (exit code mismatch, expected 137, got 139)
Executing t/test04...1a2
> 500500
failed (output mismatch, expected [<<entering SECCOMP mode>>
500500], got [<<entering SECCOMP mode>>])
Executing t/test05...1a2
> Hello, world
failed (output mismatch, expected [<<entering SECCOMP mode>>
Hello, world], got [<<entering SECCOMP mode>>])
Executing t/test06...failed (exit code mismatch, expected 137, got 139)
Executing t/test07...1a2
> 59
failed (output mismatch, expected [<<entering SECCOMP mode>>
59], got [<<entering SECCOMP mode>>])
Executing t/test08...failed (exit code mismatch, expected 0, got 139)
Executing t/test09...1a2
> Hello, C++ world
failed (output mismatch, expected [<<entering SECCOMP mode>>
Hello, C++ world], got [<<entering SECCOMP mode>>])
Executing t/test10...1a2
> Hello from the constructor!
failed (output mismatch, expected [<<entering SECCOMP mode>>
Hello from the constructor!], got [<<entering SECCOMP mode>>])
Executing t/test11...failed (exit code mismatch, expected 137, got 139)
Executing t/test12...1a2,3
> Here we are in main()
> Hello from the destructor!
failed (output mismatch, expected [<<entering SECCOMP mode>>
Here we are in main()
Hello from the destructor!], got [<<entering SECCOMP mode>>])
Executing t/test13...1a2
> Hello from the destructor!
failed (output mismatch, expected [<<entering SECCOMP mode>>
Hello from the destructor!], got [<<entering SECCOMP mode>>])
Executing t/test14...1a2
> 500500
failed (output mismatch, expected [<<entering SECCOMP mode>>
500500], got [<<entering SECCOMP mode>>])
Executing t/test15...1a2
> Radius is 1.128379
failed (output mismatch, expected [<<entering SECCOMP mode>>
Radius is 1.128379], got [<<entering SECCOMP mode>>])
15 test(s) failed
make: *** [Makefile:31: runtests] Error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions