From d8be43e39ad532a15db143c93e78029f075e3658 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Wed, 22 Feb 2023 16:27:47 -0800 Subject: [PATCH] qa/.../osd-scrub-test.sh: don't use /etc/fstab to corrupt the data Generally, it's more portable not to rely on specific system files to be readable. Specifically, container environments may not have an fstab. Instead, just generate another random file. Signed-off-by: Samuel Just --- qa/standalone/scrub/osd-scrub-test.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qa/standalone/scrub/osd-scrub-test.sh b/qa/standalone/scrub/osd-scrub-test.sh index d9e11be9bd2..c88e0bec1e0 100755 --- a/qa/standalone/scrub/osd-scrub-test.sh +++ b/qa/standalone/scrub/osd-scrub-test.sh @@ -75,7 +75,10 @@ function TEST_scrub_test() { local anotherosd="2" fi - objectstore_tool $dir $anotherosd obj1 set-bytes /etc/fstab + CORRUPT_DATA="corrupt-data.$$" + dd if=/dev/urandom of=$CORRUPT_DATA bs=512 count=1 + objectstore_tool $dir $anotherosd obj1 set-bytes $CORRUPT_DATA + rm -f $CORRUPT_DATA local pgid="${poolid}.0" pg_deep_scrub "$pgid" || return 1 -- 2.39.5