<div dir="ltr"><div>This small patch passes auto-dedup option also to page-server</div><div><br></div><div>Signed-off-by: Tikhomirov Pavel <<a href="mailto:snorcht@gmail.com">snorcht@gmail.com</a>><br></div><div><br>
</div><div>diff --git a/test/zdtm.sh b/test/zdtm.sh</div><div>index d9b351d..2403ada 100755</div><div>--- a/test/zdtm.sh</div><div>+++ b/test/zdtm.sh</div><div>@@ -462,6 +462,7 @@ EOF</div><div> </div><div> if [ -n "$AUTO_DEDUP" ]; then</div>
<div> args="$args --auto-dedup"</div><div>+ ps_args="--auto-dedup"</div><div> fi</div><div> </div><div> for i in `seq $ITERATIONS`; do</div><div>@@ -476,7 +477,7 @@ EOF</div>
<div> [ -n "$DUMP_ONLY" ] && dump_only=1</div><div> </div><div> if [ $PAGE_SERVER -eq 1 ]; then</div><div>- $CRIU page-server -D $ddump -o page_server.log -v4 --port</div>
<div>+ $CRIU page-server -D $ddump -o page_server.log -v4 --port</div><div> ps_pid=`lsof -s TCP:LISTEN -i :$PS_PORT -t`</div><div> ps -p "$ps_pid" -o cmd h | grep -q page-server || {</div>
<div> echo "Unable to determing PID of page-server"</div></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr"><br>Best Regards, Tikhomirov Pavel.</div></div>
<br><br><div class="gmail_quote">2014-03-07 11:24 GMT+04:00 Tikhomirov Pavel <span dir="ltr"><<a href="mailto:snorcht@gmail.com" target="_blank">snorcht@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
if new size of image is zero than dedup works<br>
<br>
use :<br>
bash test/zdtm.sh -A static/maps04<br>
bash test/zdtm.sh -P -i 3 -A -t transition/maps007<br>
<br>
changes: aplicable for all tests, -ad changed to --auto-dedup,<br>
simplify, check all(and only) private pages files.<br>
<br>
Signed-off-by: Tikhomirov Pavel <<a href="mailto:snorcht@gmail.com">snorcht@gmail.com</a>><br>
---<br>
test/zdtm.sh | 23 +++++++++++++++++++++++<br>
1 file changed, 23 insertions(+)<br>
<br>
diff --git a/test/zdtm.sh b/test/zdtm.sh<br>
index ac6b974..75f6ef6 100755<br>
--- a/test/zdtm.sh<br>
+++ b/test/zdtm.sh<br>
@@ -460,6 +460,10 @@ EOF<br>
args="$args -L `pwd`/$tdir/lib"<br>
fi<br>
<br>
+ if [ -n "$AUTO_DEDUP" ]; then<br>
+ args="$args --auto-dedup"<br>
+ fi<br>
+<br>
for i in `seq $ITERATIONS`; do<br>
local dump_only=<br>
local postdump=<br>
@@ -586,6 +590,20 @@ EOF<br>
[ $sltime -lt 9 ] && sltime=$((sltime+1))<br>
done<br>
<br>
+ if [ -n "$AUTO_DEDUP" ]; then<br>
+ for pagemap in $ddump/pagemap-[0-9]*.img; do<br>
+ img_index=$($CRIU show -f $pagemap | grep 'pages_id:' | cut -f 2 -d : -s)<br>
+ img_index=$((img_index))<br>
+ echo "Check $img_index image"<br>
+ size=$(du -sh -BK "$ddump/pages-$img_index.img" | grep -Eo '[0-9]+' | head -1)<br>
+ echo "Size of pages dump is $size"<br>
+ if [ "$size" -ne 0 ]; then<br>
+ echo "Check: $test, Auto-dedup: image size is more than 0"<br>
+ return 2<br>
+ fi<br>
+ done<br>
+ fi<br>
+<br>
cat $test.out<br>
cat $test.out | grep -q PASS || return 2<br>
[ "$CLEANUP" -ne 0 ] && rm -rf `dirname $ddump`<br>
@@ -681,6 +699,7 @@ Options:<br>
-v : Verbose mode<br>
-P : Make pre-dump instead of dump on all iterations except the last one<br>
-s : Make iterative snapshots. Only the last one will be checked.<br>
+ --auto-dedup : Make auto-dedup on restore. Check sizes of pages imges, it must be zero.<br>
EOF<br>
}<br>
<br>
@@ -755,6 +774,10 @@ while :; do<br>
SNAPSHOT=1<br>
shift<br>
;;<br>
+ --auto-dedup)<br>
+ AUTO_DEDUP=1<br>
+ shift<br>
+ ;;<br>
-g)<br>
COMPILE_ONLY=1<br>
shift<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.8.3.2<br>
<br>
</font></span></blockquote></div><br></div>