diff options
author | koverstreet <kent.overstreet@gmail.com> | 2020-12-01 15:13:43 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-01 15:13:43 -0500 |
commit | 92b2d975a3e246dfb48be9dd7ae8295a060617f6 (patch) | |
tree | c5106177b35ef89961512629d1fe183ffb61cb0c /lib/libktest.sh | |
parent | be16039bc15efc17e9dbd152b1b6ddb471ff9408 (diff) | |
parent | 328c14de21d48b5b6ee74a376c18f9e0400ca751 (diff) |
Merge pull request #10 from zenglg/master
make bcache tests run
Diffstat (limited to 'lib/libktest.sh')
-rw-r--r-- | lib/libktest.sh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/libktest.sh b/lib/libktest.sh index 7181ff8..5573f3c 100644 --- a/lib/libktest.sh +++ b/lib/libktest.sh @@ -383,7 +383,15 @@ start_vm() qemu_pmem mem-path="$file",size=$size done - set|grep -vE '^[A-Z]' > "$ktest_tmp/env" + set > "$ktest_tmp/env_tmp" + readonly_variables="$(readonly | cut -d= -f1 | cut -d' ' -f3)" + for variable in ${readonly_variables} + do + grep -v "${variable}" "$ktest_tmp/env_tmp" > "$ktest_tmp/env" + cp "$ktest_tmp/env" "$ktest_tmp/env_tmp" + done + sed -i "s/^ ;$//g" "$ktest_tmp/env" + rm -rf "$ktest_tmp/env_tmp" set +o errexit |