From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Mon, 12 Apr 2021 09:19:12 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1lVqqm-0003go-TX for lore@lore.pengutronix.de; Mon, 12 Apr 2021 09:19:12 +0200 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lVqqi-00051q-OG for lore@pengutronix.de; Mon, 12 Apr 2021 09:19:12 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Zcxb9CNEZ4b/tfb3BQoduCkbkcMgU8MECQMU7e9KbIE=; b=DcGPwMK39GcirMIeoMeJpBpgU BzgvtEpUL8K07MZXF69R1Hzo43CXSY/1OGqgrldHM3XT3DN8DWI3ua1NqdZmybI70BKezlRHTWHpG +dEaEFObiNakG+jUBuGEPmTAO7zztZ4L5jP5oowDAqvdNs1kJ4v9i8u83jO0sw8RrT4MA2KS5+qDx yRhm8AVa060o8hqmEKzTv3CgLb7Imj76GBMkGl/CTtCdbXLYEWyEYDnyZx4RWJpaFrCQEBwDpmbu+ Q+6IAhri2ECcKy+M/XGFXvrGf5FEgR7h/EhJtuP5ay3II24z64UTmN1dkhMh0PQF56Kb7kZ4bj/V9 dZ5BxWYGA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lVqpd-005wD2-PL; Mon, 12 Apr 2021 07:18:01 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lVqoj-005vub-7U for barebox@desiato.infradead.org; Mon, 12 Apr 2021 07:17:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Sender:Reply-To:Content-ID:Content-Description; bh=iyGv5cadpGaxjNsDy6E08lKS4wqukLcFPW2Ur4vaWfw=; b=K6gd1+mS7CyEZb+PF9ZZCG4gFv Hz4lAN1pPIT5cbSbTj1HJdZYQweBNrUpoUZZpt4Fo7qcQiKAeGtRGwPwxYORWVDm9UHSVSudcBSz1 6PMaj4No0K5CPBJ9KqN46kHowSm//hBE5vJzxDacht00ItajGgrrJ/4oiJxurMrZVGmUe7pQEr5lk wX5HHDH1DXUAXk9DaA+NSGX4G+ey11RnfJr7/xQBe/ouMzznBsT4EDRLeQ3E3tver0oJW4m5Afa0R XTYA+yyvtEfO1Gkgw1SgipXn0sN3ypiW9JBdKKQFPK+MV8BbYCz98jE2yZQ6W/FSiXrjTfJbA0Owp PGwM+PhA==; Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lVqod-005vEp-Oe for barebox@lists.infradead.org; Mon, 12 Apr 2021 07:17:04 +0000 Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lVqoa-0004HM-II; Mon, 12 Apr 2021 09:16:56 +0200 Received: from afa by dude.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1lVqoZ-0002fn-B8; Mon, 12 Apr 2021 09:16:55 +0200 From: Ahmad Fatoum To: barebox@lists.infradead.org Date: Mon, 12 Apr 2021 09:16:44 +0200 Message-Id: <20210412071651.8769-11-a.fatoum@pengutronix.de> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210412071651.8769-1-a.fatoum@pengutronix.de> References: <20210412071651.8769-1-a.fatoum@pengutronix.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210412_001700_082193_D2F76AD5 X-CRM114-Status: GOOD ( 22.75 ) X-BeenThere: barebox@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ahmad Fatoum , rcz@pengutronix.de Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "barebox" X-SA-Exim-Connect-IP: 2001:8b0:10b:1:d65d:64ff:fe57:4e05 X-SA-Exim-Mail-From: barebox-bounces+lore=pengutronix.de@lists.infradead.org X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.ext.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-3.3 required=4.0 tests=AWL,BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.2 Subject: [PATCH 10/17] test: self: port Linux printf kselftest X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on metis.ext.pengutronix.de) UG9ydCBvdmVyIHRoZSBMaW51eCB2NS4xMSBzZWxmdGVzdCBmb3IgcHJpbnRmIHNhbnMgdGhlIHBh cnRzIHdlIGRvbid0CnN1cHBvcnQuIFRoaXMgY2FuIGJlIHVzZWQgdG8gY2F0Y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