diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 19:10:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 19:10:49 +0000 |
commit | cfe5e3905201349e9cf3f95d52ff4bd100bde37d (patch) | |
tree | d0baf160cbee3195249d095f85e52d20c21acf02 /tests/ts/lsmem/mk-input.sh | |
parent | Initial commit. (diff) | |
download | util-linux-cfe5e3905201349e9cf3f95d52ff4bd100bde37d.tar.xz util-linux-cfe5e3905201349e9cf3f95d52ff4bd100bde37d.zip |
Adding upstream version 2.39.3.upstream/2.39.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ts/lsmem/mk-input.sh')
-rwxr-xr-x | tests/ts/lsmem/mk-input.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/ts/lsmem/mk-input.sh b/tests/ts/lsmem/mk-input.sh new file mode 100755 index 0000000..bbdfff0 --- /dev/null +++ b/tests/ts/lsmem/mk-input.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# +# This script makes a copy of relevant files from /sys. +# The files are useful for lsmem(1) regression tests. +# +progname=$(basename $0) + +if [ -z "$1" ]; then + echo -e "\nusage: $progname <testname>\n" + exit 1 +fi + +TS_NAME="$1" +TS_DUMP="$TS_NAME" +CP="cp -r --parent" + +mkdir -p $TS_DUMP/sys/devices/system + +$CP /sys/devices/system/memory $TS_DUMP + +tar jcvf $TS_NAME.tar.bz2 $TS_DUMP +rm -rf $TS_DUMP |