mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 13:26:00 +03:00
[PR #1862] [MERGED] Added test by a shell script static analysis tool(ShellCheck) #2217
Labels
No labels
bug
bug
dataloss
duplicate
enhancement
feature request
help wanted
invalid
need info
performance
pull-request
question
question
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/s3fs-fuse#2217
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/1862
Author: @ggtakec
Created: 1/16/2022
Status: ✅ Merged
Merged: 1/22/2022
Merged by: @gaul
Base:
master← Head:add_shellcheck📝 Commits (1)
d9d72d4Added test by a shell script static analysis tool(ShellCheck)📊 Changes
12 files changed (+877 additions, -739 deletions)
View changed files
📝
.github/workflows/ci.yml(+9 -1)📝
.github/workflows/linux-ci-helper.sh(+46 -20)📝
Makefile.am(+32 -0)📝
autogen.sh(+6 -8)📝
test/filter-suite-log.sh(+38 -36)📝
test/integration-test-common.sh(+57 -47)📝
test/integration-test-main.sh(+516 -482)📝
test/junk_data.c(+9 -0)📝
test/mergedir.sh(+51 -48)📝
test/sample_delcache.sh(+26 -27)📝
test/small-integration-test.sh(+7 -5)📝
test/test-utils.sh(+80 -65)📄 Description
Details
s3fs uses Bourne shell(
sh) andbashfor build and test.However, these codes have not been tested except visually and directly at run time.
In the future, we will add new test and scripts for it, thus these test script codes should be checked/linted.
So I added it to my code to use ShellChek.
I think
ShellCheckis popular and has a proven track record.We can run
ShellCheckwithmake shellcheck, just likecppcheck.In this PR, the all script codes were corrected the errors and warnings detected by
ShellCheck.These code changes did not change the original logic.
Some errors and warnings cannot(should not) be fixed, then they have not done.
For that purpose, I use inline comment(
# shellcheck disable=SCxxx) to suppress the output ofShellCheck.The scripts used in s3fs are build and test, so I think that we won't need to take strict fix(ex. security issues).
The test on
CentOS Stream 8does not performShellChecktest becauseShellCheckcannot be installed from the package.Also, CentOS 7 ShellCheck is excluded because the version is low and the error(
hGetContents: invalid argument (invalid byte sequence)) can not be resolved.(Since we are checking with other OS, I think that it is not a problem not to implement it with
CentOS 8/7.)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.