\hypertarget{autotoc_md413_src_plugins_mmapstorage_shelltests_md}{}\section{Additional shell tests for mmapstorage}\label{autotoc_md413_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_md413_autotoc_md414}{}\section{Test kdb export \& import (stat\+: pipe size known)}\label{autotoc_md413_autotoc_md414}
``` \hypertarget{autotoc_md413_autotoc_md415}{}\section{Make temp file}\label{autotoc_md413_autotoc_md415}
kdb set system/tests/mmaptempfile \hypertarget{autotoc_md413_autotoc_md416}{}\section{Mount mmapstorage to `user/tests/mmapstorage`}\label{autotoc_md413_autotoc_md416}
sudo kdb mount config.\+mmap user/tests/mmapstorage mmapstorage\hypertarget{autotoc_md413_autotoc_md417}{}\section{Add some values via `kdb set`}\label{autotoc_md413_autotoc_md417}
kdb set user/tests/mmapstorage/test1 test1 kdb set user/tests/mmapstorage/test2 test2 kdb set user/tests/mmapstorage/test1/test3 test3\hypertarget{autotoc_md413_autotoc_md418}{}\section{List the configuration tree below `user/tests/mmapstorage`}\label{autotoc_md413_autotoc_md418}
kdb ls user/tests/mmapstorage \#$>$ user/tests/mmapstorage/test1 \#$>$ user/tests/mmapstorage/test1/test3 \#$>$ user/tests/mmapstorage/test2\hypertarget{autotoc_md413_autotoc_md419}{}\section{Retrieve the new values}\label{autotoc_md413_autotoc_md419}
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_md413_autotoc_md420}{}\section{List the configuration tree below `user/tests/mmapstorage`}\label{autotoc_md413_autotoc_md420}
kdb ls user/tests/mmapstorage \#$>$ user/tests/mmapstorage/test1 \#$>$ user/tests/mmapstorage/test1/test3 \#$>$ user/tests/mmapstorage/test2\hypertarget{autotoc_md413_autotoc_md421}{}\section{Retrieve the new values}\label{autotoc_md413_autotoc_md421}
kdb get user/tests/mmapstorage/test1 \#$>$ test1 kdb get user/tests/mmapstorage/test2 \#$>$ test2 kdb get user/tests/mmapstorage/test1/test3 \#$>$ test3\hypertarget{autotoc_md413_autotoc_md422}{}\section{Undo modifications to the database}\label{autotoc_md413_autotoc_md422}
kdb rm -\/r user/tests/mmapstorage\hypertarget{autotoc_md413_autotoc_md423}{}\section{Unmount mmapstorage}\label{autotoc_md413_autotoc_md423}
sudo kdb umount user/tests/mmapstorage\hypertarget{autotoc_md413_autotoc_md424}{}\section{Remove temp file}\label{autotoc_md413_autotoc_md424}
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_md413_autotoc_md425}{}\section{Make temp file}\label{autotoc_md413_autotoc_md425}
kdb set system/tests/mmaptempfile \hypertarget{autotoc_md413_autotoc_md426}{}\section{Mount mmapstorage to `user/tests/mmapstorage`}\label{autotoc_md413_autotoc_md426}
sudo kdb mount config.\+mmap user/tests/mmapstorage mmapstorage\hypertarget{autotoc_md413_autotoc_md427}{}\section{Add some values via `kdb set`}\label{autotoc_md413_autotoc_md427}
kdb set user/tests/mmapstorage/test1 test1 kdb set user/tests/mmapstorage/test2 test2 kdb set user/tests/mmapstorage/test1/test3 test3\hypertarget{autotoc_md413_autotoc_md428}{}\section{List the configuration tree below `user/tests/mmapstorage`}\label{autotoc_md413_autotoc_md428}
kdb ls user/tests/mmapstorage \#$>$ user/tests/mmapstorage/test1 \#$>$ user/tests/mmapstorage/test1/test3 \#$>$ user/tests/mmapstorage/test2\hypertarget{autotoc_md413_autotoc_md429}{}\section{Retrieve the new values}\label{autotoc_md413_autotoc_md429}
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_md413_autotoc_md430}{}\section{List the configuration tree below `user/tests/mmapstorage`}\label{autotoc_md413_autotoc_md430}
kdb ls user/tests/mmapstorage \#$>$ user/tests/mmapstorage/test1 \#$>$ user/tests/mmapstorage/test1/test3 \#$>$ user/tests/mmapstorage/test2\hypertarget{autotoc_md413_autotoc_md431}{}\section{Retrieve the new values}\label{autotoc_md413_autotoc_md431}
kdb get user/tests/mmapstorage/test1 \#$>$ test1 kdb get user/tests/mmapstorage/test2 \#$>$ test2 kdb get user/tests/mmapstorage/test1/test3 \#$>$ test3\hypertarget{autotoc_md413_autotoc_md432}{}\section{Undo modifications to the database}\label{autotoc_md413_autotoc_md432}
kdb rm -\/r user/tests/mmapstorage\hypertarget{autotoc_md413_autotoc_md433}{}\section{Unmount mmapstorage}\label{autotoc_md413_autotoc_md433}
sudo kdb umount user/tests/mmapstorage\hypertarget{autotoc_md413_autotoc_md434}{}\section{Remove temp file}\label{autotoc_md413_autotoc_md434}
rm \$(kdb get system/tests/mmaptempfile) kdb rm -\/r system/tests/mmaptempfile ``` 