diff --git a/.gitignore b/.gitignore index 81b4476..1f044c7 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,3 @@ /test-suite.log /tests/test*.log /tests/test*.trs - -/tests/hang -/tests/test_hang_segfault diff --git a/Makefile.am b/Makefile.am index bbe369c..e0e3018 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,22 +5,15 @@ AM_CFLAGS = -std=c99 -I$(top_srcdir)/include lib_LIBRARIES = libkernaux.a TESTS = \ - tests/test_hang_segfault \ tests/test_multiboot2_validation -noinst_PROGRAMS = \ - $(TESTS) \ - tests/hang +noinst_PROGRAMS = $(TESTS) libkernaux_a_SOURCES = \ src/arch/i386.S \ src/multiboot2.c \ src/pfa.c -tests_hang_SOURCES = $(libkernaux_a_SOURCES) tests/hang.c - -tests_test_hang_segfault_SOURCES = tests/test_hang_segfault.c - tests_test_multiboot2_validation_SOURCES = \ $(libkernaux_a_SOURCES) \ tests/test_multiboot2_validation.c diff --git a/tests/hang.c b/tests/hang.c deleted file mode 100644 index f0377ac..0000000 --- a/tests/hang.c +++ /dev/null @@ -1,8 +0,0 @@ -#include - -int main() -{ - kernaux_arch_i386_hang(); - - return 0; -} diff --git a/tests/test_hang_segfault.c b/tests/test_hang_segfault.c deleted file mode 100644 index cc275b7..0000000 --- a/tests/test_hang_segfault.c +++ /dev/null @@ -1,22 +0,0 @@ -#include -#include -#include - -#define __USE_POSIX2 -#include - -int main() -{ - FILE *const fd = popen("tests/hang 2>&1", "r"); - assert(fd != NULL); - - char buffer[256]; - char *const result = fgets(buffer, 256, fd); - assert(result == buffer); - assert(0 == strncmp(result, "Segmentation fault (core dumped)\n", 256)); - - const int status = pclose(fd); - assert(status != 0); - - return 0; -}