aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/vcs/testdata
diff options
context:
space:
mode:
authorMark Johnston <markjdb@gmail.com>2020-11-02 14:39:30 -0500
committerGitHub <noreply@github.com>2020-11-02 11:39:30 -0800
commit7f344fa6473fd40c7a5c006e5cb6a3017b4fc193 (patch)
tree2fa7f2d9cf783c7a09cc6c1b98aec37e16f8e2fb /pkg/vcs/testdata
parentf73622566ee98c1b4d780bf4ad28fbdbde4fdcaa (diff)
tools: add script to check shebang lines (#2234)
* pkg/vcs: remove obsolete test script Per Dmitry, this should have been removed as part of 8f58e4b ("pkg/bisect: switch to kconfig.Minimize"). * all: convert shebang lines to use /usr/bin/env * Makefile: fix non-portable use of find(1)
Diffstat (limited to 'pkg/vcs/testdata')
-rwxr-xr-xpkg/vcs/testdata/linux/config-bisect.pl53
-rwxr-xr-xpkg/vcs/testdata/linux/merge_config.sh2
2 files changed, 1 insertions, 54 deletions
diff --git a/pkg/vcs/testdata/linux/config-bisect.pl b/pkg/vcs/testdata/linux/config-bisect.pl
deleted file mode 100755
index 29a488e58..000000000
--- a/pkg/vcs/testdata/linux/config-bisect.pl
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/bin/bash
-# Copyright 2020 syzkaller project authors. All rights reserved.
-# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
-# config-bisect.pl -l ctx.git.dir -r -b ctx.git.dir kernelBaselineConfig kernelConfig
-
-set -eu
-
-if [ "$3" == "-r" ]
-then
- baseline=`cat $6`
- outdir=$5
- echo $baseline > $outdir/.config
- exit 0
-fi
-
-# config-bisect.pl -l ctx.git.dir -b ctx.git.dir kernelBaselineConfig kernelConfig verdict
-baseline=`cat $5`
-
-# Test baseline file contains string CONFIG_FAILING -> fail
-if [ "$baseline" == "CONFIG_FAILING=y" ]
-then
- exit 1
-fi
-
-# Generate end results which "reproduces" the crash
-if [ $baseline == "CONFIG_REPRODUCES_CRASH=y" ]
-then
- echo "%%%%%%%% FAILED TO FIND SINGLE BAD CONFIG %%%%%%%%"
- echo "Hmm, can't make any more changes without making good == bad?"
- echo "Difference between good (+) and bad (-)"
- echo "REPRODUCES_CRASH n -> y"
- echo "-DISABLED_OPTION=n"
- echo "+ONLY_IN_ORIGINAL_OPTION=y"
- echo "See good and bad configs for details:"
- echo "good: /mnt/work/config_bisect_evaluation/out/config_bisect/kernel.baseline_config.tmp"
- echo "bad: /mnt/work/config_bisect_evaluation/out/config_bisect/kernel.config.tmp"
- echo "%%%%%%%% FAILED TO FIND SINGLE BAD CONFIG %%%%%%%%"
- exit 2
-fi
-
-# Generate end result which doesn't "reproduce" the crash
-if [ $baseline == "CONFIG_NOT_REPRODUCE_CRASH=y" ]
-then
- echo "%%%%%%%% FAILED TO FIND SINGLE BAD CONFIG %%%%%%%%"
- echo "Hmm, can't make any more changes without making good == bad?"
- echo "Difference between good (+) and bad (-)"
- echo "NOT_REPRODUCE_CRASH n -> y"
- echo "See good and bad configs for details:"
- echo "good: /mnt/work/config_bisect_evaluation/out/config_bisect/kernel.baseline_config.tmp"
- echo "bad: /mnt/work/config_bisect_evaluation/out/config_bisect/kernel.config.tmp"
- echo "%%%%%%%% FAILED TO FIND SINGLE BAD CONFIG %%%%%%%%"
- exit 2
-fi
diff --git a/pkg/vcs/testdata/linux/merge_config.sh b/pkg/vcs/testdata/linux/merge_config.sh
index 1ab10d379..1b5bb6813 100755
--- a/pkg/vcs/testdata/linux/merge_config.sh
+++ b/pkg/vcs/testdata/linux/merge_config.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 2020 syzkaller project authors. All rights reserved.
# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.