Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Sntp_ReceiveTimeResponse API #16

Merged
merged 11 commits into from
May 13, 2021
36 changes: 33 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,54 @@ jobs:
-G "Unix Makefiles" \
-DCMAKE_BUILD_TYPE=Debug \
-DBUILD_CLONE_SUBMODULES=ON \
-DCMAKE_C_FLAGS='-Wall -Wextra -Werror'
-DCMAKE_C_FLAGS='-O0 -Wall -Wextra -Werror -Wformat -Wformat-security -Warray-bounds'
paulbartell marked this conversation as resolved.
Show resolved Hide resolved
make -C build/ coverity_analysis -j8
- name: Build Library in Release mode
run: |
rm -rf ./build
cmake -S test -B build/ -G "Unix Makefiles" \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_CLONE_SUBMODULES=ON \
-DCMAKE_C_FLAGS='-Wall -Wextra -Werror -DNDEBUG'
-DCMAKE_C_FLAGS='-Wall -Wextra -Werror -DNDEBUG -Wformat -Wformat-security -Warray-bounds'
make -C build/ coverity_analysis -j8
unittest-and-coverage:
unittest-with-sanitizer:
runs-on: ubuntu-latest
steps:
- name: Clone This Repo
uses: actions/checkout@v2
- name: Build Library and Unit Tests with Sanitizer
run: |
CFLAGS="-O0 -Wall -Wexta -Werror"
CFLAGS+=" -D_FORTIFY_SOURCE=2"
CFLAGS+=" -Wformat"
CLFAGS+=" -Wformat-security"
CFLAGS+=" -Warray-bounds"
CFLAGS+=" -fsanitize=address,undefined"
CFLAGS+=" -fsanitize=pointer-compare -fsanitize=pointer-subtract"
CFLAGS+=" -fsanitize-recover=undefined"
CFLAGS+=" -fsanitize-address-use-after-scope"
CFLAGS+=" -fsanitize-undefined-trap-on-error"
CFLAGS=" -fstack-protector-all -DLOGGING_LEVEL_DEBUG=1"
cmake -S test -B build/ \
-G "Unix Makefiles" \
-DCMAKE_BUILD_TYPE=Debug \
-DBUILD_CLONE_SUBMODULES=ON \
-DCMAKE_C_FLAGS="${CFLAGS}"
make -C build all -j8
- name: Run unit tests with sanitizer
run: |
cd build
ctest -E system --output-on-failure
cd ..
unittest-for-coverage:
runs-on: ubuntu-latest
steps:
- name: Clone This Repo
uses: actions/checkout@v2
- name: Build
run: |
sudo apt-get install -y lcov sed
# Build with logging enabled.
cmake -S test -B build/ \
-G "Unix Makefiles" \
-DCMAKE_BUILD_TYPE=Debug \
Expand Down
12 changes: 12 additions & 0 deletions lexicon.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ apis
ascii
auth
authcodesize
authintf
aws
backoff
beforelooptime
blocktimems
br
buffersize
bytesremaining
Expand All @@ -29,6 +31,8 @@ currenttimelist
de
deamon
december
deserialize
deserializer
deserializeresponse
desiredaccuracy
dns
Expand Down Expand Up @@ -65,6 +69,7 @@ jan
january
june
kod
leapsecondinfo
leapversionmode
lsb
misra
Expand Down Expand Up @@ -118,6 +123,7 @@ psntptime
ptimeserver
ptimeservers
ptr
ptransportintf
pudptransportintf
punixtimemicrosecs
punixtimesecs
Expand Down Expand Up @@ -149,6 +155,7 @@ serializerequest
serveraddr
servernamelen
serverport
serverresponsetimeoutms
setsystemtimefunc
sizeof
sntp
Expand All @@ -161,8 +168,11 @@ sntperrorbuffertoosmall
sntperrorchangeserver
sntperrordnsfailure
sntperrornetworkfailure
sntperrorresponsetimeout
sntperrortimenotsupported
sntpinvalidresponse
sntpnoresponse
sntprejectedresponse
sntprejectedresponsechangeserver
sntprejectedresponseothercode
sntprejectedresponseretrywithbackoff
Expand All @@ -182,10 +192,12 @@ transmittime
trng
tx
udp
udprecvretcodes
udpsendretcodes
uint
unix
utc
validateserverauth
wordmemory
wordval
www
Expand Down
Loading