Page 1 of 1

[Nagios-devel] [PATCH] YES! test: build on machines with only one

Posted: Thu Aug 29, 2013 12:39 pm
by Guest
--047d7bdc192cc55e0504e5156f5b
Content-Type: multipart/alternative; boundary=047d7bdc192cc55dff04e5156f59

--047d7bdc192cc55dff04e5156f59
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

commit f0054ac856059183f6c7bc3f9e8a80965a8c0368 (HEAD, master)
Author: Mattias Ryrl=E9n
Date: Thu Aug 29 14:34:39 2013 +0200

YES! test: build on machines with only one cpu

There might be someone out there who still have only one cpu/core, let
those
build too.

Signed-off-by: Mattias Ryrl=E9n

diff --git a/lib/test-nsutils.c b/lib/test-nsutils.c
index 1a23ee1..f835d67 100644
--- a/lib/test-nsutils.c
+++ b/lib/test-nsutils.c
@@ -31,10 +31,10 @@ int main(int argc, char **argv)
asprintf(&s1, "arg varg foo %d", 12);
s2 =3D mkstr("arg varg foo %d", 12);
ok_str(s1, s2, "mkstr() must build proper strings");
- if (online_cpus() > 1) {
+ if (online_cpus() > 0) {
t_pass("%d online cpus detected", online_cpus());
} else {
- t_fail("Do you really have only one cpu core?");
+ t_fail("No online cpus detected");
}
return t_end();
}

--=20
V=E4nliga h=E4lsningar / Best Regards
Mattias Ryrl=E9n

__________________________
op5 AB
F=F6rsta L=E5nggatan 19
SE-413 27 G=F6teborg
Mobil: +46 735-17 70 99
Support: +46 31-774 09 24
www.op5.com

--047d7bdc192cc55dff04e5156f59
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

commit f0054ac856059183f6c7bc3f9e8a80965a8c0368 (HEAD=
, master)Author: Mattias Ryrl=E9n <[email protected]>Date: =A0 Thu Aug 29 14:34:39 =
2013 +0200
=A0 =A0 YES! test: build on machines with only one cpu=A0 =A0 There might be someone out there who still=
have only one cpu/core, let those=A0 =A0 build too.
=A0 =A0 Signed-off-by: Mattias Ryrl=E9n <[email protected]>diff --git a/li=
b/test-nsutils.c b/lib/test-nsutils.cindex 1a23ee1..f835d67 1006=
44
--- a/lib/test-nsutils.c+++ b/lib/test-nsutils.c=
@@ -31,10 +31,10 @@ int main(int argc, char **argv)=A0 =A0 =A0 =
=A0 asprintf(&s1, "arg varg foo %d", 12);=A0 =A0 =
=A0 =A0 s2 =3D mkstr("arg varg foo %d", 12);
=A0 =A0 =A0 =A0 ok_str(s1, s2, "mkstr() must build proper strings=
");- =A0 =A0 =A0 if (online_cpus() > 1) {+ =
=A0 =A0 =A0 if (online_cpus() > 0) {=A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 t_pass("%d online cpus detected", online_cpus());
=A0 =A0 =A0 =A0 } else {- =A0 =A0 =A0 =A0 =A0 =A0 =A0 t_fai=
l("Do you really have only one cpu core?");+ =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 t_fail("No online cpus detected");=
=A0 =A0 =A0 =A0 }=A0 =A0 =A0 =A0 return t_end();
=A0}-- V=E4nliga h=E4lsningar / Best RegardsMattias Ryrl=E9n__________________________op5 ABF=F6rsta=
L=E5nggatan 19SE-413 27 G=F6teborgMobil: +46 735-17 70 99Suppo=
rt: +46 31-774 09 24
www.op5.com


--047d7bdc192cc55dff04e5156f59--
--047d7bdc192cc55e0504e5156f5b
Content-Type: application/octet-stream;
name="0001-YES-test-build-on-machines-with-only-one-cpu.patch"
Content-Disposition: attachment;
filename="0001-YES-test-build-on-machines-with-only-one-cpu.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_hkxypf0d0

RnJvbSBmMDA1NGFjODU2MDU5MTgzZjZjN2JjM2Y5ZThhODA5NjVhOGMwMzY4IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiA9P1VURi04P3E/TWF0dGlhcz0yMFJ5cmw9QzM9QTluPz0gPG1h
dHRpYXNyQG9wNS5jb20+CkRhdGU6IFRodSwgMjkgQXVnIDIwMTMgMTQ6MzQ6MzkgKzAyMDAKU3Vi
amVjdDogW1BBVENIXSBZRVMhIHRlc3Q6IGJ1aWxkIG9uIG1hY2hpbmVzIHdpdGggb25seSBvbmUg
Y3B1Ck1JTUUtVmVyc2lvbjogMS4wCkNvbnRlbnQtVHlwZTogdGV4dC9wbGFpbjsgY2hh

...[email truncated]...


This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]