From patchwork Wed Mar 18 04:44:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yousong Zhou X-Patchwork-Id: 451220 X-Patchwork-Delegate: nbd@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 694BE140119 for ; Wed, 18 Mar 2015 15:53:20 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="verification failed; unprotected key" header.d=gmail.com header.i=@gmail.com header.b=SCdBfyK4; dkim-adsp=none (unprotected policy); dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id CE28B28C166; Wed, 18 Mar 2015 05:52:13 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id EA55528B87B for ; Wed, 18 Mar 2015 05:51:54 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .gmail. - helo: .mail-pd0-f178.google. - helo-domain: .google.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -8.5 Received: from mail-pd0-f178.google.com (mail-pd0-f178.google.com [209.85.192.178]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Wed, 18 Mar 2015 05:51:54 +0100 (CET) Received: by pdbop1 with SMTP id op1so31109590pdb.2 for ; Tue, 17 Mar 2015 21:52:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=AGmFJxFlYq9YBiKVaElE2yXyBYZocv+vAQXJUdlLBR0=; b=SCdBfyK43B/YWoirQkN5Fel0oW15BXvmEunq1Jx0grtfRJyHQUAyLRirHEu8TBsAXu avn4bLcuBhFawHVzABS4by2VY08Jg0XPPa+wHrjNzuQP3e8YUECCsWA5qKTLeBPKFgBx CnPgBRIkFALFllrj6QwJ0Tpm/HypjJR3eezlrnJhzWbqlzyAOGbqz28/awtzcgVL3U17 lED/95hm845LIkh2bRD62AhF8B4mm5U+noaksEJFoYa/mmYeIlyIkFowSkforkAutaEc VH0nntDslyLExA8PdDxtLmDYVuO0CUySOp4o4O7lsyRKnHQCvM8hd61AoIHwMO06jd1/ OV6A== X-Received: by 10.66.55.42 with SMTP id o10mr107633587pap.148.1426654340237; Tue, 17 Mar 2015 21:52:20 -0700 (PDT) Received: from debian.corp.sankuai.com ([103.29.140.56]) by mx.google.com with ESMTPSA id v7sm25048051pds.72.2015.03.17.21.52.17 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Mar 2015 21:52:19 -0700 (PDT) From: Yousong Zhou To: nbd@openwrt.org Date: Wed, 18 Mar 2015 12:44:43 +0800 Message-Id: <1426653885-23455-2-git-send-email-yszhou4tech@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1426653885-23455-1-git-send-email-yszhou4tech@gmail.com> References: <1426653885-23455-1-git-send-email-yszhou4tech@gmail.com> Cc: openwrt-devel@lists.openwrt.org Subject: [OpenWrt-Devel] [PATCH v2 1/3] testenv: test for exit status of "uci export". X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" Signed-off-by: Yousong Zhou --- test/tests.d/010_export | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/tests.d/010_export b/test/tests.d/010_export index 259f988..584bcc8 100644 --- a/test/tests.d/010_export +++ b/test/tests.d/010_export @@ -1,6 +1,14 @@ test_export () { cp ${REF_DIR}/export.data ${CONFIG_DIR}/export + + ${UCI_Q} export nilpackage + assertFalse $? + + ${UCI_Q} export export 1>/dev/null 2>&1 + assertTrue $? + ${UCI} export > ${TMP_DIR}/export.result + assertTrue $? assertSameFile ${REF_DIR}/export.result ${TMP_DIR}/export.result }