\hypertarget{autotoc_md463_src_plugins_mmapstorage_shelltests_md}{}\section{Additional shell tests for mmapstorage}\label{autotoc_md463_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_md463_autotoc_md464}{}\section{Test kdb export \& import (stat\+: pipe size known)}\label{autotoc_md463_autotoc_md464}
``` \hypertarget{autotoc_md463_autotoc_md465}{}\section{Make temp file}\label{autotoc_md463_autotoc_md465}
kdb set system/tests/mmaptempfile \hypertarget{autotoc_md463_autotoc_md466}{}\section{Mount mmapstorage to `user/tests/mmapstorage`}\label{autotoc_md463_autotoc_md466}
sudo kdb mount config.\+mmap user/tests/mmapstorage mmapstorage\hypertarget{autotoc_md463_autotoc_md467}{}\section{Add some values via `kdb set`}\label{autotoc_md463_autotoc_md467}
kdb set user/tests/mmapstorage/test1 test1 kdb set user/tests/mmapstorage/test2 test2 kdb set user/tests/mmapstorage/test1/test3 test3\hypertarget{autotoc_md463_autotoc_md468}{}\section{List the configuration tree below `user/tests/mmapstorage`}\label{autotoc_md463_autotoc_md468}
kdb ls user/tests/mmapstorage \#$>$ user/tests/mmapstorage/test1 \#$>$ user/tests/mmapstorage/test1/test3 \#$>$ user/tests/mmapstorage/test2\hypertarget{autotoc_md463_autotoc_md469}{}\section{Retrieve the new values}\label{autotoc_md463_autotoc_md469}
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_md463_autotoc_md470}{}\section{List the configuration tree below `user/tests/mmapstorage`}\label{autotoc_md463_autotoc_md470}
kdb ls user/tests/mmapstorage \#$>$ user/tests/mmapstorage/test1 \#$>$ user/tests/mmapstorage/test1/test3 \#$>$ user/tests/mmapstorage/test2\hypertarget{autotoc_md463_autotoc_md471}{}\section{Retrieve the new values}\label{autotoc_md463_autotoc_md471}
kdb get user/tests/mmapstorage/test1 \#$>$ test1 kdb get user/tests/mmapstorage/test2 \#$>$ test2 kdb get user/tests/mmapstorage/test1/test3 \#$>$ test3\hypertarget{autotoc_md463_autotoc_md472}{}\section{Undo modifications to the database}\label{autotoc_md463_autotoc_md472}
kdb rm -\/r user/tests/mmapstorage\hypertarget{autotoc_md463_autotoc_md473}{}\section{Unmount mmapstorage}\label{autotoc_md463_autotoc_md473}
sudo kdb umount user/tests/mmapstorage\hypertarget{autotoc_md463_autotoc_md474}{}\section{Remove temp file}\label{autotoc_md463_autotoc_md474}
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_md463_autotoc_md475}{}\section{Make temp file}\label{autotoc_md463_autotoc_md475}
kdb set system/tests/mmaptempfile \hypertarget{autotoc_md463_autotoc_md476}{}\section{Mount mmapstorage to `user/tests/mmapstorage`}\label{autotoc_md463_autotoc_md476}
sudo kdb mount config.\+mmap user/tests/mmapstorage mmapstorage\hypertarget{autotoc_md463_autotoc_md477}{}\section{Add some values via `kdb set`}\label{autotoc_md463_autotoc_md477}
kdb set user/tests/mmapstorage/test1 test1 kdb set user/tests/mmapstorage/test2 test2 kdb set user/tests/mmapstorage/test1/test3 test3\hypertarget{autotoc_md463_autotoc_md478}{}\section{List the configuration tree below `user/tests/mmapstorage`}\label{autotoc_md463_autotoc_md478}
kdb ls user/tests/mmapstorage \#$>$ user/tests/mmapstorage/test1 \#$>$ user/tests/mmapstorage/test1/test3 \#$>$ user/tests/mmapstorage/test2\hypertarget{autotoc_md463_autotoc_md479}{}\section{Retrieve the new values}\label{autotoc_md463_autotoc_md479}
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_md463_autotoc_md480}{}\section{List the configuration tree below `user/tests/mmapstorage`}\label{autotoc_md463_autotoc_md480}
kdb ls user/tests/mmapstorage \#$>$ user/tests/mmapstorage/test1 \#$>$ user/tests/mmapstorage/test1/test3 \#$>$ user/tests/mmapstorage/test2\hypertarget{autotoc_md463_autotoc_md481}{}\section{Retrieve the new values}\label{autotoc_md463_autotoc_md481}
kdb get user/tests/mmapstorage/test1 \#$>$ test1 kdb get user/tests/mmapstorage/test2 \#$>$ test2 kdb get user/tests/mmapstorage/test1/test3 \#$>$ test3\hypertarget{autotoc_md463_autotoc_md482}{}\section{Undo modifications to the database}\label{autotoc_md463_autotoc_md482}
kdb rm -\/r user/tests/mmapstorage\hypertarget{autotoc_md463_autotoc_md483}{}\section{Unmount mmapstorage}\label{autotoc_md463_autotoc_md483}
sudo kdb umount user/tests/mmapstorage\hypertarget{autotoc_md463_autotoc_md484}{}\section{Remove temp file}\label{autotoc_md463_autotoc_md484}
rm \$(kdb get system/tests/mmaptempfile) kdb rm -\/r system/tests/mmaptempfile ``` 