Skip to contentSkip to conversation

btrfs-progs: tests: 001-simple-unmounted: fix test failure due to bashism

PATCH Applied Luis Henriques 2 participants 2 messages Jun 25, 2016 – Jul 4, 2016 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 btrfs-progs: tests: 001-simple-unmounted: fix test failure due to bashism

The usage of 'source' is a bashism, and '.' should be used instead. This is causing fuzz-tests/001-simple-unmounted to fail in systems where /bin/sh isn't bash:

[TEST/fuzz] 001-simple-unmounted
./test.sh: 5: ./test.sh: source: not found ./test.sh: 7: ./test.sh: setup_root_helper: not found ./test.sh: 8: ./test.sh: check_prereq: not found ./test.sh: 18: ./test.sh: check_all_images: not found

Since most (all?) tests actually use /bin/bash, change this test to use bash too.

---
 tests/fuzz-tests/001-simple-unmounted/test.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/fuzz-tests/001-simple-unmounted/test.sh +1 -1
index bf01a3a45a96..98fe7b0ccb74 100755
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 # iterate over all fuzzed images and run 'btrfs check'
 
Applied
#1 lore raw
Quoted 10 lines · Luis Henriques

The usage of 'source' is a bashism, and '.' should be used instead. This is causing fuzz-tests/001-simple-unmounted to fail in systems where /bin/sh isn't bash:

[TEST/fuzz] 001-simple-unmounted
./test.sh: 5: ./test.sh: source: not found ./test.sh: 7: ./test.sh: setup_root_helper: not found ./test.sh: 8: ./test.sh: check_prereq: not found ./test.sh: 18: ./test.sh: check_all_images: not found

Quoted 4 lines

Since most (all?) tests actually use /bin/bash, change this test to use bash too.

Applied, thanks.