forked from woqidaideshi/openruyi-autotest
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
04b440f19e |
@@ -1,12 +1,14 @@
|
||||
summary: Functional test - LTP - kernel_misc - zram01
|
||||
framework: beakerlib
|
||||
test: ./test.sh
|
||||
tag:
|
||||
- functional
|
||||
- ltp
|
||||
- kernel_misc
|
||||
duration: 30m
|
||||
duration: 60m
|
||||
tier: 1
|
||||
path: /tests/functional/ltp/kernel_misc/test_ltp_kernel_misc_zram01
|
||||
require:
|
||||
- ltp
|
||||
- beakerlib
|
||||
- ntfs-3g
|
||||
|
||||
@@ -11,6 +11,13 @@ rlJournalStart
|
||||
ltpSetup
|
||||
TmpDir=$(mktemp -d)
|
||||
rlRun "cd $TmpDir" 0 "Enter temporary test directory"
|
||||
# LTP zram01 maps ntfs3 to mkfs.ntfs but formats with mkfs.ntfs3
|
||||
if ! command -v mkfs.ntfs3 >/dev/null 2>&1 && command -v mkfs.ntfs >/dev/null 2>&1; then
|
||||
ShimDir=$(mktemp -d)
|
||||
ln -s "$(command -v mkfs.ntfs)" "$ShimDir/mkfs.ntfs3"
|
||||
PATH="$ShimDir:$PATH"
|
||||
export PATH
|
||||
fi
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "LTP kernel_misc - zram01"
|
||||
@@ -20,6 +27,7 @@ rlJournalStart
|
||||
rlPhaseStartCleanup "Clean up test environment"
|
||||
rlRun "cd /" 0 "Leave test directory"
|
||||
[ -n "$TmpDir" ] && [ -d "$TmpDir" ] && rlRun "rm -rf $TmpDir" 0 "Cleanup"
|
||||
[ -n "$ShimDir" ] && [ -d "$ShimDir" ] && rlRun "rm -rf $ShimDir" 0 "Remove mkfs shim"
|
||||
# LTP Package managed by lib.sh 's reference counting auto-uninstall
|
||||
rlPhaseEnd
|
||||
|
||||
|
||||
Reference in New Issue
Block a user