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 seqres=$RESULT_DIR/$seq
15 echo "QA output created by $seq"
19 status=1 # failure is the default!
20 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
22 # get standard environment, filters and checks
26 [ -z "$WORKAREA" ] && \
27 _notrun "Can't run find-api-violations.sh without WORKAREA set"
28 [ -f "$WORKAREA/tools/find-api-violations.sh" ] || \
29 _notrun "Can't find find-api-violations.sh tool under \"$WORKAREA\""
31 echo "Silence is golden."
33 # Look for API usage problems. Old versions of the script have an improperly
34 # specified grep pattern that is mistaken for a (broken) range specifier in
35 # LC_ALL=C, so use English instead.
36 (cd "$WORKAREA" ; LC_ALL="en_US.UTF-8" bash ./tools/find-api-violations.sh ) | tee -a $seqres.full