Skip to content

Commit bc3487e

Browse files
authored
[ci] Add option --privileged for running slave docker (sonic-net#1067)
In azp run, the following failure always happens at the stage of `make check` of building syncd. ``` Making check in syncd make[2]: Entering directory '/__w/1/s/syncd' make check-TESTS make[3]: Entering directory '/__w/1/s/syncd' tests: tests.cpp:843: void test_watchdog_timer_clock_rollback(): Assertion `settimeofday(&currentTime, NULL) == 0' failed. /bin/bash: line 5: 13004 Aborted (core dumped) ${dir}$tst FAIL: tests ``` The execution of `settimeofday(&currentTime, NULL)` fails in slave docker with errno **EPERM**, because CAP_SYS_TIME capability is dropped in docker. Using option `--privileged` gives docker extended privileges for its success. This failure has existed for a long time in azp build and is not exposed till sonic-net/sonic-sairedis#1050.
1 parent b13d7d2 commit bc3487e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

.azure-pipelines/build-template.yml

+1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ jobs:
5656

5757
container:
5858
image: sonicdev-microsoft.azurecr.io:443/${{ parameters.sonic_slave }}:latest
59+
options: "--privileged"
5960

6061
steps:
6162
- checkout: self

0 commit comments

Comments
 (0)