* [PATCH][rt-tests] Revert changes to rt-migrate-test for exit(1)
@ 2016-03-24 14:28 John Kacur
2016-03-24 14:40 ` Luiz Capitulino
0 siblings, 1 reply; 2+ messages in thread
From: John Kacur @ 2016-03-24 14:28 UTC (permalink / raw)
To: RT; +Cc: lcapitulino
>From 607dc3627ab7ff28a116c5bb09058aabddf10f27 Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
Date: Thu, 24 Mar 2016 15:21:54 +0100
Subject: [PATCH] Revert changes to rt-migrate-test for exit(1)
Commit 3290f8412a4562adbc05b38d8e5212090e41587e changed
exit(-1) to exit(1) for many programs in rt-tests for consistency.
rt-migrate-test needs tri-state exit statuses, because of the way
some existing bash scripts consume it's results.
This could no-doubt be improved in the future, and there are some
inconsistencies in the exit statuses in this program alone, but as they
are not urgent to fix, and the current fix makes things worse, reverting
this for now.
Signed-off-by: John Kacur <jkacur@redhat.com>
---
src/rt-migrate-test/rt-migrate-test.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/rt-migrate-test/rt-migrate-test.c b/src/rt-migrate-test/rt-migrate-test.c
index e18beca816aa..d7b68ddac3e5 100644
--- a/src/rt-migrate-test/rt-migrate-test.c
+++ b/src/rt-migrate-test/rt-migrate-test.c
@@ -138,7 +138,7 @@ static void perr(char *fmt, ...)
perror(buffer);
fflush(stderr);
- exit(1);
+ exit(-1);
}
static void print_progress_bar(int percent)
@@ -226,6 +226,7 @@ static void parse_options (int argc, char *argv[])
break;
}
}
+
}
static unsigned long long get_time(void)
@@ -603,7 +604,7 @@ int main (int argc, char **argv)
exit(1);
}
if (check < 0)
- exit(1);
+ exit(-1);
else
exit(0);
--
2.4.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH][rt-tests] Revert changes to rt-migrate-test for exit(1)
2016-03-24 14:28 [PATCH][rt-tests] Revert changes to rt-migrate-test for exit(1) John Kacur
@ 2016-03-24 14:40 ` Luiz Capitulino
0 siblings, 0 replies; 2+ messages in thread
From: Luiz Capitulino @ 2016-03-24 14:40 UTC (permalink / raw)
To: John Kacur; +Cc: RT
On Thu, 24 Mar 2016 15:28:24 +0100 (CET)
John Kacur <jkacur@redhat.com> wrote:
> From 607dc3627ab7ff28a116c5bb09058aabddf10f27 Mon Sep 17 00:00:00 2001
> From: John Kacur <jkacur@redhat.com>
> Date: Thu, 24 Mar 2016 15:21:54 +0100
> Subject: [PATCH] Revert changes to rt-migrate-test for exit(1)
>
> Commit 3290f8412a4562adbc05b38d8e5212090e41587e changed
> exit(-1) to exit(1) for many programs in rt-tests for consistency.
>
> rt-migrate-test needs tri-state exit statuses, because of the way
> some existing bash scripts consume it's results.
>
> This could no-doubt be improved in the future, and there are some
> inconsistencies in the exit statuses in this program alone, but as they
> are not urgent to fix, and the current fix makes things worse, reverting
> this for now.
>
> Signed-off-by: John Kacur <jkacur@redhat.com>
> ---
> src/rt-migrate-test/rt-migrate-test.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/src/rt-migrate-test/rt-migrate-test.c b/src/rt-migrate-test/rt-migrate-test.c
> index e18beca816aa..d7b68ddac3e5 100644
> --- a/src/rt-migrate-test/rt-migrate-test.c
> +++ b/src/rt-migrate-test/rt-migrate-test.c
> @@ -138,7 +138,7 @@ static void perr(char *fmt, ...)
>
> perror(buffer);
> fflush(stderr);
> - exit(1);
> + exit(-1);
> }
>
> static void print_progress_bar(int percent)
> @@ -226,6 +226,7 @@ static void parse_options (int argc, char *argv[])
> break;
> }
> }
> +
> }
>
> static unsigned long long get_time(void)
> @@ -603,7 +604,7 @@ int main (int argc, char **argv)
> exit(1);
> }
> if (check < 0)
> - exit(1);
> + exit(-1);
> else
> exit(0);
>
Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-24 14:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-24 14:28 [PATCH][rt-tests] Revert changes to rt-migrate-test for exit(1) John Kacur
2016-03-24 14:40 ` Luiz Capitulino
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).