Skip to content

Commit 1f07394

Browse files
committed
Update
1 parent 4e71aab commit 1f07394

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.github/workflows/test-examples.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,10 @@ jobs:
147147
with:
148148
name: runtime-package-no-jit-${{matrix.container.name}}
149149
path: ~/.bpftime
150-
150+
- name: Install which(required by funclatency on fedora)
151+
if: ${{matrix.container.name=='fedora' && matrix.examples.path=='libbpf-tools/funclatency'}}
152+
run: |
153+
yum install -y which
151154
- name: Set permissions
152155
run: |
153156
chmod +x ~/.bpftime/*

example/libbpf-tools/funclatency/funclatency.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ static int which_program(const char *prog, char *path, size_t path_sz)
238238
FILE *which;
239239
char cmd[100];
240240

241-
if (snprintf(cmd, sizeof(cmd), "/bin/bash -c 'which %s'", prog) >= sizeof(cmd)) {
241+
if (snprintf(cmd, sizeof(cmd), "which %s", prog) >= sizeof(cmd)) {
242242
warn("snprintf which prog failed");
243243
return -1;
244244
}

0 commit comments

Comments
 (0)