Skip to content

Commit 82f25ba

Browse files
Fix All Deep Source Shell Issues and Go Issues (OffchainLabs#8661)
* most issues resolved * fuzz wrapper fixes * more deepsource * more shell * export * shell * combine func params, fix go deep source issues Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
1 parent b2d9f9a commit 82f25ba

17 files changed

+75
-77
lines changed

bazel.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66

77
env -i \
88
PATH=/usr/bin:/bin \
9-
HOME=$HOME \
10-
GOOGLE_APPLICATION_CREDENTIALS=$GOOGLE_APPLICATION_CREDENTIALS \
9+
HOME="$HOME" \
10+
GOOGLE_APPLICATION_CREDENTIALS="$GOOGLE_APPLICATION_CREDENTIALS" \
1111
bazel "$@"

beacon-chain/node/node.go

+1-5
Original file line numberDiff line numberDiff line change
@@ -364,11 +364,7 @@ func (b *BeaconNode) startDB(cliCtx *cli.Context) error {
364364
}
365365
}
366366

367-
if err := b.db.EnsureEmbeddedGenesis(b.ctx); err != nil {
368-
return err
369-
}
370-
371-
return nil
367+
return b.db.EnsureEmbeddedGenesis(b.ctx)
372368
}
373369

374370
func (b *BeaconNode) startStateGen() {

beacon-chain/rpc/beacon/validators_stream.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ func (is *infostream) generateValidatorInfo(pubKey []byte, validator iface.ReadO
330330

331331
// generatePendingValidatorInfo generates the validator info for a pending (or unknown) key.
332332
func (is *infostream) generatePendingValidatorInfo(info *ethpb.ValidatorInfo) (*ethpb.ValidatorInfo, error) {
333-
key := fmt.Sprintf("%s", info.PublicKey)
333+
key := string(info.PublicKey)
334334
var deposit *eth1Deposit
335335
is.eth1DepositsMutex.Lock()
336336
if fetchedDeposit, exists := is.eth1Deposits.Get(key); exists {

prysm.sh

+12-12
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ if [[ "$arch" == "armv7l" ]]; then
9898
exit 1
9999
fi
100100

101-
mkdir -p $wrapper_dir
101+
mkdir -p "$wrapper_dir"
102102

103103
function get_prysm_version() {
104104
if [[ -n ${USE_PRYSM_VERSION:-} ]]; then
@@ -134,14 +134,14 @@ function verify() {
134134

135135
color "37" "Verifying binary integrity."
136136

137-
gpg --list-keys $PRYLABS_SIGNING_KEY >/dev/null 2>&1 || curl --silent https://prysmaticlabs.com/releases/pgp_keys.asc | gpg --import
137+
gpg --list-keys "$PRYLABS_SIGNING_KEY" >/dev/null 2>&1 || curl --silent https://prysmaticlabs.com/releases/pgp_keys.asc | gpg --import
138138
(
139-
cd $wrapper_dir
139+
cd "$wrapper_dir"
140140
$checkSum -c "${file}.sha256" || failed_verification
141141
)
142142
(
143-
cd $wrapper_dir
144-
gpg -u $PRYLABS_SIGNING_KEY --verify "${file}.sig" $file || failed_verification
143+
cd "$wrapper_dir"
144+
gpg -u "$PRYLABS_SIGNING_KEY" --verify "${file}.sig" "$file" || failed_verification
145145
)
146146

147147
color "32;1" "Verified ${file} has been signed by Prysmatic Labs."
@@ -174,10 +174,10 @@ if [[ $1 == beacon-chain ]]; then
174174
if [[ ! -x $BEACON_CHAIN_REAL ]]; then
175175
color "34" "Downloading beacon chain@${prysm_version} to ${BEACON_CHAIN_REAL} (${reason})"
176176
file=beacon-chain-${prysm_version}-${system}-${arch}
177-
curl -L "https://prysmaticlabs.com/releases/${file}" -o $BEACON_CHAIN_REAL
177+
curl -L "https://prysmaticlabs.com/releases/${file}" -o "$BEACON_CHAIN_REAL"
178178
curl --silent -L "https://prysmaticlabs.com/releases/${file}.sha256" -o "${wrapper_dir}/${file}.sha256"
179179
curl --silent -L "https://prysmaticlabs.com/releases/${file}.sig" -o "${wrapper_dir}/${file}.sig"
180-
chmod +x $BEACON_CHAIN_REAL
180+
chmod +x "$BEACON_CHAIN_REAL"
181181
else
182182
color "37" "Beacon chain is up to date."
183183
fi
@@ -188,10 +188,10 @@ if [[ $1 == validator ]]; then
188188
color "34" "Downloading validator@${prysm_version} to ${VALIDATOR_REAL} (${reason})"
189189

190190
file=validator-${prysm_version}-${system}-${arch}
191-
curl -L "https://prysmaticlabs.com/releases/${file}" -o $VALIDATOR_REAL
191+
curl -L "https://prysmaticlabs.com/releases/${file}" -o "$VALIDATOR_REAL"
192192
curl --silent -L "https://prysmaticlabs.com/releases/${file}.sha256" -o "${wrapper_dir}/${file}.sha256"
193193
curl --silent -L "https://prysmaticlabs.com/releases/${file}.sig" -o "${wrapper_dir}/${file}.sig"
194-
chmod +x $VALIDATOR_REAL
194+
chmod +x "$VALIDATOR_REAL"
195195
else
196196
color "37" "Validator is up to date."
197197
fi
@@ -202,10 +202,10 @@ if [[ $1 == slasher ]]; then
202202
color "34" "Downloading slasher@${prysm_version} to ${SLASHER_REAL} (${reason})"
203203

204204
file=slasher-${prysm_version}-${system}-${arch}
205-
curl -L "https://prysmaticlabs.com/releases/${file}" -o $SLASHER_REAL
205+
curl -L "https://prysmaticlabs.com/releases/${file}" -o "$SLASHER_REAL"
206206
curl --silent -L "https://prysmaticlabs.com/releases/${file}.sha256" -o "${wrapper_dir}/${file}.sha256"
207207
curl --silent -L "https://prysmaticlabs.com/releases/${file}.sig" -o "${wrapper_dir}/${file}.sig"
208-
chmod +x $SLASHER_REAL
208+
chmod +x "$SLASHER_REAL"
209209
else
210210
color "37" "Slasher is up to date."
211211
fi
@@ -233,7 +233,7 @@ slasher)
233233
;;
234234
esac
235235

236-
verify $process
236+
verify "$process"
237237

238238
if [[ "$#" -gt 1 ]] && [[ $2 == --download-only ]]; then
239239
color "37" "Only download operation is requested, done."

scripts/check-todo.sh

+8-9
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
11
#!/bin/bash
22

33
# Continuous integration script to check that TODOs are in the correct format
4-
OUTPUT="$(grep -PrinH '(?<!context\.)todo(?!\(#{0,1}\d+\))' --include \*.go --exclude *site_data.go --exclude *mainnet_config.go *)";
4+
OUTPUT="$(grep -PrinH '(?<!context\.)todo(?!\(#{0,1}\d+\))' --include ./**/*.go --exclude ./*site_data.go --exclude ./*mainnet_config.go)";
55
if [ "$OUTPUT" != "" ] ;
6-
then
6+
then
77
echo "Invalid TODOs found. Failing." >&2;
88
echo "$OUTPUT" >&2;
99
exit 1;
10-
fi
11-
10+
fi
1211

13-
while read -r line ; do
14-
linenum=$(expr $line : '^\([0-9]*:\)')
12+
while read -r line ; do
13+
linenum=$(expr "$line" : '^\([0-9]*:\)')
1514
issueNum=${line//$linenum}
16-
issueState=$(curl https://api.github.com/repos/prysmaticlabs/prysm/issues/$issueNum | grep -o '"state":"closed"');
15+
issueState=$(curl https://api.github.com/repos/prysmaticlabs/prysm/issues/"$issueNum" | grep -o '"state":"closed"');
1716

1817
if [ "$issueState" != "" ];
19-
then
18+
then
2019
echo "Issue referenced has already been closed" >&2;
2120
echo "Issue Number: $issueNum" >&2;
2221
exit 1;
2322
fi
24-
done < <(grep -PrinH -o -h '(?<!context\.)todo\(#{0,1}\K(\d+)' --include \*.go *)
23+
done < <(grep -PrinH -o -h '(?<!context\.)todo\(#{0,1}\K(\d+)' --include ./*.go)

scripts/ci-coverage.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
./bazel.sh --bazelrc=.buildkite-bazelrc coverage --config=remote-cache --features=norace --test_tag_filters="-race_on" --nocache_test_results -k //...
55

66
# Collect all coverage results into a single file (for deepsource).
7-
find $(./bazel.sh --bazelrc=.buildkite-bazelrc info bazel-testlogs) -iname coverage.dat | xargs -t -rd '\n' ./bazel.sh --bazelrc=.buildkite-bazelrc run //tools/gocovmerge:gocovmerge -- > /tmp/cover.out
7+
find "$(./bazel.sh --bazelrc=.buildkite-bazelrc info bazel-testlogs)" -iname coverage.dat -print0 | xargs -t -rd '\n' -0 ./bazel.sh --bazelrc=.buildkite-bazelrc run //tools/gocovmerge:gocovmerge -- > /tmp/cover.out
88

99
# Download deepsource CLI
1010
curl https://deepsource.io/cli | sh
@@ -13,4 +13,4 @@ curl https://deepsource.io/cli | sh
1313
./bin/deepsource report --analyzer test-coverage --key go --value-file /tmp/cover.out
1414

1515
# Upload to codecov (requires CODECOV_TOKEN environment variable)
16-
bash <(curl -s https://codecov.io/bash) -s $(./bazel.sh info bazel-testlogs) -f '**/coverage.dat'
16+
bash <(curl -s https://codecov.io/bash) -s "$(./bazel.sh info bazel-testlogs)" -f '**/coverage.dat'

scripts/common.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ if [ "$system" == "darwin" ]; then
2727
color 31 "Make sure that GNU 'findutils' package is installed: brew install findutils"
2828
exit 1
2929
else
30-
findutil="gfind"
30+
export findutil="gfind" # skipcq: SH-2034
3131
fi
3232
fi

scripts/coverage.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ set -e
77
echo "" > coverage.txt
88

99
for d in $(go list ./... | grep -v vendor); do
10-
if [[ ${skip_coverage[*]} =~ "$d" ]]; then
10+
if [[ ${skip_coverage[*]} =~ $d ]]; then
1111
continue
1212
fi
13-
go test -coverprofile=profile.out -covermode=atomic $d
13+
go test -coverprofile=profile.out -covermode=atomic "$d"
1414
if [ -f profile.out ]; then
1515
cat profile.out >> coverage.txt
1616
rm profile.out

scripts/update-go-pbs.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
. $(dirname "$0")/common.sh
2+
. "$(dirname "$0")"/common.sh
33

44
# Script to copy pb.go files from bazel build folder to appropriate location.
55
# Bazel builds to bazel-bin/... folder, script copies them back to original folder where .proto is.
@@ -9,14 +9,14 @@ bazel build //proto/...
99
file_list=()
1010
while IFS= read -d $'\0' -r file; do
1111
file_list=("${file_list[@]}" "$file")
12-
done < <($findutil -L $(bazel info bazel-bin)/proto -type f -regextype sed -regex ".*pb\.\(gw\.\)\?go$" -print0)
12+
done < <($findutil -L "$(bazel info bazel-bin)"/proto -type f -regextype sed -regex ".*pb\.\(gw\.\)\?go$" -print0)
1313

1414
arraylength=${#file_list[@]}
1515
searchstring="prysmaticlabs/prysm/"
1616

1717
# Copy pb.go files from bazel-bin to original folder where .proto is.
1818
for ((i = 0; i < arraylength; i++)); do
19-
color "34" $destination
19+
color "34" "$destination"
2020
destination=${file_list[i]#*$searchstring}
2121
chmod 755 "$destination"
2222
cp -R -L "${file_list[i]}" "$destination"

scripts/update-go-ssz.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
. $(dirname "$0")/common.sh
2+
. "$(dirname "$0")"/common.sh
33

44
# Script to copy ssz.go files from bazel build folder to appropriate location.
55
# Bazel builds to bazel-bin/... folder, script copies them back to original folder where target is.
@@ -10,15 +10,15 @@ bazel query 'kind(ssz_gen_marshal, //proto/...) union kind(ssz_gen_marshal, //fu
1010
file_list=()
1111
while IFS= read -d $'\0' -r file; do
1212
file_list=("${file_list[@]}" "$file")
13-
done < <($findutil -L $(bazel info bazel-bin)/ -type f -regextype sed -regex ".*ssz\.go$" -print0)
13+
done < <($findutil -L "$(bazel info bazel-bin)"/ -type f -regextype sed -regex ".*ssz\.go$" -print0)
1414

1515
arraylength=${#file_list[@]}
1616
searchstring="/bin/"
1717

1818
# Copy ssz.go files from bazel-bin to original folder where the target is located.
1919
for ((i = 0; i < arraylength; i++)); do
2020
destination=${file_list[i]#*$searchstring}
21-
color "34" $destination
21+
color "34" "$destination"
2222
chmod 755 "$destination"
2323
cp -R -L "${file_list[i]}" "$destination"
2424
done

scripts/update-mockgen.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ for ((i = 0; i < ${#mocks[@]}; i++)); do
1717
file=${mocks[i]% *};
1818
interfaces=${mocks[i]#* };
1919
echo "generating $file for interfaces: $interfaces";
20-
GO11MODULE=on mockgen -package=mock -destination=$file github.com/prysmaticlabs/ethereumapis/eth/v1alpha1 $interfaces
21-
GO11MODULE=on mockgen -package=mock -destination=$file github.com/prysmaticlabs/prysm/proto/validator/accounts/v2 $interfaces
20+
GO11MODULE=on mockgen -package=mock -destination="$file" github.com/prysmaticlabs/ethereumapis/eth/v1alpha1 "$interfaces"
21+
GO11MODULE=on mockgen -package=mock -destination="$file" github.com/prysmaticlabs/prysm/proto/validator/accounts/v2 "$interfaces"
2222
done
2323

2424
goimports -w "$mock_path/."

scripts/upload-github-release-asset.sh

+12-9
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222

2323
# Check dependencies.
2424
set -e
25-
xargs=$(which gxargs || which xargs)
25+
# skipcq: SH-2034
26+
export xargs=$(which gxargs || which xargs)
2627

2728
# Validate settings.
2829
[ "$TRACE" ] && set -x
@@ -38,29 +39,31 @@ GH_API="https://api.github.com"
3839
GH_REPO="$GH_API/repos/$owner/$repo"
3940
GH_TAGS="$GH_REPO/releases/tags/$tag"
4041
AUTH="Authorization: token $github_api_token"
41-
WGET_ARGS="--content-disposition --auth-no-challenge --no-cookie"
42-
CURL_ARGS="-LJO#"
42+
# skipcq: SH-2034
43+
export WGET_ARGS="--content-disposition --auth-no-challenge --no-cookie"
44+
# skipcq: SH-2034
45+
export CURL_ARGS="-LJO#"
4346

4447
if [[ "$tag" == 'LATEST' ]]; then
4548
GH_TAGS="$GH_REPO/releases/latest"
4649
fi
4750

4851
# Validate token.
49-
curl -o /dev/null -sH "$AUTH" $GH_REPO || { echo "Error: Invalid repo, token or network issue!"; exit 1; }
52+
curl -o /dev/null -sH "$AUTH" "$GH_REPO" || { echo "Error: Invalid repo, token or network issue!"; exit 1; }
5053

5154
# Read asset tags.
52-
response=$(curl -sH "$AUTH" $GH_TAGS)
55+
response=$(curl -sH "$AUTH" "$GH_TAGS")
5356

5457
# Get ID of the asset based on given filename.
55-
eval $(echo "$response" | grep -m 1 "id.:" | grep -w id | tr : = | tr -cd '[[:alnum:]]=')
58+
eval "$(echo "$response" | grep -m 1 "id.:" | grep -w id | tr : = | tr -cd '[[:alnum:]]=')"
5659
[ "$id" ] || { echo "Error: Failed to get release id for tag: $tag"; echo "$response" | awk 'length($0)<100' >&2; exit 1; }
5760

5861
# Upload asset
5962
echo "Uploading asset... "
6063

6164
# Construct url
62-
GH_ASSET="https://uploads.github.com/repos/$owner/$repo/releases/$id/assets?name=$(basename $filename)"
65+
GH_ASSET="https://uploads.github.com/repos/$owner/$repo/releases/$id/assets?name=$(basename "$filename")"
6366

64-
echo $GH_ASSET
67+
echo "$GH_ASSET"
6568

66-
curl "$GITHUB_OAUTH_BASIC" --data-binary @"$filename" -H "Authorization: token $github_api_token" -H "Content-Type: application/octet-stream" $GH_ASSET
69+
curl "$GITHUB_OAUTH_BASIC" --data-binary @"$filename" -H "Authorization: token $github_api_token" -H "Content-Type: application/octet-stream" "$GH_ASSET"

scripts/upload_fuzzers.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ bazel build --config=fuzz \
1010
//fuzz:ssz_encoder_attestations_test_libfuzzer_bundle
1111

1212
# Upload bundles with date timestamps in the filename.
13-
gsutil cp bazel-bin/fuzz/block_fuzz_test_libfuzzer_bundle.zip gs://builds.prysmaticlabs.appspot.com/libfuzzer_asan_blocks/fuzzer-build-$(date +%Y%m%d%H%M).zip
14-
gsutil cp bazel-bin/fuzz/state_fuzz_test_libfuzzer_bundle.zip gs://builds.prysmaticlabs.appspot.com/libfuzzer_asan_state/fuzzer-build-$(date +%Y%m%d%H%M).zip
15-
gsutil cp bazel-bin/fuzz/ssz_encoder_attestations_test_libfuzzer_bundle.zip gs://builds.prysmaticlabs.appspot.com/libfuzzer_asan_ssz_encoder_attestations/fuzzer-build-$(date +%Y%m%d%H%M).zip
13+
gsutil cp bazel-bin/fuzz/block_fuzz_test_libfuzzer_bundle.zip gs://builds.prysmaticlabs.appspot.com/libfuzzer_asan_blocks/fuzzer-build-"$(date +%Y%m%d%H%M)".zip
14+
gsutil cp bazel-bin/fuzz/state_fuzz_test_libfuzzer_bundle.zip gs://builds.prysmaticlabs.appspot.com/libfuzzer_asan_state/fuzzer-build-"$(date +%Y%m%d%H%M)".zip
15+
gsutil cp bazel-bin/fuzz/ssz_encoder_attestations_test_libfuzzer_bundle.zip gs://builds.prysmaticlabs.appspot.com/libfuzzer_asan_ssz_encoder_attestations/fuzzer-build-"$(date +%Y%m%d%H%M)".zip

scripts/workspace_status.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Note: The STABLE_ prefix will force a relink when the value changes when using rules_go x_defs.
44

5-
echo STABLE_GIT_COMMIT $(git rev-parse HEAD)
6-
echo DATE $(date --rfc-3339=seconds --utc)
7-
echo DOCKER_TAG $(git rev-parse --abbrev-ref HEAD)-$(git rev-parse --short=6 HEAD)
8-
echo STABLE_GIT_TAG $(git describe --tags $(git rev-list --tags --max-count=1))
5+
echo STABLE_GIT_COMMIT "$(git rev-parse HEAD)"
6+
echo DATE "$(date --rfc-3339=seconds --utc)"
7+
echo DOCKER_TAG "$(git rev-parse --abbrev-ref HEAD)-$(git rev-parse --short=6 HEAD)"
8+
echo STABLE_GIT_TAG "$(git describe --tags "$(git rev-list --tags --max-count=1)")"
+17-17
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
#!/bin/sh
22

33
set -eu
4-
curl -L https://github.com/llvm/llvm-project/releases/download/llvmorg-${INSTALL_LLVM_VERSION}/clang+llvm-${INSTALL_LLVM_VERSION}-x86_64-linux-gnu-ubuntu-18.04.tar.xz \
5-
-o clang+llvm-${INSTALL_LLVM_VERSION}-x86_64-linux-gnu-ubuntu-18.04.tar.xz
6-
tar xf clang+llvm-${INSTALL_LLVM_VERSION}-x86_64-linux-gnu-ubuntu-18.04.tar.xz --strip-components=1 -C /usr
7-
rm -f clang+llvm-${INSTALL_LLVM_VERSION}-x86_64-linux-gnu-ubuntu-18.04.tar.xz
4+
curl -L https://github.com/llvm/llvm-project/releases/download/llvmorg-"${INSTALL_LLVM_VERSION}"/clang+llvm-"${INSTALL_LLVM_VERSION}"-x86_64-linux-gnu-ubuntu-18.04.tar.xz \
5+
-o clang+llvm-"${INSTALL_LLVM_VERSION}"-x86_64-linux-gnu-ubuntu-18.04.tar.xz
6+
tar xf clang+llvm-"${INSTALL_LLVM_VERSION}"-x86_64-linux-gnu-ubuntu-18.04.tar.xz --strip-components=1 -C /usr
7+
rm -f clang+llvm-"${INSTALL_LLVM_VERSION}"-x86_64-linux-gnu-ubuntu-18.04.tar.xz
88
# arm64
9-
curl -L https://github.com/llvm/llvm-project/releases/download/llvmorg-${INSTALL_LLVM_VERSION}/clang+llvm-${INSTALL_LLVM_VERSION}-aarch64-linux-gnu.tar.xz \
10-
-o clang+llvm-${INSTALL_LLVM_VERSION}-aarch64-linux-gnu.tar.xz
11-
tar xf clang+llvm-${INSTALL_LLVM_VERSION}-aarch64-linux-gnu.tar.xz
12-
rm -f clang+llvm-${INSTALL_LLVM_VERSION}-aarch64-linux-gnu.tar.xz
9+
curl -L https://github.com/llvm/llvm-project/releases/download/llvmorg-"${INSTALL_LLVM_VERSION}"/clang+llvm-"${INSTALL_LLVM_VERSION}"-aarch64-linux-gnu.tar.xz \
10+
-o clang+llvm-"${INSTALL_LLVM_VERSION}"-aarch64-linux-gnu.tar.xz
11+
tar xf clang+llvm-"${INSTALL_LLVM_VERSION}"-aarch64-linux-gnu.tar.xz
12+
rm -f clang+llvm-"${INSTALL_LLVM_VERSION}"-aarch64-linux-gnu.tar.xz
1313
mkdir -p /usr/aarch64-linux-gnu/lib/clang/10.0.0
1414
mkdir -p /usr/aarch64-linux-gnu/include/c++
15-
mv /clang+llvm-${INSTALL_LLVM_VERSION}-aarch64-linux-gnu/include/c++/v1 /usr/aarch64-linux-gnu/include/c++/
16-
mv /clang+llvm-${INSTALL_LLVM_VERSION}-aarch64-linux-gnu/lib/clang/10.0.0/include /usr/aarch64-linux-gnu/lib/clang/10.0.0
17-
mv /clang+llvm-${INSTALL_LLVM_VERSION}-aarch64-linux-gnu/lib/libc++.a /usr/aarch64-linux-gnu/lib/
18-
mv /clang+llvm-${INSTALL_LLVM_VERSION}-aarch64-linux-gnu/lib/libc++abi.a /usr/aarch64-linux-gnu/lib/
19-
mv /clang+llvm-${INSTALL_LLVM_VERSION}-aarch64-linux-gnu/lib/libunwind.a /usr/aarch64-linux-gnu/lib/
20-
mv /clang+llvm-${INSTALL_LLVM_VERSION}-aarch64-linux-gnu/lib/clang/10.0.0/lib/linux/libclang_rt.builtins-aarch64.a /usr/lib/clang/10.0.0/lib/linux/
21-
mv /clang+llvm-${INSTALL_LLVM_VERSION}-aarch64-linux-gnu/lib/clang/10.0.0/lib/linux/clang_rt.crtbegin-aarch64.o /usr/lib/clang/10.0.0/lib/linux/
22-
mv /clang+llvm-${INSTALL_LLVM_VERSION}-aarch64-linux-gnu/lib/clang/10.0.0/lib/linux/clang_rt.crtend-aarch64.o /usr/lib/clang/10.0.0/lib/linux/
23-
rm -rf /clang+llvm-${INSTALL_LLVM_VERSION}-aarch64-linux-gnu
15+
mv /clang+llvm-"${INSTALL_LLVM_VERSION}"-aarch64-linux-gnu/include/c++/v1 /usr/aarch64-linux-gnu/include/c++/
16+
mv /clang+llvm-"${INSTALL_LLVM_VERSION}"-aarch64-linux-gnu/lib/clang/10.0.0/include /usr/aarch64-linux-gnu/lib/clang/10.0.0
17+
mv /clang+llvm-"${INSTALL_LLVM_VERSION}"-aarch64-linux-gnu/lib/libc++.a /usr/aarch64-linux-gnu/lib/
18+
mv /clang+llvm-"${INSTALL_LLVM_VERSION}"-aarch64-linux-gnu/lib/libc++abi.a /usr/aarch64-linux-gnu/lib/
19+
mv /clang+llvm-"${INSTALL_LLVM_VERSION}"-aarch64-linux-gnu/lib/libunwind.a /usr/aarch64-linux-gnu/lib/
20+
mv /clang+llvm-"${INSTALL_LLVM_VERSION}"-aarch64-linux-gnu/lib/clang/10.0.0/lib/linux/libclang_rt.builtins-aarch64.a /usr/lib/clang/10.0.0/lib/linux/
21+
mv /clang+llvm-"${INSTALL_LLVM_VERSION}"-aarch64-linux-gnu/lib/clang/10.0.0/lib/linux/clang_rt.crtbegin-aarch64.o /usr/lib/clang/10.0.0/lib/linux/
22+
mv /clang+llvm-"${INSTALL_LLVM_VERSION}"-aarch64-linux-gnu/lib/clang/10.0.0/lib/linux/clang_rt.crtend-aarch64.o /usr/lib/clang/10.0.0/lib/linux/
23+
rm -rf /clang+llvm-"${INSTALL_LLVM_VERSION}"-aarch64-linux-gnu

tools/fuzz_wrapper.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ set -e
55
# A wrapper for libfuzz tests that sets test undeclared outputs directory as the first corpus
66
# which libfuzz will write to and the artifact prefix to write any crashes.
77

8-
$1 $TEST_UNDECLARED_OUTPUTS_DIR ${@:2} -artifact_prefix=$TEST_UNDECLARED_OUTPUTS_DIR/
8+
$1 "$TEST_UNDECLARED_OUTPUTS_DIR" "${@:2}" -artifact_prefix="$TEST_UNDECLARED_OUTPUTS_DIR"/

validator/db/kv/prune_attester_protection_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ func checkAttestingHistoryAfterPruning(
153153
t testing.TB,
154154
validatorDB *Store,
155155
pubKey [48]byte,
156-
startEpoch types.Epoch,
156+
startEpoch,
157157
numEpochs types.Epoch,
158158
shouldBePruned bool,
159159
) error {

0 commit comments

Comments
 (0)