From edcc631220c7c8e244820d2651f537ff1f829c7a Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Mon, 3 Apr 2017 15:08:27 +0530 Subject: [PATCH 5/6] tests: t9041: Fix expectation of 'rm' on mounted partitions Removing a mounted partition only fails in non-script mode. Signed-off-by: Sunil Mohan Adapa --- tests/t9041-undetected-in-use-16th-partition.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/t9041-undetected-in-use-16th-partition.sh b/tests/t9041-undetected-in-use-16th-partition.sh index 673e508..8ba3fe0 100644 --- a/tests/t9041-undetected-in-use-16th-partition.sh +++ b/tests/t9041-undetected-in-use-16th-partition.sh @@ -85,10 +85,11 @@ for part_dev in $partitions; do mount "$part_dev" "$mount_point" || fail=1 # Removal of mounted partition must fail. - parted -s $scsi_dev rm $n > out 2>&1 && fail=1 + parted $scsi_dev rm $n < /dev/null > out 2>&1 && fail=1 - echo "Warning: Partition $part_dev is being used." \ - 'Are you sure you want to continue?' \ + echo -n "Warning: Partition $part_dev is being used." \ + 'Are you sure you want to continue? + ' \ > exp-error || framework_failure_ # expect error -- 2.11.0