OpenVZ Forum


Home » Mailing lists » Devel » [PATCH 2/2] cryo: minimal test program
[PATCH 2/2] cryo: minimal test program [message #30975] Wed, 11 June 2008 14:14
Benjamin Thery is currently offline  Benjamin Thery
Messages: 79
Registered: March 2007
Member
This is the dumb test program I managed to restart after I re-enabled
the checkpointing of thread area stuff.

Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
--
---
 tests/Makefile  |    2 +-
 tests/compute.c |   17 +++++++++++++++++
 2 files changed, 18 insertions(+), 1 deletion(-)

Index: cryodev/tests/Makefile
===================================================================
--- cryodev.orig/tests/Makefile
+++ cryodev/tests/Makefile
@@ -1,4 +1,4 @@
-TARGETS = sleep mksysvipc pause_asm
+TARGETS = sleep mksysvipc pause_asm compute
 
 CFLAGS = -static
 
Index: cryodev/tests/compute.c
===================================================================
--- /dev/null
+++ cryodev/tests/compute.c
@@ -0,0 +1,17 @@
+#include <stdio.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+int main()
+{
+	int i = 0;
+	double f = 0;
+
+	printf("Running as %d\n", getpid());
+	while (i<1000000000) {
+		f = i / 0.000234567;
+		if (i%10000000 == 0)
+			printf("i is %d (pid %d)\n", i, getpid());
+		i++;
+	}
+}

-- 
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
 
Read Message
Previous Topic: [RFC PATCH 3/5] mgmcg VM overcommit interface
Next Topic: [PATCH 0/2] cryo: Re-enable checkpointing of thread area
Goto Forum:
  


Current Time: Sun Aug 03 23:08:36 GMT 2025

Total time taken to generate the page: 1.62951 seconds