From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-io1-f43.google.com (mail-io1-f43.google.com [209.85.166.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A63302836AA for ; Thu, 10 Apr 2025 20:01:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744315302; cv=none; b=dtuQdOpHsZt1XYpGyIBndpP6KvBtMv4/2Ns6SlWMQbb3k5G2CPohnBODhX0CxeYZvc/b8uVZFmWF8eRUDtQVecINdWV0mudLuweTjyMs0EUsiRBYhveXXNudP5Zdlj/18EL0uQX5LYBhHhAMUQVw6G62T/bJZDDzUREVKhXnZgk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744315302; c=relaxed/simple; bh=Ms/oOeKSEMXS64ZazNDVvDxHOh6Vnicgt8yf3H6sLTM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=KCkX4Fjuz4AyAo5w5nvjnorDF9YONXvey0OOmaJrQ1h8VL8owKCpLWELluWRS0UyXJzRmNZojJKE9et//dqRH7O2Vtj3GVckkampSjNhhTDmATgMVgI6vwmVtzayn2kF0oPLpsOhQ9vbmZ4PX93nznkhxFDYhKQsbktZcS2TMio= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org; spf=pass smtp.mailfrom=linuxfoundation.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=DdmOoAWr; arc=none smtp.client-ip=209.85.166.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linuxfoundation.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="DdmOoAWr" Received: by mail-io1-f43.google.com with SMTP id ca18e2360f4ac-85e73562577so120226639f.0 for ; Thu, 10 Apr 2025 13:01:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1744315299; x=1744920099; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=JTExV2/x6J7An5Mf72xYq5DzHVrycRROkLdZFeM6opQ=; b=DdmOoAWrcSZXGgiu+F3R4fDg6yz4wsWW4FB6JQrVhVTgO5fwKXzRyMLnsgk0uAOyJN 0O+Ih4jQL3MmnEuu6iQYkQ5aD3JSOXGrfKyBJaOC1nS1LGJ1zOww4KhYi8+kHmlG/qoX 2n5BbYA5r2ReXhQ5wymjPYoLhNYod81gP+pJU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744315299; x=1744920099; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=JTExV2/x6J7An5Mf72xYq5DzHVrycRROkLdZFeM6opQ=; b=K+6UsEim2okjp0kth/CXj8vXWaHbWgTNBk6lTyDqPISNO1Tb0iTsRbN8CQ8Y0+BbkB /zNDQK5Sib0nh1duc65H6DHOv8rIi7akNfRKmnEaZ0QxsIxau8FhOTJ/tMiyE6K5EFpu GhoABnCMq/XdTYC4sTiErHTh/5ISxCU31FQjo+E/0hxb6ooMKXL4eetmesBTHVCkp6xZ n27nBp2i2XUE7JMjLJoDsjuLoMqQlSAzbtiH8m5XpkifcgQ6imDkIvdQ0h8+4Dqyby6e OFyUNwR/kueGmzQQVGxc+mE3gH2eyTNQaK2/et7RVptV4DMNoMj3UvGEtBky0QN0q730 qtlQ== X-Gm-Message-State: AOJu0YyQkJx0chh6euUuDKvngV9sgnEKHXlh7VJx0oHh3lvZyJV2UtSV km/eFWWsV9plR0PGwWHWGzuP7GkSOCo5CCT2BD2a9SLGV2riu1tnFlCyX8xegz0= X-Gm-Gg: ASbGncusswbxuM6qiYYJo6RzFTCQ1zhwvg5NlMzcpgRh1VeaNcE553UX0IScx4Uva9t fzj5dlS7Gh5cO8xx21vcc9GnJpOl0YP1mQVEWbyYRTmB2r/JmOYJAKNV+g1ZlVpj2aI+QeJsBGm HLL2s0TRddlW1tL8bce81gOF9zRKx1bW5ePrvi/17Btim+cSQuVsHFPTe/lFk2IkXTI8bU6iXXT 81vqlyl71/afwslrN3udbQJQrVTsSe11GZ7eH3MgcEj9m81CRQSFxV5gn+o3f+l+Av67a0FEHQN hs6n9pukcT2eH1juEGSYKCtdInOA40swuHx24iuGDej2GwVjaB4= X-Google-Smtp-Source: AGHT+IEamSjMZo51Y/WT0FkpK3Y3HQ6M3NFrIP9orG53L5IoXNqmvwloYy4Vaei+SdIQbSb9eK1H3g== X-Received: by 2002:a05:6e02:1806:b0:3d1:9999:4f62 with SMTP id e9e14a558f8ab-3d7ec1dc817mr2203095ab.2.1744315298542; Thu, 10 Apr 2025 13:01:38 -0700 (PDT) Received: from [192.168.1.14] ([38.175.170.29]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4f505e2ecebsm889447173.128.2025.04.10.13.01.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 10 Apr 2025 13:01:38 -0700 (PDT) Message-ID: <58b846c8-ce58-44b3-b93e-828fbe98b42d@linuxfoundation.org> Date: Thu, 10 Apr 2025 14:01:37 -0600 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 00/32] kselftest harness and nolibc compatibility To: =?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= , Shuah Khan , Willy Tarreau , =?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Shuah Khan References: <20250407-nolibc-kselftest-harness-v2-0-f8812f76e930@linutronix.de> <04bf6bbc-d813-488d-9117-def19717b8b5@linuxfoundation.org> Content-Language: en-US From: Shuah Khan In-Reply-To: <04bf6bbc-d813-488d-9117-def19717b8b5@linuxfoundation.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 4/10/25 09:19, Shuah Khan wrote: > On 4/7/25 00:52, Thomas Weißschuh wrote: >> Nolibc is useful for selftests as the test programs can be very small, >> and compiled with just a kernel crosscompiler, without userspace support. >> Currently nolibc is only usable with kselftest.h, not the more >> convenient to use kselftest_harness.h >> This series provides this compatibility by adding new features to nolibc >> and removing the usage of problematic features from the harness. >> >> The first half of the series are changes to the harness, the second one >> are for nolibc. Both parts are very independent and should go through >> different trees. >> The last patch is not meant to be applied and serves as test that >> everything works together correctly. >> >> Signed-off-by: Thomas Weißschuh >> --- >> Changes in v2: >> - Rebase unto v6.15-rc1 >> - Rename internal nolibc symbols >> - Handle edge case of waitpid(INT_MIN) == ESRCH >> - Fix arm configurations for final testing patch >> - Clean up global getopt.h variable declarations >> - Add Acks from Willy >> - Link to v1: https://lore.kernel.org/r/20250304-nolibc-kselftest-harness-v1-0-adca7cd231e2@linutronix.de > > Thank you. I am going to start reviewing the series. It could take > me a few days to get through all 32 patches. :) > >> >> --- >> Thomas Weißschuh (32): >>        selftests: harness: Add harness selftest >>        selftests: harness: Use C89 comment style >>        selftests: harness: Ignore unused variant argument warning >>        selftests: harness: Mark functions without prototypes static >>        selftests: harness: Remove inline qualifier for wrappers >>        selftests: harness: Remove dependency on libatomic >>        selftests: harness: Implement test timeouts through pidfd >>        selftests: harness: Don't set setup_completed for fixtureless tests >>        selftests: harness: Always provide "self" and "variant" >>        selftests: harness: Move teardown conditional into test metadata >>        selftests: harness: Add teardown callback to test metadata >>        selftests: harness: Stop using setjmp()/longjmp() >>        selftests: harness: Guard includes on nolibc >>        tools/nolibc: handle intmax_t/uintmax_t in printf >>        tools/nolibc: use intmax definitions from compiler >>        tools/nolibc: use pselect6_time64 if available >>        tools/nolibc: use ppoll_time64 if available >>        tools/nolibc: add tolower() and toupper() >>        tools/nolibc: add _exit() >>        tools/nolibc: add setpgrp() >>        tools/nolibc: implement waitpid() in terms of waitid() >>        Revert "selftests/nolibc: use waitid() over waitpid()" >>        tools/nolibc: add dprintf() and vdprintf() >>        tools/nolibc: add getopt() >>        tools/nolibc: allow different write callbacks in printf >>        tools/nolibc: allow limiting of printf destination size >>        tools/nolibc: add snprintf() and friends >>        selftests/nolibc: use snprintf() for printf tests >>        selftests/nolibc: rename vfprintf test suite >>        selftests/nolibc: add test for snprintf() truncation >>        tools/nolibc: implement width padding in printf() >>        HACK: selftests/nolibc: demonstrate usage of the kselftest harness >> >>   tools/include/nolibc/Makefile                      |    1 + >>   tools/include/nolibc/getopt.h                      |  101 ++ >>   tools/include/nolibc/nolibc.h                      |    1 + >>   tools/include/nolibc/stdint.h                      |    4 +- >>   tools/include/nolibc/stdio.h                       |  127 +- >>   tools/include/nolibc/string.h                      |   17 + >>   tools/include/nolibc/sys.h                         |  105 +- >>   tools/testing/selftests/Makefile                   |    1 + >>   tools/testing/selftests/kselftest/.gitignore       |    1 + >>   tools/testing/selftests/kselftest/Makefile         |    6 + >>   .../testing/selftests/kselftest/harness-selftest.c |  129 ++ One more thing. You are missing kselftest_harness maintainers. Please send v3 with the changes I requested for test name and directory, and make cleanup? The fixes to existing kselftest_harness compile warnings and such can go in an upcoming rc and the others can go into the next release. >>   .../selftests/kselftest/harness-selftest.expected  |   62 + >>   .../selftests/kselftest/harness-selftest.sh        |   14 + >>   tools/testing/selftests/kselftest_harness.h        |  181 +- >>   tools/testing/selftests/nolibc/Makefile            |   13 +- >>   tools/testing/selftests/nolibc/harness-selftest.c  |    1 + >>   tools/testing/selftests/nolibc/nolibc-test.c       | 1729 +------------------- >>   tools/testing/selftests/nolibc/run-tests.sh        |    2 +- >>   18 files changed, 635 insertions(+), 1860 deletions(-) >> --- >> base-commit: 0af2f6be1b4281385b618cb86ad946eded089ac8 >> change-id: 20250130-nolibc-kselftest-harness-8b2c8cac43bf >> > thanks, -- Shuah