1#!/bin/sh 2 3# Torture test: run update and delete ${1-10000}perations in 4# parallel processes. None should remain. 5 6set -e 7 8rm -f foo.lmdb 9./dict_cache <<EOF 10lmdb_map_size 20000 11cache lmdb:foo 12EOF 13 14(./dict_cache <<EOF 15cache lmdb:foo 16update x ${1-10000} 17run 18update y ${1-10000} 19delete x ${1-10000} 20run 21delete y ${1-10000} 22run 23EOF 24) & 25 26(./dict_cache <<EOF 27cache lmdb:foo 28update a ${1-10000} 29run 30update b ${1-10000} 31delete a ${1-10000} 32run 33delete b ${1-10000} 34run 35EOF 36) & 37 38wait 39 40../../bin/postmap -s lmdb:foo | diff /dev/null - 41 42rm -f foo.lmdb 43