[{"id":3683295,"web_url":"http://patchwork.ozlabs.org/comment/3683295/","msgid":"<20260428093024.3971-1-linuxtestproject.agent@gmail.com>","list_archive_url":null,"date":"2026-04-28T09:30:24","subject":"Re: [LTP] Rewrite ftrace_regression tests with new C API","submitter":{"id":93132,"url":"http://patchwork.ozlabs.org/api/people/93132/","name":null,"email":"linuxtestproject.agent@gmail.com"},"content":"Hi lufei,\n\nOn Tue, 28 Apr 2026, lufei wrote:\n> Rewrite ftrace_regression tests with new C API\n>\n> Rewritten from old shell scripts.\n\nPlease explain why the conversion is being done — \"Rewritten from old\nshell scripts\" only states what, not why. Also, this bundles two\nindependent test rewrites; please split into one commit per test.\n\n> +static void run(void)\n> +{\n> +\tint i;\n> +\n> +\tfor (i = 0; i < LOOP; i++) {\n> +\t\tSAFE_FILE_PRINTF(STACK_TRACER_PATH, \"1\");\n> +\t\tSAFE_FILE_PRINTF(TRACE_OPTIONS, \"userstacktrace\");\n\ntrace_options is modified but never saved/restored. The original\nftrace_lib.sh saved old_trace_options and restored it in\nrestore_old_setting(). Add TRACE_OPTIONS to .save_restore.\n\n> +\tSAFE_FILE_PRINTF(page_fault_path, \"%d\", page_fault_origin);\n\nThis restore only runs on the normal path. If run() aborts via\ntst_brk() inside the loop the enable flag is left set. Use .save_restore\nor a dedicated cleanup() instead.\n\n[...]\n\n> +static void run(void)\n> +{\n> +\tint i;\n> +\tconst char *const cmd_ls[] = {\"ls\", \"-l\", \"/sys/kernel/tracing/\", NULL};\n\n/sys/kernel/tracing/ is not guaranteed to exist on all configs. The\noriginal used /proc; keep that or add an access() check with TCONF.\n\n> +\tSAFE_FILE_PRINTF(SET_EVENT, \"signal:signal_generate\");\n> +\tSAFE_FILE_PRINTF(TRACING_ON, \"1\");\n\nNeither SET_EVENT nor TRACING_ON is restored. Add both to .save_restore.\n\n---\nPre-existing issues noticed in the surrounding code (not introduced\nby this patch):\n\n- ftrace_lib.sh:109 — typo \"function_pofile_enabled\" (should be\n  \"function_profile_enabled\") prevents restoring profile state\n\n---\nNote:\n\nOur agent completed the review of the patch. The agent can sometimes\nproduce false positives although often its findings are genuine. If\nyou find issues with the review, please comment this email or ignore\nthe suggestions.\n\nRegards,\nLTP AI Reviewer","headers":{"Return-Path":"<ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it>","X-Original-To":["incoming@patchwork.ozlabs.org","ltp@lists.linux.it"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","ltp@picard.linux.it"],"Authentication-Results":["legolas.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=LCFOTADN;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it\n (client-ip=213.254.12.146; helo=picard.linux.it;\n envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it;\n receiver=patchwork.ozlabs.org)"],"Received":["from picard.linux.it (picard.linux.it [213.254.12.146])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g4Zt15kRLz1yHX\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 28 Apr 2026 19:30:33 +1000 (AEST)","from picard.linux.it (localhost [IPv6:::1])\n\tby picard.linux.it (Postfix) with ESMTP id 3BE8C3E2542\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 28 Apr 2026 11:30:31 +0200 (CEST)","from in-3.smtp.seeweb.it (in-3.smtp.seeweb.it [217.194.8.3])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature ECDSA (secp384r1))\n (No client certificate requested)\n by picard.linux.it (Postfix) with ESMTPS id 2FA753C61A8\n for <ltp@lists.linux.it>; Tue, 28 Apr 2026 11:30:27 +0200 (CEST)","from mail-qk1-x743.google.com (mail-qk1-x743.google.com\n [IPv6:2607:f8b0:4864:20::743])\n (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by in-3.smtp.seeweb.it (Postfix) with ESMTPS id 647A81A008A0\n for <ltp@lists.linux.it>; Tue, 28 Apr 2026 11:30:27 +0200 (CEST)","by mail-qk1-x743.google.com with SMTP id\n af79cd13be357-8eea23d01f7so735895285a.0\n for <ltp@lists.linux.it>; Tue, 28 Apr 2026 02:30:27 -0700 (PDT)","from\n runnervmhkfpo.wzbkwdbpglyu3opx21frospznb.bx.internal.cloudapp.net\n ([48.217.251.137]) by smtp.gmail.com with ESMTPSA id\n af79cd13be357-8f7c899f58fsm144472485a.44.2026.04.28.02.30.25\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 28 Apr 2026 02:30:25 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1777368626; x=1777973426; darn=lists.linux.it;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=Pg4DIZTvb1zwWna/k9WVNOqidaeMmTJyOKJxmA5kMP8=;\n b=LCFOTADNVThKe0/EldmyJBAxJN+7EJKiSCNvl4T4ExEKTV27j3UE70R5Y3TiyW9ha1\n c8mJAIUTQIqVF0FXK+vIKjtJ6KXJ2drJj095l1zpoKQNtnoivIYghP5PoE7LT8h6XB5r\n DIll07utpgDJ2c9NhDQx+FNiIPxTzZqfiU9aworg3o7OP49wJmdeFKyplHuTcS2Waea9\n InKusm41zYcTREQufU0a8+V0K1rhWnH7ZgHvlBRxhvgvfDI1FxDvnn1zepgBSgbUmqMd\n odpzhq1IsPtbyvsh1+L+SRZjGzj6EWxMMY5NooCy+mtmHQLkvCbifVTrlSvdQG758zag\n 5h6w==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777368626; x=1777973426;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=Pg4DIZTvb1zwWna/k9WVNOqidaeMmTJyOKJxmA5kMP8=;\n b=pf9fixBQzJHWWRNxFPJhXi7cJ6eGpdi/Nyq4K3AHiSX2s2LSHwQIGOwm34rQ8sxBee\n H1l+lTH5z3FgEVX5TIe8GFLj0GORbHeumVfox+HUomoreUqA/ZbyQ/S0kAq66HW7Pz18\n NWqE4qyM2+Uha8gjjS9NJr8VhveSNhFnUty9plmFyhny0Ilo8JUOiDzVhozgXtD0XdAl\n rfZqtk6AmnmaY2FcW+5+O0ULZLzN5Oh4Pgd6tzL1XiUAKnUsREAOFIfoLw0gc9PXdPaM\n aSi47mYoBxjRM6ksE9j2urJKJkEArmCh9eIP6Dpl8oYesd5DQhLNfrDuTESGlCU4yz9p\n X2HA==","X-Gm-Message-State":"AOJu0YxuoI9ypnu/i3bViXf/6muT5DOUCBUKcxhTPd1mFRYY0cqkfvxW\n jc2We8MD6rZD4ChtfYceNWhodL7gnJ1xOpHsOgoD6IfdukMRME5ZapNQovP9+9JtAd0=","X-Gm-Gg":"AeBDievo+ZRdkFuvIgwvq9BVJlfCJUtWIOpdLlA9kp4aJ97vLuYw3cC4WD3KPWwNBTA\n AcrpAmptEulSHCpWDYzCtpi3WiI2ycV1cIt0HWRTaJ4ifX+boQVzckliXJlxsQSUIrUXY7lFjjW\n siOlKURhdvSXA0rSSzI77OJvbl3Ps2n2qa2X4svxk5xmo0NTdPR2iupnzEGKAoK5XuATVpU7pyR\n 9xy0sUNTc8W0Gp8Fw+sXIPQ681QoEN3H4uUwhFekgM9x4vOBhAoZ6bdOBjdbh+gxPm2mwgZtPhX\n 8WsU+GGpzt6lPkGLXEbz5/h+IUjICj4rlYLUPp0UzI6D/Jx3SRQAks06h06oba5A8475eAtyz88\n 0m0own67oqvNRJZnU169rDbM7b8FLx+lENFRPfz77wjS2qqjYcEecQTbSkAT3xlc8z4fnpIitlO\n xF2pN3LOb276ZSgT7rrmNK8TSGEy3J/OvHyjiTaSEPOPf1W8Y0XCu37WHQ/LScmBZlGQib2vTMd\n 1WSntYyfn2vghi2kIQhXSNFp40nDKkwNL1WFc2FV8xKR/8BuhM=","X-Received":"by 2002:a05:620a:4453:b0:8cf:ebd2:f8e1 with SMTP id\n af79cd13be357-8f7d990420cmr286249685a.53.1777368625926;\n Tue, 28 Apr 2026 02:30:25 -0700 (PDT)","From":"linuxtestproject.agent@gmail.com","To":"lufei <lufei@uniontech.com>","Date":"Tue, 28 Apr 2026 09:30:24 +0000","Message-ID":"<20260428093024.3971-1-linuxtestproject.agent@gmail.com>","X-Mailer":"git-send-email 2.54.0","In-Reply-To":"<20260428075054.105295-1-lufei@uniontech.com>","References":"<20260428075054.105295-1-lufei@uniontech.com>","MIME-Version":"1.0","X-Spam-Status":"No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID,\n DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE,SPF_PASS\n shortcircuit=no autolearn=disabled version=4.0.1","X-Spam-Checker-Version":"SpamAssassin 4.0.1 (2024-03-25) on in-3.smtp.seeweb.it","X-Virus-Scanned":"clamav-milter 1.0.9 at in-3.smtp.seeweb.it","X-Virus-Status":"Clean","Subject":"Re: [LTP] Rewrite ftrace_regression tests with new C API","X-BeenThere":"ltp@lists.linux.it","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"Linux Test Project <ltp.lists.linux.it>","List-Unsubscribe":"<https://lists.linux.it/options/ltp>,\n <mailto:ltp-request@lists.linux.it?subject=unsubscribe>","List-Archive":"<http://lists.linux.it/pipermail/ltp/>","List-Post":"<mailto:ltp@lists.linux.it>","List-Help":"<mailto:ltp-request@lists.linux.it?subject=help>","List-Subscribe":"<https://lists.linux.it/listinfo/ltp>,\n <mailto:ltp-request@lists.linux.it?subject=subscribe>","Cc":"ltp@lists.linux.it","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it","Sender":"\"ltp\" <ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it>"}}]