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 X-Patchwork-Id: 55831 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9F7483857711 for ; Mon, 12 Jun 2023 18:30:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9F7483857711 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1686594647; bh=NefAQZmhyMB8hHDQnQFLzzFMPjLo6lvYLHFLKYEu0wU=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=cngTqYJuak4PmC+hnTvW53uDETLuHoliN9QuKohKPAEd9+dncT2wBxBW2e9mnU69B sZ1wEZWrfyaftZK1St2ExXPqYNShpQoNps+tLS7KnsNUaeYDdfViP7wsaTRE/rkaW6 PZdgNKHTyaixFUrHCsB31JZ5uOVBoqDTp82BSrTI= 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 Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces+patchwork=sourceware.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