From patchwork Mon Jun 12 18:30:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 1794014 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=SLxB5bKE; dkim-atps=neutral Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Qg0cK743yz20QH for ; Tue, 13 Jun 2023 04:30:41 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D5EC63858409 for ; Mon, 12 Jun 2023 18:30:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D5EC63858409 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1686594638; bh=NefAQZmhyMB8hHDQnQFLzzFMPjLo6lvYLHFLKYEu0wU=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=SLxB5bKEwKupyrB46JAzd+TT6v2hIVUEVAV/Qz1WSe9RID5y+Kg2WRJG3/nark8Nd PSHF+6/1kuI+LMOhRuAp2rBoUESOUYdndt9wFZeuNHdgyzQgBnux7NM3bfexaVXgl4 AYq7wbJZG8V64dIWlidEkzqFHSDipg86FQ+CebiI= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oi1-x231.google.com (mail-oi1-x231.google.com [IPv6:2607:f8b0:4864:20::231]) by sourceware.org (Postfix) with ESMTPS id 45AE63858D20 for ; Mon, 12 Jun 2023 18:30:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 45AE63858D20 Received: by mail-oi1-x231.google.com with SMTP id 5614622812f47-39cc64e4a44so855827b6e.0 for ; Mon, 12 Jun 2023 11:30:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686594619; x=1689186619; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=NefAQZmhyMB8hHDQnQFLzzFMPjLo6lvYLHFLKYEu0wU=; b=FHnkOeKlR58S78cRjkdXAVtNUXZXzBRK5EldJYei/tflZP71EaNizNm3P4vtbLxy0W ou0AsIBQw02lySopkfQ0hBe0gNpwnw9tSPwT0erP67+BeAnx3Wseoz/IYOb1HA7URYvd 1COQs8P3AHBHpqfxjjdn1JS+3+LJGSah1Z9SPKj4nFL4ZGfRv4XFTfwpxA2qsoUJ8ZNG bkh4dKLfbgnfPr5b7U+BweGqtLa+LJu174jgSISWDtth/cWiFs1EciGCvxWNSN4yQsoG PCDbyVxMarxJsEUuT6nBXDDqMjY9/gKYgK+X4iXkTwiJjGqvrFeYWJMpSmhDNgrrlBXm Pf8A== X-Gm-Message-State: AC+VfDxBYZF9KvFZdW2ZuqtuN/V7phSioqhu4a/HjbT0v9yXoxMAjRWD s/K2CcLlfebFfcqZvuMCNidrqDYEoYhV8pVhApPfuw== X-Google-Smtp-Source: ACHHUZ4wRs30ygl2M3I2Bvctw5NZSpPz8jmEXsnikq2ccCL5wn0a8cTUblDSLpYrrvYDIP3fd0qjww== X-Received: by 2002:a05:6808:2010:b0:39a:bc60:adf9 with SMTP id q16-20020a056808201000b0039abc60adf9mr5378798oiw.7.1686594618882; Mon, 12 Jun 2023 11:30:18 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c2:8501:af26:cdf:f789:4317]) by smtp.gmail.com with ESMTPSA id r5-20020acaf305000000b003896e31867esm4472095oih.49.2023.06.12.11.30.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jun 2023 11:30:18 -0700 (PDT) To: libc-alpha@sourceware.org Subject: [PATCH 0/2] Improve tst-ttyname within containers Date: Mon, 12 Jun 2023 15:30:12 -0300 Message-Id: <20230612183014.882895-1-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Adhemerval Zanella via Libc-alpha From: Adhemerval Zanella Netto Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" The test might fail depending on how the container is configure, its capabilities, and/or which LSM is enabled and how it is configured (check the discussion on libc-alpha [1]). [1] https://sourceware.org/pipermail/libc-alpha/2023-June/148747.html Adhemerval Zanella (2): linux: Split tst-ttyname linux: Return unsupported if procfs can not be mount on tst-ttyname-namespace sysdeps/unix/sysv/linux/Makefile | 3 +- .../{tst-ttyname.c => tst-ttyname-common.c} | 208 +----------------- sysdeps/unix/sysv/linux/tst-ttyname-direct.c | 110 +++++++++ .../unix/sysv/linux/tst-ttyname-namespace.c | 147 +++++++++++++ 4 files changed, 263 insertions(+), 205 deletions(-) rename sysdeps/unix/sysv/linux/{tst-ttyname.c => tst-ttyname-common.c} (68%) create mode 100644 sysdeps/unix/sysv/linux/tst-ttyname-direct.c create mode 100644 sysdeps/unix/sysv/linux/tst-ttyname-namespace.c