summaryrefslogtreecommitdiff
path: root/bxgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'bxgen.c')
-rwxr-xr-xbxgen.c28
1 files changed, 18 insertions, 10 deletions
diff --git a/bxgen.c b/bxgen.c
index 865a483..aceaca2 100755
--- a/bxgen.c
+++ b/bxgen.c
@@ -4357,6 +4357,8 @@ b8 link_with_libc(void) {
// ============================================================
+ b8 success = 1;
+
if (HOST_OS != OS_Linux) {
LOG(INFO, "Skip running the executable. Host system is not compatible.");
} else if (HO != LE) {
@@ -4372,10 +4374,12 @@ b8 link_with_libc(void) {
ret = system("./test_foo >/dev/null");
if (WEXITSTATUS(ret) != 42)
- return 0;
+ success = 0;
}
- return 1;
+ system("rm test_foo");
+
+ return success;
}
b8 two_plus_two(void) {
@@ -4390,6 +4394,8 @@ b8 two_plus_two(void) {
u_elf_x86_64(u, "test_two_plus_two");
+ b8 success = 1;
+
if (HOST_OS != OS_Linux) {
LOG(INFO, "Skip running the executable. Host system is not compatible.");
} else if (HO != LE) {
@@ -4405,12 +4411,12 @@ b8 two_plus_two(void) {
ret = system("./test_two_plus_two >/dev/null");
if (WEXITSTATUS(ret) != 4)
- return 0;
-
- system("rm test_two_plus_two");
+ success = 0;
}
- return 1;
+ system("rm test_two_plus_two");
+
+ return success;
}
b8 sixty_nine(void) {
@@ -4425,6 +4431,8 @@ b8 sixty_nine(void) {
u_elf_x86_64(u, "test_sixty_nine");
+ b8 success = 1;
+
if (HOST_OS != OS_Linux) {
LOG(INFO, "Skip running the executable. Host system is not compatible.");
} else if (HO != LE) {
@@ -4440,12 +4448,12 @@ b8 sixty_nine(void) {
ret = system("./test_sixty_nine >/dev/null");
if (WEXITSTATUS(ret) != 69)
- return 0;
-
- system("rm test_sixty_nine");
+ success = 0;
}
- return 1;
+ system("rm test_sixty_nine");
+
+ return success;
}
#endif // HELPERS