[CRIU] [PATCH 2/2] test: crit: test json converter

Ruslan Kuprieiev kupruser at gmail.com
Mon Nov 3 15:42:34 PST 2014


Signed-off-by: Ruslan Kuprieiev <kupruser at gmail.com>
---
 test/crit/.gitignore | 1 +
 test/crit/Makefile   | 2 +-
 test/crit/test.sh    | 8 ++++++++
 3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/test/crit/.gitignore b/test/crit/.gitignore
index d589bec..9614eb6 100644
--- a/test/crit/.gitignore
+++ b/test/crit/.gitignore
@@ -2,3 +2,4 @@
 *.log
 *.txt
 stats-*
+*.json
diff --git a/test/crit/Makefile b/test/crit/Makefile
index 731c0e3..484b032 100644
--- a/test/crit/Makefile
+++ b/test/crit/Makefile
@@ -6,4 +6,4 @@ run: images
 	./test.sh
 
 clean:
-	rm -f *.img *.log *.txt stats-*
+	rm -f *.img *.log *.txt stats-* *.json
diff --git a/test/crit/test.sh b/test/crit/test.sh
index 1c12d07..202fce5 100755
--- a/test/crit/test.sh
+++ b/test/crit/test.sh
@@ -21,5 +21,13 @@ do
 	../../crit convert -i "$x"".txt" > "$x"".txt.img" || _exit $?
 	echo "  -- cmp"
 	cmp $x "$x"".txt.img" || _exit $?
+
+	echo "  -- to json"
+	../../crit convert -o "$x"".json" --format nice --type json -i $x || _exit $?
+	echo "  -- to img"
+	../../crit convert -i "$x"".json" -o "$x"".json.img" || _exit $?
+	echo "  -- cmp"
+	cmp $x "$x"".json.img" || _exit $?
+
 	echo "=== done"
 done
-- 
1.9.3



More information about the CRIU mailing list