Merge pull request #71 from lucab/ups/fix-sorting

cargo-generate: sort program types
pull/73/head
Michal Rostecki 2 years ago committed by GitHub
commit 65091e30bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -6,24 +6,24 @@ ignore = [".github", "test.sh"]
type = "string" type = "string"
prompt = "Which type of eBPF program?" prompt = "Which type of eBPF program?"
choices = [ choices = [
"kprobe", "cgroup_skb",
"kretprobe", "cgroup_sockopt",
"cgroup_sysctl",
"classifier",
"fentry", "fentry",
"fexit", "fexit",
"uprobe", "kprobe",
"uretprobe", "kretprobe",
"lsm",
"raw_tracepoint",
"sk_msg",
"sock_ops", "sock_ops",
"socket_filter", "socket_filter",
"sk_msg",
"xdp",
"classifier",
"cgroup_skb",
"cgroup_sysctl",
"cgroup_sockopt",
"tracepoint",
"lsm",
"tp_btf", "tp_btf",
"raw_tracepoint" "tracepoint",
"uprobe",
"uretprobe",
"xdp",
] ]
default = "xdp" default = "xdp"

@ -15,35 +15,35 @@ trap clean_up EXIT
pushd $TMP_DIR pushd $TMP_DIR
case "$PROG_TYPE" in case "$PROG_TYPE" in
"kprobe"|"kretprobe") "cgroup_sockopt")
ADDITIONAL_ARGS="-d kprobe=test" ADDITIONAL_ARGS="-d sockopt_target=getsockopt"
;;
"classifier"|"cgroup_skb")
ADDITIONAL_ARGS="-d direction=Ingress"
;; ;;
"fentry"|"fexit") "fentry"|"fexit")
ADDITIONAL_ARGS="-d fn_name=try_to_wake_up" ADDITIONAL_ARGS="-d fn_name=try_to_wake_up"
;; ;;
"uprobe"|"uretprobe") "kprobe"|"kretprobe")
ADDITIONAL_ARGS="-d uprobe_target=testlib -d uprobe_fn_name=testfn" ADDITIONAL_ARGS="-d kprobe=test"
;; ;;
"tracepoint") "lsm")
ADDITIONAL_ARGS="-d tracepoint_category=net -d tracepoint_name=net_dev_queue" ADDITIONAL_ARGS="-d lsm_hook=file_open"
;; ;;
"classifier"|"cgroup_skb") "raw_tracepoint")
ADDITIONAL_ARGS="-d direction=Ingress" ADDITIONAL_ARGS="-d tracepoint_name=sys_enter"
;; ;;
"sk_msg") "sk_msg")
ADDITIONAL_ARGS="-d sock_map=TEST" ADDITIONAL_ARGS="-d sock_map=TEST"
;; ;;
"lsm")
ADDITIONAL_ARGS="-d lsm_hook=file_open"
;;
"tp_btf") "tp_btf")
ADDITIONAL_ARGS="-d tracepoint_name=net_dev_queue" ADDITIONAL_ARGS="-d tracepoint_name=net_dev_queue"
;; ;;
"cgroup_sockopt") "tracepoint")
ADDITIONAL_ARGS="-d sockopt_target=getsockopt" ADDITIONAL_ARGS="-d tracepoint_category=net -d tracepoint_name=net_dev_queue"
;; ;;
"raw_tracepoint") "uprobe"|"uretprobe")
ADDITIONAL_ARGS="-d tracepoint_name=sys_enter" ADDITIONAL_ARGS="-d uprobe_target=testlib -d uprobe_fn_name=testfn"
;; ;;
*) *)
ADDITIONAL_ARGS='' ADDITIONAL_ARGS=''

Loading…
Cancel
Save