vbox的更動 26247 路徑 trunk/src/VBox/HostServices/GuestProperties
- 時間撮記:
- 2010-2-4 下午09:44:09 (15 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/HostServices/GuestProperties/testcase/tstGuestPropSvc.cpp
r25306 r26247 866 866 /** Should we use SET_PROP or SET_PROP_VALUE? */ 867 867 bool useSetProp; 868 /** Should this succeed or be rejected with VERR_PERMISSION_DENIED? */ 868 /** Should this succeed or be rejected with VERR_ (NOT VINF_!) 869 * PERMISSION_DENIED? The global check is done after the property one. */ 869 870 bool isAllowed; 870 871 } 871 872 setPropertiesROGuest[] = 872 873 { 873 { "Red", "Stop!", "transient", false, true, false },874 { "Amber", "Caution!", "", false, false, false },874 { "Red", "Stop!", "transient", false, true, true }, 875 { "Amber", "Caution!", "", false, false, true }, 875 876 { "Green", "Go!", "readonly", true, true, true }, 876 877 { "Blue", "What on earth...?", "", true, false, true }, 877 { "/test/name", "test", "", false, true, false },878 { "/test/name", "test", "", false, true, true }, 878 879 { "TEST NAME", "test", "", true, true, true }, 879 880 { "Green", "gone out...", "", false, false, false }, 880 { "Green", "gone out... ", "", true, false, false },881 { NULL, NULL, NULL, false, false, false }881 { "Green", "gone out....", "", true, false, false }, 882 { NULL, NULL, NULL, false, false, true } 882 883 }; 883 884 … … 931 932 setPropertiesROGuest[i].useSetProp); 932 933 if (setPropertiesROGuest[i].isAllowed && RT_FAILURE(rc)) 933 RTPrintf("Setting property '%s' failed with rc=%Rrc.\n", 934 setPropertiesROGuest[i].pcszName, rc); 934 RTPrintf("Setting property '%s' to '%s' failed with rc=%Rrc.\n", 935 setPropertiesROGuest[i].pcszName, 936 setPropertiesROGuest[i].pcszValue, rc); 935 937 else if ( !setPropertiesROGuest[i].isAllowed 936 938 && (rc != VERR_PERMISSION_DENIED)) 937 939 { 938 RTPrintf("Setting property '%s' returned %Rrc instead of VERR_PERMISSION_DENIED.\n", 939 setPropertiesROGuest[i].pcszName, rc); 940 RTPrintf("Setting property '%s' to '%s' returned %Rrc instead of VERR_PERMISSION_DENIED.\n", 941 setPropertiesROGuest[i].pcszName, 942 setPropertiesROGuest[i].pcszValue, rc); 943 rc = VERR_IPE_UNEXPECTED_STATUS; 944 } 945 else if ( !setPropertiesROGuest[i].isHost 946 && setPropertiesROGuest[i].isAllowed 947 && (rc != VINF_PERMISSION_DENIED)) 948 { 949 RTPrintf("Setting property '%s' to '%s' returned %Rrc instead of VINF_PERMISSION_DENIED.\n", 950 setPropertiesROGuest[i].pcszName, 951 setPropertiesROGuest[i].pcszValue, rc); 940 952 rc = VERR_IPE_UNEXPECTED_STATUS; 941 953 } … … 960 972 /** And with what flags? */ 961 973 const char *pcszFlags; 962 /** Should this succeed or be rejected with VERR_PERMISSION_DENIED? */ 974 /** Should this succeed or be rejected with VERR_ (NOT VINF_!) 975 * PERMISSION_DENIED? The global check is done after the property one. */ 963 976 bool isAllowed; 964 977 } … … 966 979 { 967 980 { "Red", true, true, "", true }, 968 { "Amber", false, true, "", false },981 { "Amber", false, true, "", true }, 969 982 { "Red2", true, false, "", true }, 970 { "Amber2", false, false, "", false },983 { "Amber2", false, false, "", true }, 971 984 { "Red3", true, true, "READONLY", false }, 972 985 { "Amber3", false, true, "READONLY", false }, 973 986 { "Red4", true, true, "RDONLYHOST", false }, 974 { "Amber4", false, true, "RDONLYHOST", false },987 { "Amber4", false, true, "RDONLYHOST", true }, 975 988 { NULL, false, false, "", false } 976 989 }; … … 1010 1023 rc = VERR_IPE_UNEXPECTED_STATUS; 1011 1024 } 1025 else if ( !delPropertiesROGuest[i].isHost 1026 && delPropertiesROGuest[i].shouldCreate 1027 && delPropertiesROGuest[i].isAllowed 1028 && (rc != VINF_PERMISSION_DENIED)) 1029 { 1030 RTPrintf("Deleting property '%s' as guest returned %Rrc instead of VINF_PERMISSION_DENIED.\n", 1031 delPropertiesROGuest[i].pcszName, rc); 1032 rc = VERR_IPE_UNEXPECTED_STATUS; 1033 } 1012 1034 else 1013 1035 rc = VINF_SUCCESS;
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器