181ff92a9STom Zanussi#!/bin/sh 281ff92a9STom Zanussi# SPDX-License-Identifier: GPL-2.0 381ff92a9STom Zanussi# description: event trigger - test synthetic_events syntax parser errors 481ff92a9STom Zanussi# requires: synthetic_events error_log 581ff92a9STom Zanussi 681ff92a9STom Zanussicheck_error() { # command-with-error-pos-by-^ 781ff92a9STom Zanussi ftrace_errlog_check 'synthetic_events' "$1" 'synthetic_events' 881ff92a9STom Zanussi} 981ff92a9STom Zanussi 1081ff92a9STom Zanussicheck_error 'myevent ^chr arg' # INVALID_TYPE 1181ff92a9STom Zanussicheck_error 'myevent ^char str[];; int v' # INVALID_TYPE 1281ff92a9STom Zanussicheck_error 'myevent char ^str]; int v' # INVALID_NAME 1381ff92a9STom Zanussicheck_error 'myevent char ^str;[]' # INVALID_NAME 1481ff92a9STom Zanussicheck_error 'myevent ^char str[; int v' # INVALID_TYPE 1581ff92a9STom Zanussicheck_error '^mye;vent char str[]' # BAD_NAME 1681ff92a9STom Zanussicheck_error 'myevent char str[]; ^int' # INVALID_FIELD 1781ff92a9STom Zanussicheck_error '^myevent' # INCOMPLETE_CMD 1881ff92a9STom Zanussi 1981ff92a9STom Zanussiexit 0 20