From: Andres Lagar-Cavilla Subject: Xen paging unit test Date: Mon, 10 Sep 2012 10:08:20 -0400 Message-ID: <08A8CD72-BB08-4178-945D-90C588A78F14@gridcentric.ca> Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel , Konrad Rzeszutek Wilk , Ian Campbell , Olaf Hering , Tim Deegan List-Id: xen-devel@lists.xenproject.org Hi, In the process of submitting the privcmd MMAP_BATCH_V2 patches for Linux 3.7, Konrad asked a very valid question: "How do you test this thing?" Turns out that you have two ways 1. You do the actual paging thing on a live domain 2. I had a unit test buried in my stash Coincidentally, Ian C asked for demonstrable consumers of the xenpaging interface in the process of summarizing the 4.2 change log. I've github'ed my paging unit test in the hopes it will be found useful, not only as a unit test, but also a demo/reference piece of code. The unit test exercises the privcmd/libxc interface for creating foreign mappings of paged out pages. As a precondition, it must create a domain, enable paging on it, and act as a pager to satisfy the page-in requests generated by the foreign maps. https://github.com/andreslagarcavilla/xenpagingtest This might be considered useful for tools/tests in xen-unstable, and I'll be happy to resubmit in a suitable form if you ask. Cheers Andres