\hypertarget{md_src_plugins_mmapstorage_shelltests_src_plugins_mmapstorage_shelltests_md}{}\section{Additional shell tests for mmapstorage}\label{md_src_plugins_mmapstorage_shelltests_src_plugins_mmapstorage_shelltests_md}
This file contains important shell tests for mmapstorage which do not fit well into the plugin R\+E\+A\+D\+ME.

\section*{Test kdb export \& import (stat\+: pipe size known)}

``` \section*{Make temp file}

kdb set system/tests/mmaptempfile 

\section*{Mount mmapstorage to {\ttfamily user/tests/mmapstorage}}

sudo kdb mount config.\+mmap user/tests/mmapstorage mmapstorage

\section*{Add some values via {\ttfamily kdb set}}

kdb set user/tests/mmapstorage/test1 test1 kdb set user/tests/mmapstorage/test2 test2 kdb set user/tests/mmapstorage/test1/test3 test3

\section*{List the configuration tree below {\ttfamily user/tests/mmapstorage}}

kdb ls user/tests/mmapstorage \#$>$ user/tests/mmapstorage/test1 \#$>$ user/tests/mmapstorage/test1/test3 \#$>$ user/tests/mmapstorage/test2

\section*{Retrieve the new values}

kdb get user/tests/mmapstorage/test1 \#$>$ test1 kdb get user/tests/mmapstorage/test2 \#$>$ test2 kdb get user/tests/mmapstorage/test1/test3 \#$>$ test3

kdb export user/tests/mmapstorage mmapstorage $>$ \$(kdb get system/tests/mmaptempfile) kdb rm -\/r user/tests/mmapstorage

kdb ls user/tests/mmapstorage \#$>$

kdb import user/tests/mmapstorage mmapstorage $<$ \$(kdb get system/tests/mmaptempfile)

\section*{List the configuration tree below {\ttfamily user/tests/mmapstorage}}

kdb ls user/tests/mmapstorage \#$>$ user/tests/mmapstorage/test1 \#$>$ user/tests/mmapstorage/test1/test3 \#$>$ user/tests/mmapstorage/test2

\section*{Retrieve the new values}

kdb get user/tests/mmapstorage/test1 \#$>$ test1 kdb get user/tests/mmapstorage/test2 \#$>$ test2 kdb get user/tests/mmapstorage/test1/test3 \#$>$ test3

\section*{Undo modifications to the database}

kdb rm -\/r user/tests/mmapstorage

\section*{Unmount mmapstorage}

sudo kdb umount user/tests/mmapstorage

\section*{Remove temp file}

rm \$(kdb get system/tests/mmaptempfile) kdb rm -\/r system/tests/mmaptempfile 
\begin{DoxyCode}
# Test kdb export & import (stat: pipe size unknown)
\end{DoxyCode}
 \section*{Make temp file}

kdb set system/tests/mmaptempfile 

\section*{Mount mmapstorage to {\ttfamily user/tests/mmapstorage}}

sudo kdb mount config.\+mmap user/tests/mmapstorage mmapstorage

\section*{Add some values via {\ttfamily kdb set}}

kdb set user/tests/mmapstorage/test1 test1 kdb set user/tests/mmapstorage/test2 test2 kdb set user/tests/mmapstorage/test1/test3 test3

\section*{List the configuration tree below {\ttfamily user/tests/mmapstorage}}

kdb ls user/tests/mmapstorage \#$>$ user/tests/mmapstorage/test1 \#$>$ user/tests/mmapstorage/test1/test3 \#$>$ user/tests/mmapstorage/test2

\section*{Retrieve the new values}

kdb get user/tests/mmapstorage/test1 \#$>$ test1 kdb get user/tests/mmapstorage/test2 \#$>$ test2 kdb get user/tests/mmapstorage/test1/test3 \#$>$ test3

kdb export user/tests/mmapstorage mmapstorage $>$ \$(kdb get system/tests/mmaptempfile) kdb rm -\/r user/tests/mmapstorage

kdb ls user/tests/mmapstorage \#$>$

cat \$(kdb get system/tests/mmaptempfile) $\vert$ kdb import user/tests/mmapstorage mmapstorage

\section*{List the configuration tree below {\ttfamily user/tests/mmapstorage}}

kdb ls user/tests/mmapstorage \#$>$ user/tests/mmapstorage/test1 \#$>$ user/tests/mmapstorage/test1/test3 \#$>$ user/tests/mmapstorage/test2

\section*{Retrieve the new values}

kdb get user/tests/mmapstorage/test1 \#$>$ test1 kdb get user/tests/mmapstorage/test2 \#$>$ test2 kdb get user/tests/mmapstorage/test1/test3 \#$>$ test3

\section*{Undo modifications to the database}

kdb rm -\/r user/tests/mmapstorage

\section*{Unmount mmapstorage}

sudo kdb umount user/tests/mmapstorage

\section*{Remove temp file}

rm \$(kdb get system/tests/mmaptempfile) kdb rm -\/r system/tests/mmaptempfile ``` 