Skip to content

Commit 0cd1252

Browse files
authored
Merge branch 'linux-nvme:master' into master
2 parents e110d51 + 8b267b5 commit 0cd1252

1,174 files changed

Lines changed: 272409 additions & 30640 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.checkpatch.conf

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Checkpatch options.
2+
# REF: https://docs.kernel.org/dev-tools/checkpatch.html
3+
4+
# This isn't actually a Linux kernel tree
5+
--no-tree
6+
7+
--max-line-length=100
8+
9+
--ignore EMAIL_SUBJECT
10+
11+
# FILE_PATH_CHANGES reports this kind of message:
12+
# "added, moved or deleted file(s), does MAINTAINERS need updating?"
13+
--ignore FILE_PATH_CHANGES
14+
15+
16+
# Commit messages might contain a Gerrit Change-Id.
17+
--ignore GERRIT_CHANGE_ID
18+
19+
# Do not check the format of commit messages, as Gerrit's merge commits do not
20+
# preserve it.
21+
--ignore GIT_COMMIT_ID
22+
23+
# Avoid "Does not appear to be a unified-diff format patch" message
24+
--ignore NOT_UNIFIED_DIFF

.github/azure-pipelines.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
# Do not run following tests
3+
# - exclude data varification tests, too slow
4+
# - nvme/010
5+
# - nvme/011
6+
# - nvme/012
7+
# - nvme/013
8+
9+
trigger:
10+
- master
11+
pr:
12+
- master
13+
14+
jobs:
15+
- job: blktests
16+
timeoutInMinutes: 5
17+
pool:
18+
name: linux-nvme
19+
steps:
20+
- script: |
21+
meson $(Agent.TempDirectory)/build
22+
ninja -C $(Agent.TempDirectory)/build
23+
displayName: Build nvme-cli
24+
- script: |
25+
git clone --depth 1 https://github.com/osandov/blktests.git $(Agent.TempDirectory)/blktests
26+
displayName: Clone blktests
27+
- script: |
28+
cd $(Agent.TempDirectory)/blktests
29+
sudo sh -c 'PATH=$(Agent.TempDirectory)/build:$PATH nvme_trtype=tcp ./check -x nvme/010 -x nvme/011 -x nvme/012 -x nvme/013 nvme'
30+
displayName: Run blktests for NVMe transport TCP
31+
- script: |
32+
cd $(Agent.TempDirectory)/blktests
33+
sudo sh -c 'PATH=$(Agent.TempDirectory)/build:$PATH nvme_trtype=rdma ./check -x nvme/010 -x nvme/011 -x nvme/012 -x nvme/013 nvme'
34+
displayName: Run blktests for NVMe transport RDMA
35+
- script: |
36+
cd $(Agent.TempDirectory)/blktests
37+
sudo sh -c 'PATH=$(Agent.TempDirectory)/build:$PATH nvme_trtype=fc ./check -x nvme/010 -x nvme/011 -x nvme/012 -x nvme/013 nvme'
38+
displayName: Run blktests for NVMe transport FC

