2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2018 Oracle, Inc.
7 # find-api-violations test
9 # The purpose of this test is ensure that the xfsprogs programs use the
10 # libxfs_ symbols (in libxfs-api-defs.h) instead of raw xfs_ functions.
11 # This is for the maintainers; it's not a functionality test.
14 _begin_fstest auto quick other
16 # Import common functions.
19 [ -z "$WORKAREA" ] && \
20 _notrun "Can't run find-api-violations.sh without WORKAREA set"
21 [ -f "$WORKAREA/tools/find-api-violations.sh" ] || \
22 _notrun "Can't find find-api-violations.sh tool under \"$WORKAREA\""
24 echo "Silence is golden."
26 # Look for API usage problems. Old versions of the script have an improperly
27 # specified grep pattern that is mistaken for a (broken) range specifier in
28 # LC_ALL=C, so use English instead.
29 (cd "$WORKAREA" ; LC_ALL="en_US.UTF-8" bash ./tools/find-api-violations.sh ) | tee -a $seqres.full