Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
rlimit_test/rlimit_test.sh
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executable file
21 lines (14 sloc)
651 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
set -xe | |
if [ -z "$MXQ_JOBID" ]; then | |
ulimit -d $((5*1024*1024)) # 5 GB | |
fi | |
fallocate -l $((10*1024*1024*1024)) $TMPDIR/file.dat | |
if ./test_malloc $((4*1024*1024*1024)); then echo OK; else echo FAIL; fi | |
if ./test_malloc $((6*1024*1024*1024)); then echo FAIL; else echo OK; fi | |
if ./map_file ro $TMPDIR/file.dat; then echo OK; else echo FAIL; fi | |
if ./map_file rw $TMPDIR/file.dat; then echo OK; else echo FAIL; fi | |
#./test_malloc $((4*1024*1024*1024)) & | |
#./test_malloc $((4*1024*1024*1024)) & | |
#wait # expect mxqd to kill us here over memory | |
#./test_malloc_fork $((4*1024*1024*1024)) # expect mxqd to kill us here over memory |