コード例 #1
0
ファイル: test_ic_fc_guc_check.py プロジェクト: zwt1024/gpdb
    def run_sql_under_KM_dropMore(self, suffix):

        result = runShellCommand('gpssh' + self.hoststr + ' \"sudo dmesg -c\"')
        self.assertTrue(result)
        runShellCommand('gpssh ' + self.hoststr +
                        ' \"export PATH=$PATH:/sbin; \
                                            sudo rmmod ickm.ko\"')
        result = runShellCommand(
            'gpssh' + self.hoststr +
            ' \"export PATH=$PATH:/sbin;sudo insmod ickm.ko ict_type=0x101 seq_array=2 drop_times=80\"'
        )
        self.assertTrue(result)

        sql_file = local_path(self.gucCheck_sql + str(self._testMethodName) +
                              suffix + '.sql')
        self.assertTrue(PSQL.run_sql_file(sql_file))

        result = runShellCommand(
            'gpssh' + self.hoststr +
            ' \"export PATH=$PATH:/sbin;sudo rmmod ickm.ko \"')
        self.assertTrue(result)

        out_file = sql_file.replace(".sql", ".out")

        return out_file
コード例 #2
0
ファイル: test_ic_fc_guc_check.py プロジェクト: 50wu/gpdb
    def run_sql_under_KM_dropMore(self,suffix):
        
        result = runShellCommand('gpssh' + self.hoststr +  ' \"sudo dmesg -c\"')
        self.assertTrue(result)
        runShellCommand('gpssh ' + self.hoststr +  ' \"export PATH=$PATH:/sbin; \
                                            sudo rmmod ickm.ko\"')
        result = runShellCommand('gpssh' + self.hoststr +  ' \"export PATH=$PATH:/sbin;sudo insmod ickm.ko ict_type=0x101 seq_array=2 drop_times=80\"') 
        self.assertTrue(result)
        
        sql_file = local_path(self.gucCheck_sql + str(self._testMethodName) + suffix + '.sql')
        self.assertTrue(PSQL.run_sql_file(sql_file))        

        result = runShellCommand('gpssh' + self.hoststr +  ' \"export PATH=$PATH:/sbin;sudo rmmod ickm.ko \"') 
        self.assertTrue(result)        

        out_file = sql_file.replace(".sql",".out")

        return out_file
コード例 #3
0
ファイル: test_ic_fc_guc_check.py プロジェクト: zwt1024/gpdb
    def run_sql_under_KM(self, suffix):

        result = runShellCommand('gpssh' + self.hoststr + ' \"sudo dmesg -c\"')
        self.assertTrue(result)
        runShellCommand('gpssh ' + self.hoststr +
                        ' \"export PATH=$PATH:/sbin; \
                                            sudo rmmod ickm.ko\"')
        result = runShellCommand(
            'gpssh' + self.hoststr +
            ' \"export PATH=$PATH:/sbin;sudo insmod ickm.ko ict_type=0x101 seq_array=2 drop_times=5\"'
        )
        self.assertTrue(result)

        sql_result = self.run_sql_file(
            local_path(self.gucCheck_sql + str(self._testMethodName) + suffix +
                       '.sql'),
            local_path(self.gucCheck_sql + str(self._testMethodName) + suffix +
                       '.ans'))

        result = runShellCommand('gpssh' + self.hoststr +
                                 ' \"sudo cat /proc/ickmlog \"' + '> ickm.log')
        self.assertTrue(result)

        result = runShellCommand(
            'gpssh' + self.hoststr +
            ' \"export PATH=$PATH:/sbin;sudo rmmod ickm.ko \"')
        self.assertTrue(result)

        # Remove KM before check testing result to make sure KM could be removed if case failed.
        self.assertTrue(sql_result)

        # Check if DISORDER info exist
        check_result = self.checkOutputPattern("ickm.log", "DIS")
        return check_result
コード例 #4
0
ファイル: test_ic_fc_guc_check.py プロジェクト: 50wu/gpdb
    def run_sql_under_KM(self,suffix):
        
        result = runShellCommand('gpssh' + self.hoststr +  ' \"sudo dmesg -c\"')
        self.assertTrue(result)
        runShellCommand('gpssh ' + self.hoststr +  ' \"export PATH=$PATH:/sbin; \
                                            sudo rmmod ickm.ko\"')
        result = runShellCommand('gpssh' + self.hoststr +  ' \"export PATH=$PATH:/sbin;sudo insmod ickm.ko ict_type=0x101 seq_array=2 drop_times=5\"') 
        self.assertTrue(result)
        
        sql_result = self._run_test(local_path(self.gucCheck_sql + str(self._testMethodName) + suffix +'.sql'), 
                                local_path(self.gucCheck_sql + str(self._testMethodName) + suffix + '.ans'))

        result = runShellCommand('gpssh' + self.hoststr + ' \"sudo cat /proc/ickmlog \"' + '> ickm.log') 
        self.assertTrue(result)
    
        result = runShellCommand('gpssh' + self.hoststr +  ' \"export PATH=$PATH:/sbin;sudo rmmod ickm.ko \"') 
        self.assertTrue(result)        
  
        # Remove KM before check testing result to make sure KM could be removed if case failed. 
        self.assertTrue(sql_result)
        
        # Check if DISORDER info exist
        check_result = self.checkOutputPattern("ickm.log", "DIS")
        return check_result