.github/codeql/codeql-config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
name: "CodeQL Config"
2+
paths-ignore:
3+
- subprojects/**
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[binaries]
2+
c = '/usr/bin/arm-linux-gnueabihf-gcc'
3+
ar = '/usr/arm-linux-gnueabihf/bin/ar'
4+
strip = '/usr/arm-linux-gnueabihf/bin/strip'
5+
pkgconfig = '/usr/bin/arm-linux-gnueabihf-pkg-config'
6+
ld = '/usr/bin/arm-linux/gnueabihf-ld'
7+
exe_wrapper = '/usr/bin/qemu-arm-static'
8+
9+
[properties]
10+
root = '/usr/arm-linux-gnueabihf'
11+
has_function_printf = true
12+
skip_sanity_check = true
13+
14+
[host_machine]
15+
system = 'linux'
16+
cpu_family = 'arm'
17+
cpu = 'armv7'
18+
endian = 'little'
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[binaries]
2+
c = '/usr/bin/powerpc64le-linux-gnu-gcc'
3+
ar = '/usr/powerpc64le-linux-gnu/bin/ar'
4+
strip = '/usr/powerpc64le-linux-gnu/bin/strip'
5+
pkgconfig = '/usr/bin/powerpc64le-linux-gnu-pkg-config'
6+
ld = '/usr/bin/powerpc64le-linux-gnu-ld'
7+
exe_wrapper = '/usr/bin/qemu-ppc64le-static'
8+
9+
[properties]
10+
root = '/usr/powerpc64le-linux-gnu'
11+
has_function_printf = true
12+
skip_sanity_check = true
13+
14+
[host_machine]
15+
system = 'linux'
16+
cpu_family = 'ppc64'
17+
cpu = ''
18+
endian = 'little'
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[binaries]
2+
c = '/usr/bin/s390x-linux-gnu-gcc'
3+
ar = '/usr/s390x-linux-gnu/bin/ar'
4+
strip = '/usr/s390x-linux-gnu/bin/strip'
5+
pkgconfig = '/usr/bin/s390x-linux-gnu-pkg-config'
6+
ld = '/usr/bin/s390x-linux-gnu-ld'
7+
exe_wrapper = '/usr/bin/qemu-s390x-static'
8+
9+
[properties]
10+
root = '/usr/s390x-linux-gnu'
11+
has_function_printf = true
12+
skip_sanity_check = true
13+
14+
[host_machine]
15+
system = 'linux'
16+
cpu_family = 's390x'
17+
cpu = ''
18+
endian = 'big'

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
version: 2
3+
updates:
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"

.github/workflows/build.yml

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
---
2+
name: build
3+
4+
on:
5+
push:
6+
branches: [master]
7+
pull_request:
8+
branches: [master]
9+
10+
workflow_dispatch:
11+
12+
jobs:
13+
default:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
compiler: [gcc, clang]
18+
buildtype: [debug, release]
19+
container:
20+
image: ghcr.io/linux-nvme/debian.python:latest
21+
steps:
22+
- uses: actions/checkout@v5
23+
- name: build
24+
run: |
25+
scripts/build.sh -b ${{ matrix.buildtype }} -c ${{ matrix.compiler }} -x
26+
- uses: actions/upload-artifact@v4
27+
name: upload logs
28+
if: failure()
29+
with:
30+
name: logs files
31+
path: |
32+
.build-ci/meson-logs/*.txt
33+
34+
cross:
35+
runs-on: ubuntu-latest
36+
strategy:
37+
matrix:
38+
include:
39+
- arch: armhf
40+
- arch: s390x
41+
- arch: ppc64le
42+
steps:
43+
- uses: actions/checkout@v5
44+
- name: enable foreign arch
45+
uses: dbhi/qus/action@main
46+
- name: Login to GitHub Container Registry
47+
uses: docker/login-action@v3
48+
with:
49+
registry: ghcr.io
50+
username: ${{ github.actor }}
51+
password: ${{ secrets.GITHUB_TOKEN }}
52+
- name: compile and run unit tests
53+
uses: mosteo-actions/docker-run@v2
54+
with:
55+
image: ghcr.io/linux-nvme/ubuntu-cross-${{ matrix.arch }}:latest
56+
guest-dir: /build
57+
host-dir: ${{ github.workspace }}
58+
command: |
59+
scripts/build.sh -b release -c gcc -t ${{ matrix.arch }} cross
60+
params: "--platform linux/amd64"
61+
pull-params: "--platform linux/amd64"
62+
- uses: actions/upload-artifact@v4
63+
name: upload logs
64+
if: failure()
65+
with:
66+
name: log files
67+
path: |
68+
.build-ci/meson-logs/*.txt
69+
70+
fallback-shared-libraries:
71+
name: fallback shared libraries
72+
runs-on: ubuntu-latest
73+
container:
74+
image: ghcr.io/linux-nvme/debian:latest
75+
if: github.ref == 'refs/heads/master'
76+
steps:
77+
- uses: actions/checkout@v5
78+
- name: build
79+
run: |
80+
scripts/build.sh -b release -c gcc fallback
81+
- uses: actions/upload-artifact@v4
82+
if: failure()
83+
with:
84+
name: log files
85+
path: |
86+
.build-ci/meson-logs/*.txt
87+
88+
build-muon:
89+
name: muon minimal static
90+
runs-on: ubuntu-latest
91+
container:
92+
image: ghcr.io/linux-nvme/debian:latest
93+
steps:
94+
- uses: actions/checkout@v5
95+
- name: build
96+
run: |
97+
scripts/build.sh -m muon
98+
99+
build-make-static:
100+
name: make static
101+
runs-on: ubuntu-latest
102+
container:
103+
image: ghcr.io/linux-nvme/debian:latest
104+
steps:
105+
- uses: actions/checkout@v5
106+
- name: build
107+
run: |
108+
make static
109+
110+
build-distro:
111+
name: build libnvme and nvme-cli separately
112+
runs-on: ubuntu-latest
113+
container:
114+
image: ghcr.io/linux-nvme/debian:latest
115+
steps:
116+
- uses: actions/checkout@v5
117+
- name: build
118+
run: |
119+
scripts/build.sh distro

.github/workflows/checkpatch.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: checkpatch review
2+
on: [pull_request]
3+
jobs:
4+
checkpatch:
5+
name: checkpatch review
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: 'Calculate PR commits + 1'
9+
run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> $GITHUB_ENV
10+
- uses: actions/checkout@v5
11+
with:
12+
ref: ${{ github.event.pull_request.head.sha }}
13+
fetch-depth: 0
14+
- name: Run checkpatch review
15+
uses: webispy/checkpatch-action@v9

.github/workflows/codeql.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# CodeQL build configuration for nvme-cli
2+
# Mostly based on auto-configuration with additions and tweaks for:
3+
# * meson install
4+
# * language detection
5+
name: "CodeQL"
6+
7+
on:
8+
push:
9+
branches: [ "master" ]
10+
pull_request:
11+
# The branches below must be a subset of the branches above
12+
branches: [ "master" ]
13+
schedule:
14+
- cron: '24 2 * * 5'
15+
16+
jobs:
17+
analyze:
18+
name: Analyze
19+
# Runner size impacts CodeQL analysis time. To learn more, please see:
20+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
21+
# - https://gh.io/supported-runners-and-hardware-resources
22+
# - https://gh.io/using-larger-runners
23+
# Consider using larger runners for possible analysis time improvements.
24+
runs-on: 'ubuntu-latest'
25+
timeout-minutes: 360
26+
permissions:
27+
actions: read
28+
contents: read
29+
security-events: write
30+
31+
strategy:
32+
fail-fast: false
33+
matrix:
34+
language: [ 'c-cpp', 'python' ]
35+
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
36+
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
37+
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
38+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
39+
40+
steps:
41+
- name: Checkout repository
42+
uses: actions/checkout@v5
43+
44+
- name: Install build tools
45+
run: |
46+
sudo apt-get update
47+
sudo apt-get install meson
48+
49+
# Initializes the CodeQL tools for scanning.
50+
- if: matrix.language == 'c-cpp'
51+
name: Initialize CodeQL C
52+
uses: github/codeql-action/init@v3
53+
with:
54+
languages: 'c-cpp'
55+
56+
- if: matrix.language == 'python'
57+
name: Initialize CodeQL Python
58+
uses: github/codeql-action/init@v3
59+
with:
60+
languages: 'python'
61+
config-file: ./.github/codeql/codeql-config.yml
62+
63+
- name: meson build
64+
run: |
65+
meson setup --force-fallback-for=libnvme,json-c .build
66+
ninja -C .build
67+
68+
- name: Perform CodeQL Analysis
69+
uses: github/codeql-action/analyze@v3
70+
with:
71+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)