summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-11-06 00:49:44 +0100
committerLennart Poettering <lennart@poettering.net>2014-11-06 14:21:10 +0100
commit592fd144ae313855f48d0ca52a103013b41e5d59 (patch)
tree45f239ffa2dc6fb375785d8e8a3ddbda78c829e4 /src/test
parent58f2fab16da947052756b7f9ace40f6ee7fa1519 (diff)
condition: properly allow passing back errors from condition checks
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test-architecture.c3
-rw-r--r--src/test/test-condition-util.c4
2 files changed, 3 insertions, 4 deletions
diff --git a/src/test/test-architecture.c b/src/test/test-architecture.c
index 24217ad369..30bdec45e5 100644
--- a/src/test/test-architecture.c
+++ b/src/test/test-architecture.c
@@ -25,9 +25,8 @@
#include "log.h"
int main(int argc, char *argv[]) {
- Architecture a;
- int v;
const char *id = NULL;
+ int a, v;
v = detect_virtualization(&id);
if (v == -EPERM || v == -EACCES)
diff --git a/src/test/test-condition-util.c b/src/test/test-condition-util.c
index 1c792446af..7a247fbdbd 100644
--- a/src/test/test-condition-util.c
+++ b/src/test/test-condition-util.c
@@ -73,8 +73,8 @@ static void test_condition_test_host(void) {
static void test_condition_test_architecture(void) {
Condition *condition;
- Architecture a;
const char *sa;
+ int a;
a = uname_architecture();
assert_se(a >= 0);
@@ -87,7 +87,7 @@ static void test_condition_test_architecture(void) {
condition_free(condition);
condition = condition_new(CONDITION_ARCHITECTURE, "garbage value", false, false);
- assert_se(!condition_test_architecture(condition));
+ assert_se(condition_test_architecture(condition) < 0);
condition_free(condition);
condition = condition_new(CONDITION_ARCHITECTURE, sa, false, true);