1f08c3bdfSopenharmony_ci#!/bin/sh 2f08c3bdfSopenharmony_ci# 3f08c3bdfSopenharmony_ci# Copyright (c) 2009 Casey Schaufler under the terms of the 4f08c3bdfSopenharmony_ci# GNU General Public License version 2, as published by the 5f08c3bdfSopenharmony_ci# Free Software Foundation 6f08c3bdfSopenharmony_ci# 7f08c3bdfSopenharmony_ci# Test setting of the CIPSO doi 8f08c3bdfSopenharmony_ci# 9f08c3bdfSopenharmony_ci# Environment: 10f08c3bdfSopenharmony_ci# CAP_MAC_ADMIN 11f08c3bdfSopenharmony_ci# 12f08c3bdfSopenharmony_ci 13f08c3bdfSopenharmony_ciexport TCID=smack_set_doi 14f08c3bdfSopenharmony_ciexport TST_TOTAL=1 15f08c3bdfSopenharmony_ci 16f08c3bdfSopenharmony_ci. test.sh 17f08c3bdfSopenharmony_ci 18f08c3bdfSopenharmony_ci. smack_common.sh 19f08c3bdfSopenharmony_ci 20f08c3bdfSopenharmony_cinot_start_value="17" 21f08c3bdfSopenharmony_cistart_value=$(cat "$smackfsdir/doi" 2>/dev/null) 22f08c3bdfSopenharmony_ci 23f08c3bdfSopenharmony_ciecho "$not_start_value" 2>/dev/null > "$smackfsdir/doi" 24f08c3bdfSopenharmony_ci 25f08c3bdfSopenharmony_cidirect_value=$(cat "$smackfsdir/doi" 2>/dev/null) 26f08c3bdfSopenharmony_ciif [ "$direct_value" != "$not_start_value" ]; then 27f08c3bdfSopenharmony_ci tst_brkm TFAIL "The CIPSO doi reported is \"$direct_value\", not the" \ 28f08c3bdfSopenharmony_ci "expected \"$not_start_value\"." 29f08c3bdfSopenharmony_cifi 30f08c3bdfSopenharmony_ci 31f08c3bdfSopenharmony_ciecho "$start_value" 2>/dev/null > "$smackfsdir/doi" 32f08c3bdfSopenharmony_ci 33f08c3bdfSopenharmony_cidirect_value=$(cat "$smackfsdir/doi" 2>/dev/null) 34f08c3bdfSopenharmony_ciif [ "$direct_value" != "$start_value" ]; then 35f08c3bdfSopenharmony_ci tst_brkm TFAIL "The CIPSO doi reported is \"$direct_value\", not the" \ 36f08c3bdfSopenharmony_ci "expected \"$start_value\"." 37f08c3bdfSopenharmony_cifi 38f08c3bdfSopenharmony_ci 39f08c3bdfSopenharmony_citst_resm TPASS "Test \"$TCID\" success." 40f08c3bdfSopenharmony_citst_exit 41