\hypertarget{autotoc_md436_src_plugins_mmapstorage_shelltests_md}{}\section{Additional shell tests for mmapstorage}\label{autotoc_md436_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.\hypertarget{autotoc_md436_autotoc_md437}{}\section{Test kdb export \& import (stat\+: pipe size known)}\label{autotoc_md436_autotoc_md437}
``` \hypertarget{autotoc_md436_autotoc_md438}{}\section{Make temp file}\label{autotoc_md436_autotoc_md438}
kdb set system/tests/mmaptempfile \hypertarget{autotoc_md436_autotoc_md439}{}\section{Mount mmapstorage to `user/tests/mmapstorage`}\label{autotoc_md436_autotoc_md439}
sudo kdb mount config.\+mmap user/tests/mmapstorage mmapstorage\hypertarget{autotoc_md436_autotoc_md440}{}\section{Add some values via `kdb set`}\label{autotoc_md436_autotoc_md440}
kdb set user/tests/mmapstorage/test1 test1 kdb set user/tests/mmapstorage/test2 test2 kdb set user/tests/mmapstorage/test1/test3 test3\hypertarget{autotoc_md436_autotoc_md441}{}\section{List the configuration tree below `user/tests/mmapstorage`}\label{autotoc_md436_autotoc_md441}
kdb ls user/tests/mmapstorage \#$>$ user/tests/mmapstorage/test1 \#$>$ user/tests/mmapstorage/test1/test3 \#$>$ user/tests/mmapstorage/test2\hypertarget{autotoc_md436_autotoc_md442}{}\section{Retrieve the new values}\label{autotoc_md436_autotoc_md442}
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)\hypertarget{autotoc_md436_autotoc_md443}{}\section{List the configuration tree below `user/tests/mmapstorage`}\label{autotoc_md436_autotoc_md443}
kdb ls user/tests/mmapstorage \#$>$ user/tests/mmapstorage/test1 \#$>$ user/tests/mmapstorage/test1/test3 \#$>$ user/tests/mmapstorage/test2\hypertarget{autotoc_md436_autotoc_md444}{}\section{Retrieve the new values}\label{autotoc_md436_autotoc_md444}
kdb get user/tests/mmapstorage/test1 \#$>$ test1 kdb get user/tests/mmapstorage/test2 \#$>$ test2 kdb get user/tests/mmapstorage/test1/test3 \#$>$ test3\hypertarget{autotoc_md436_autotoc_md445}{}\section{Undo modifications to the database}\label{autotoc_md436_autotoc_md445}
kdb rm -\/r user/tests/mmapstorage\hypertarget{autotoc_md436_autotoc_md446}{}\section{Unmount mmapstorage}\label{autotoc_md436_autotoc_md446}
sudo kdb umount user/tests/mmapstorage\hypertarget{autotoc_md436_autotoc_md447}{}\section{Remove temp file}\label{autotoc_md436_autotoc_md447}
rm \$(kdb get system/tests/mmaptempfile) kdb rm -\/r system/tests/mmaptempfile 
\begin{DoxyCode}
# Test kdb export & import (stat: pipe size unknown)
\end{DoxyCode}
 \hypertarget{autotoc_md436_autotoc_md448}{}\section{Make temp file}\label{autotoc_md436_autotoc_md448}
kdb set system/tests/mmaptempfile \hypertarget{autotoc_md436_autotoc_md449}{}\section{Mount mmapstorage to `user/tests/mmapstorage`}\label{autotoc_md436_autotoc_md449}
sudo kdb mount config.\+mmap user/tests/mmapstorage mmapstorage\hypertarget{autotoc_md436_autotoc_md450}{}\section{Add some values via `kdb set`}\label{autotoc_md436_autotoc_md450}
kdb set user/tests/mmapstorage/test1 test1 kdb set user/tests/mmapstorage/test2 test2 kdb set user/tests/mmapstorage/test1/test3 test3\hypertarget{autotoc_md436_autotoc_md451}{}\section{List the configuration tree below `user/tests/mmapstorage`}\label{autotoc_md436_autotoc_md451}
kdb ls user/tests/mmapstorage \#$>$ user/tests/mmapstorage/test1 \#$>$ user/tests/mmapstorage/test1/test3 \#$>$ user/tests/mmapstorage/test2\hypertarget{autotoc_md436_autotoc_md452}{}\section{Retrieve the new values}\label{autotoc_md436_autotoc_md452}
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\hypertarget{autotoc_md436_autotoc_md453}{}\section{List the configuration tree below `user/tests/mmapstorage`}\label{autotoc_md436_autotoc_md453}
kdb ls user/tests/mmapstorage \#$>$ user/tests/mmapstorage/test1 \#$>$ user/tests/mmapstorage/test1/test3 \#$>$ user/tests/mmapstorage/test2\hypertarget{autotoc_md436_autotoc_md454}{}\section{Retrieve the new values}\label{autotoc_md436_autotoc_md454}
kdb get user/tests/mmapstorage/test1 \#$>$ test1 kdb get user/tests/mmapstorage/test2 \#$>$ test2 kdb get user/tests/mmapstorage/test1/test3 \#$>$ test3\hypertarget{autotoc_md436_autotoc_md455}{}\section{Undo modifications to the database}\label{autotoc_md436_autotoc_md455}
kdb rm -\/r user/tests/mmapstorage\hypertarget{autotoc_md436_autotoc_md456}{}\section{Unmount mmapstorage}\label{autotoc_md436_autotoc_md456}
sudo kdb umount user/tests/mmapstorage\hypertarget{autotoc_md436_autotoc_md457}{}\section{Remove temp file}\label{autotoc_md436_autotoc_md457}
rm \$(kdb get system/tests/mmaptempfile) kdb rm -\/r system/tests/mmaptempfile ``` 